本文整理汇总了C++中LCD::eraseBox方法的典型用法代码示例。如果您正苦于以下问题:C++ LCD::eraseBox方法的具体用法?C++ LCD::eraseBox怎么用?C++ LCD::eraseBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LCD
的用法示例。
在下文中一共展示了LCD::eraseBox方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cableReleaseRemote
volatile char cableReleaseRemote(char key, char first)
{
static char status; //, cable;
if(first)
{
status = 0;
lcd.cls();
menu.setTitle(TEXT("BT Cable Remote"));
menu.setBar(TEXT("Bulb"), TEXT("Photo"));
lcd.update();
remote.set(REMOTE_BULB_END);
}
if(key == FL_KEY)
{
if(status != 1)
{
status = 1;
lcd.eraseBox(8, 18, 8 + 6 * 11, 26);
lcd.writeString(8, 18, TEXT("(BULB OPEN)"));
remote.set(REMOTE_BULB_START);
lcd.update();
} else
{
status = 0;
lcd.eraseBox(8, 18, 8 + 6 * 11, 26);
remote.set(REMOTE_BULB_END);
lcd.update();
}
}
else if(key == FR_KEY && status != 1)
{
status = 0;
lcd.eraseBox(8, 18, 8 + 6 * 11, 26);
remote.set(REMOTE_CAPTURE);
lcd.update();
}
else if(key != 0)
{
status = 0;
lcd.eraseBox(8, 18, 8 + 6 * 11, 26);
remote.set(REMOTE_BULB_END);
lcd.update();
}
if(key == LEFT_KEY || !remote.connected)
{
remote.set(REMOTE_BULB_END);
return FN_CANCEL;
}
return FN_CONTINUE;
}
示例2: viewSeconds
volatile char viewSeconds(char key, char first)
{
if(first)
{
lcd.cls();
lcd.writeString(1, 18, TEXT("Clock:"));
menu.setTitle(TEXT("Clock"));
menu.setBar(TEXT("TARE"), TEXT("RETURN"));
}
lcd.eraseBox(36, 18, 83, 18 + 8);
/*char x =*/ lcd.writeNumber(83, 18, clock.Seconds(), 'F', 'R');
lcd.update();
switch(key)
{
case FL_KEY:
clock.tare();
break;
case FR_KEY:
return FN_CANCEL;
}
return FN_CONTINUE;
}
示例3: shutterLagTest
volatile char shutterLagTest(char key, char first)
{
// static uint8_t cable;
uint16_t start_lag, end_lag;
if(first)
{
// cable = 0;
lcd.cls();
menu.setTitle(TEXT("Shutter Lag Test"));
menu.setBar(TEXT("Test 1"), TEXT("Test 2 "));
lcd.update();
}
if(key == FL_KEY || key == FR_KEY)
{
lcd.eraseBox(10, 18, 80, 38);
lcd.writeString(10, 18, TEXT("Result:"));
ENABLE_SHUTTER;
ENABLE_MIRROR;
ENABLE_AUX_PORT;
_delay_ms(100);
if(key == FR_KEY)
{
MIRROR_UP;
_delay_ms(1000);
}
SHUTTER_OPEN;
clock.tare();
while(!AUX_INPUT1)
{
if(clock.eventMs() >= 1000)
break;
}
start_lag = (uint16_t)clock.eventMs();
_delay_ms(50);
SHUTTER_CLOSE;
clock.tare();
while(AUX_INPUT1)
{
if(clock.eventMs() > 1000)
break;
}
end_lag = (uint16_t)clock.eventMs();
lcd.writeNumber(56, 18, start_lag, 'U', 'L');
lcd.writeNumber(56, 28, end_lag, 'U', 'L');
lcd.update();
}
if(key == LEFT_KEY)
return FN_CANCEL;
return FN_CONTINUE;
}
示例4: cableRelease
volatile char cableRelease(char key, char first)
{
static char status; //, cable;
if(first)
{
status = 0;
//cable = 0;
lcd.cls();
menu.setTitle(TEXT("Cable Remote"));
menu.setBar(TEXT("Bulb"), TEXT("Photo"));
lcd.update();
timer.half();
}
if(key == FL_KEY)
{
if(status != 1)
{
status = 1;
lcd.eraseBox(8, 18, 8 + 6 * 11, 26);
lcd.writeString(8, 18, TEXT("(BULB OPEN)"));
timer.bulbStart();
lcd.update();
} else
{
status = 0;
lcd.eraseBox(8, 18, 8 + 6 * 11, 26);
timer.bulbEnd();
lcd.update();
}
}
else if(key == FR_KEY && status != 1)
{
status = 0;
lcd.eraseBox(8, 18, 8 + 6 * 11, 26);
timer.capture();
lcd.update();
}
else if(key != 0)
{
status = 0;
lcd.eraseBox(8, 18, 8 + 6 * 11, 26);
timer.half();
lcd.update();
}
/*
if(timer.cableIsConnected())
{
if(cable == 0)
{
cable = 1;
lcd.writeStringTiny(6, 28, TEXT("Cable Connected"));
lcd.update();
}
}
else
{
if(cable == 1)
{
cable = 0;
lcd.eraseBox(6, 28, 6 + 15 * 5, 36);
lcd.update();
}
}
*/
if(key == LEFT_KEY)
{
timer.off();
return FN_CANCEL;
}
return FN_CONTINUE;
}
示例5: shutterTest
volatile char shutterTest(char key, char first)
{
static char status, cable;
if(first)
{
status = 0;
cable = 0;
lcd.cls();
menu.setTitle(TEXT("Shutter Test"));
menu.setBar(TEXT("Half"), TEXT("Full"));
lcd.update();
}
if(key == FL_KEY && status != 1)
{
status = 1;
lcd.eraseBox(20, 18, 20 + 6 * 6, 26);
lcd.writeString(20, 18, TEXT("(HALF)"));
timer.half();
lcd.update();
}
else if(key == FR_KEY && status != 2)
{
status = 2;
lcd.eraseBox(20, 18, 20 + 6 * 6, 26);
lcd.writeString(20, 18, TEXT("(FULL)"));
timer.full();
lcd.update();
}
else if(key != 0)
{
status = 0;
lcd.eraseBox(20, 18, 20 + 6 * 6, 26);
timer.off();
lcd.update();
}
if(timer.cableIsConnected())
{
if(cable == 0)
{
cable = 1;
lcd.writeStringTiny(6, 28, TEXT("Cable Connected"));
lcd.update();
}
}
else
{
if(cable == 1)
{
cable = 0;
lcd.eraseBox(6, 28, 6 + 15 * 5, 36);
lcd.update();
}
}
if(key == LEFT_KEY)
return FN_CANCEL;
return FN_CONTINUE;
}