本文整理汇总了C++中LCD::writeNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ LCD::writeNumber方法的具体用法?C++ LCD::writeNumber怎么用?C++ LCD::writeNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LCD
的用法示例。
在下文中一共展示了LCD::writeNumber方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
示例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;
}