本文整理汇总了C++中MENU::spawn方法的典型用法代码示例。如果您正苦于以下问题:C++ MENU::spawn方法的具体用法?C++ MENU::spawn怎么用?C++ MENU::spawn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MENU
的用法示例。
在下文中一共展示了MENU::spawn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: timerStatus
volatile char timerStatus(char key, char first)
{
static uint8_t counter;
if(first)
{
counter = 0;
}
if(counter++ > 3)
{
counter = 0;
lcd.cls();
displayTimerStatus(0);
menu.setTitle(TEXT("Running"));
menu.setBar(TEXT(""), TEXT("STOP"));
lcd.update();
}
if(!timer.running) return FN_CANCEL;
if(key == FR_KEY)
{
menu.push();
menu.spawn((void*)timerStop);
return FN_JUMP;
}
return FN_CONTINUE;
}
示例2: runHandler
volatile char runHandler(char key, char first)
{
static char pressed;
if(first)
{
pressed = key;
key = 0;
}
if(pressed == FR_KEY)
{
menu.message(TEXT("Timer Started"));
timer.begin();
menu.spawn((void*)timerStatus);
return FN_JUMP;
}
menu.push();
menu.select(0);
menu.init((menu_item*)menu_options);
lcd.update();
return FN_CANCEL;
}
示例3: timerRemoteStart
volatile char timerRemoteStart(char key, char first)
{
menu.message(TEXT("Started Remote"));
remote.set(REMOTE_PROGRAM);
remote.set(REMOTE_START);
menu.spawn((void*)timerStatusRemote);
return FN_JUMP;
}
示例4: hardware_off
void hardware_off(void)
{
hardware_flashlight(0);
if(battery_status() == 0)
{
//if(timer.cableIsConnected())
//{
// menu.message(STR("Error: Cable"));
//}
//else
//{
shutter_off();
// Save the current time-lapse settings to nv-mem
timer.saveCurrent();
// If USB is used, detach from the bus
USB_Detach();
// Shutdown bluetooth
bt.disconnect();
bt.sleep();
// Disable all interrupts
cli();
// Shutdown
setHigh(POWER_HOLD_PIN);
FOREVER;
//}
}
else // Plugged in
{
// Charging screen //
clock.sleeping = 1;
menu.spawn((void *) batteryStatus);
}
}