本文整理汇总了C++中LCD::writeString方法的典型用法代码示例。如果您正苦于以下问题:C++ LCD::writeString方法的具体用法?C++ LCD::writeString怎么用?C++ LCD::writeString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LCD
的用法示例。
在下文中一共展示了LCD::writeString方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: lighteningTrigger
volatile char lighteningTrigger(char key, char first)
{
if(first)
{
sleepOk = 0;
hardware_lightening_enable();
lcd.cls();
menu.setTitle(TEXT("Lightening"));
lcd.writeString(25, 20, TEXT("READY"));
menu.setBar(TEXT("RETURN"), TEXT("CALIBRATE"));
lcd.update();
}
if(key == FL_KEY || key == LEFT_KEY)
{
sleepOk = 1;
hardware_lightening_disable();
return FN_CANCEL;
}
if(key == FR_KEY)
{
menu.message(TEXT("Calibrating"));
hardware_lightening_disable();
}
return FN_CONTINUE;
}
示例3: factoryReset
volatile char factoryReset(char key, char first)
{
if(first)
{
lcd.cls();
lcd.writeString(14, 12, TEXT("Reset all"));
lcd.writeString(14, 22, TEXT("settings?"));
menu.setTitle(TEXT("Reset"));
menu.setBar(TEXT("CANCEL"), TEXT("RESET"));
lcd.update();
}
switch(key)
{
case FL_KEY:
return FN_CANCEL;
case FR_KEY:
settings_default();
menu.message(TEXT("Factory Reset"));
return FN_CANCEL;
}
return FN_CONTINUE;
}
示例4: notYet
volatile char notYet(char key, char first)
{
if(first)
{
lcd.cls();
lcd.writeString(3, 7, TEXT("Sorry, this "));
lcd.writeString(3, 15, TEXT("feature has "));
lcd.writeString(3, 23, TEXT("not yet been "));
lcd.writeString(3, 31, TEXT("implemented "));
menu.setTitle(TEXT("Not Yet"));
menu.setBar(TEXT("RETURN"), BLANK_STR);
lcd.update();
}
if(key)
return FN_CANCEL;
return FN_CONTINUE;
}
示例5: 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;
}
示例6: memoryFree
volatile char memoryFree(char key, char first)
{
if(first)
{
unsigned int mem = hardware_freeMemory();
lcd.cls();
lcd.writeString(1, 18, TEXT("Free RAM:"));
/*char x =*/lcd.writeNumber(55, 18, mem, 'U', 'L');
//lcd.writeString(55 + x * 6, 18, TEXT("b"));
menu.setTitle(TEXT("Memory"));
menu.setBar(TEXT("RETURN"), BLANK_STR);
lcd.update();
}
if(key == FL_KEY)
return FN_CANCEL;
return FN_CONTINUE;
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: usbPlug
volatile char usbPlug(char key, char first)
{
static char connected = 0;
if(first || (PTP_Connected != connected) || (PTP_Ready))
{
connected = PTP_Connected;
char exp_name[7];
if(PTP_Connected)
{
if(PTP_Ready)
{
lcd.cls();
lcd.writeString(3, 7, PTP_CameraModel);
if(camera.shutterName(exp_name, camera.shutter))
{
lcd.writeString(3, 15, exp_name);
}
if(camera.apertureName(exp_name, camera.aperture))
{
lcd.writeString(3, 23, TEXT("f"));
lcd.writeString(3+6, 23, exp_name);
}
if(camera.isoName(exp_name, camera.iso))
{
lcd.writeString(3, 31, TEXT("ISO"));
lcd.writeString(3+24, 31, exp_name);
}
menu.setTitle(TEXT("Camera Info"));
menu.setBar(TEXT("RETURN"), TEXT("PHOTO"));
lcd.update();
connectUSBcamera = 1;
}
else
{
lcd.cls();
lcd.writeString(3, 7, TEXT(" Connected! "));
lcd.writeString(3, 15, TEXT(" Retrieving "));
lcd.writeString(3, 23, TEXT(" Device "));
lcd.writeString(3, 31, TEXT(" Info... "));
menu.setTitle(TEXT("Camera Info"));
menu.setBar(TEXT("RETURN"), BLANK_STR);
lcd.update();
connectUSBcamera = 1;
}
}
else
{
lcd.cls();
lcd.writeString(3, 7, TEXT("Plug camera "));
lcd.writeString(3, 15, TEXT("into left USB"));
lcd.writeString(3, 23, TEXT("port... "));
lcd.writeString(3, 31, TEXT(" "));
menu.setTitle(TEXT("Connect USB"));
menu.setBar(TEXT("CANCEL"), BLANK_STR);
lcd.update();
connectUSBcamera = 1;
}
}
if(key == FL_KEY || key == LEFT_KEY)
{
if(!PTP_Connected)
connectUSBcamera = 0;
return FN_CANCEL;
}
else if(key == FR_KEY)
{
if(PTP_Ready) camera.capture();
}
else if(key == UP_KEY)
{
if(PTP_Ready) camera.isoUp(camera.iso);
}
else if(key == DOWN_KEY)
{
if(PTP_Ready) camera.isoDown(camera.iso);
}
return FN_CONTINUE;
}