本文整理汇总了C++中MENU::refresh方法的典型用法代码示例。如果您正苦于以下问题:C++ MENU::refresh方法的具体用法?C++ MENU::refresh怎么用?C++ MENU::refresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MENU
的用法示例。
在下文中一共展示了MENU::refresh方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: event
void Remote::event()
{
switch(bt.event)
{
case BT_EVENT_DISCONNECT:
connected = 0;
break;
case BT_EVENT_CONNECT:
connected = 1;
break;
case BT_EVENT_DATA:
switch(bt.dataId)
{
case REMOTE_STATUS:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) memcpy(&status, bt.data, bt.dataSize);
if(bt.dataType == REMOTE_TYPE_SET) memcpy(&status, bt.data, bt.dataSize);
break;
case REMOTE_PROGRAM:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) memcpy(¤t, bt.data, bt.dataSize);
if(bt.dataType == REMOTE_TYPE_SET)
{
memcpy((void*)&timer.current, bt.data, bt.dataSize);
menu.refresh();
}
break;
case REMOTE_BATTERY:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) memcpy(&battery, bt.data, 1);
if(bt.dataType == REMOTE_TYPE_SET) memcpy(&battery, bt.data, 1);
break;
case REMOTE_START:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(timer.running ? REMOTE_START : REMOTE_STOP, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) running = 1;
if(bt.dataType == REMOTE_TYPE_SET) runHandler(FR_KEY, 1);
break;
case REMOTE_STOP:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(timer.running ? REMOTE_START : REMOTE_STOP, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) running = 0;
if(bt.dataType == REMOTE_TYPE_SET) timerStop(FR_KEY, 1);
break;
default:
return;
}
bt.event = BT_EVENT_NULL;
break;
}
requestActive = 0;
}
示例2: updateConditions
void updateConditions()
{
if(timerNotRunning != !timer.running) menu.refresh();
timerNotRunning = !timer.running;
modeTimelapse = (timer.current.Mode & TIMELAPSE);
modeHDR = (timer.current.Mode & HDR);
modeStandard = (!modeHDR && !modeRamp);
modeRamp = (timer.current.Mode & RAMP);
modeRampKeyAdd = (modeRamp && (timer.current.Keyframes < MAX_KEYFRAMES));
modeRampKeyDel = (modeRamp && (timer.current.Keyframes > 1));
bulb1 = timer.current.Keyframes > 1 && modeRamp;
bulb2 = timer.current.Keyframes > 2 && modeRamp;
bulb3 = timer.current.Keyframes > 3 && modeRamp;
bulb4 = timer.current.Keyframes > 4 && modeRamp;
showGap = timer.current.Photos != 1 && modeTimelapse;
showRemoteStart = (remote.connected && !remote.running);
clock.sleepOk = timerNotRunning && !timer.cableIsConnected() && bt.state != BT_ST_CONNECTED && sleepOk;
}
示例3: event
void Remote::event()
{
switch(bt.event)
{
case BT_EVENT_DISCONNECT:
notify.unWatch(&remote_notify); // stop all active notifications
//debug(STR("REMOTE::EVENT: Disconnected\r\n"));
connected = 0;
break;
case BT_EVENT_CONNECT:
connected = 1;
//debug(STR("REMOTE::EVENT: Connected\r\n"));
request(REMOTE_MODEL);
break;
case BT_EVENT_DATA:
switch(bt.dataId)
{
case REMOTE_STATUS:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND && bt.dataSize == sizeof(timer_status)) memcpy(&status, bt.data, bt.dataSize);
if(bt.dataType == REMOTE_TYPE_NOTIFY_WATCH) notify.watch(REMOTE_STATUS, (void *)&timer.status, sizeof(timer.status), &remote_notify);
if(bt.dataType == REMOTE_TYPE_NOTIFY_UNWATCH) notify.unWatch(REMOTE_STATUS, &remote_notify);
break;
case REMOTE_PROGRAM:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND && bt.dataSize == sizeof(program)) memcpy(¤t, bt.data, bt.dataSize);
if(bt.dataType == REMOTE_TYPE_SET && bt.dataSize == sizeof(program))
{
memcpy((void*)&timer.current, bt.data, bt.dataSize);
menu.refresh();
}
if(bt.dataType == REMOTE_TYPE_NOTIFY_WATCH) notify.watch(REMOTE_PROGRAM, (void *)&timer.current, sizeof(timer.current), &remote_notify);
if(bt.dataType == REMOTE_TYPE_NOTIFY_UNWATCH) notify.unWatch(REMOTE_PROGRAM, &remote_notify);
break;
case REMOTE_BATTERY:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) memcpy(&battery, bt.data, bt.dataSize);
if(bt.dataType == REMOTE_TYPE_NOTIFY_WATCH) notify.watch(REMOTE_BATTERY, (void *)&battery_percent, sizeof(battery_percent), &remote_notify);
if(bt.dataType == REMOTE_TYPE_NOTIFY_UNWATCH) notify.unWatch(REMOTE_BATTERY, &remote_notify);
break;
case REMOTE_START:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(timer.running ? REMOTE_START : REMOTE_STOP, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) running = 1;
if(bt.dataType == REMOTE_TYPE_SET) runHandler(FR_KEY, 1);
if(bt.dataType == REMOTE_TYPE_NOTIFY_WATCH) notify.watch(REMOTE_START, (void *)&timer.running, sizeof(timer.running), &remote_notify);
if(bt.dataType == REMOTE_TYPE_NOTIFY_UNWATCH) notify.unWatch(REMOTE_START, &remote_notify);
break;
case REMOTE_STOP:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(timer.running ? REMOTE_START : REMOTE_STOP, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) running = 0;
if(bt.dataType == REMOTE_TYPE_SET) timerStop(FR_KEY, 1);
if(bt.dataType == REMOTE_TYPE_NOTIFY_WATCH) notify.watch(REMOTE_START, (void *)&timer.running, sizeof(timer.running), &remote_notify);
if(bt.dataType == REMOTE_TYPE_NOTIFY_UNWATCH) notify.unWatch(REMOTE_START, &remote_notify);
break;
case REMOTE_BULB_START:
if(bt.dataType == REMOTE_TYPE_SET) timer.bulbStart();
break;
case REMOTE_BULB_END:
if(bt.dataType == REMOTE_TYPE_SET) timer.bulbEnd();
break;
case REMOTE_CAPTURE:
if(bt.dataType == REMOTE_TYPE_SET) timer.capture();
break;
case REMOTE_MODEL:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(REMOTE_MODEL, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SEND) memcpy(&model, bt.data, bt.dataSize);
break;
case REMOTE_FIRMWARE:
case REMOTE_BT_FW_VERSION:
case REMOTE_PROTOCOL_VERSION:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
break;
case REMOTE_CAMERA_FPS:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_NOTIFY_WATCH) notify.watch(REMOTE_CAMERA_FPS, (void *)&conf.cameraFPS, sizeof(conf.cameraFPS), &remote_notify);
if(bt.dataType == REMOTE_TYPE_NOTIFY_UNWATCH) notify.unWatch(REMOTE_CAMERA_FPS, &remote_notify);
break;
case REMOTE_CAMERA_MAKE:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_NOTIFY_WATCH) notify.watch(REMOTE_CAMERA_MAKE, (void *)&conf.cameraMake, sizeof(conf.cameraMake), &remote_notify);
if(bt.dataType == REMOTE_TYPE_NOTIFY_UNWATCH) notify.unWatch(REMOTE_CAMERA_MAKE, &remote_notify);
break;
case REMOTE_DEBUG:
if(bt.dataType == REMOTE_TYPE_SEND)
{
bt.data[bt.dataSize] = 0;
debug_remote(bt.data);
}
break;
case REMOTE_ISO:
if(bt.dataType == REMOTE_TYPE_REQUEST) send(bt.dataId, REMOTE_TYPE_SEND);
if(bt.dataType == REMOTE_TYPE_SET && bt.dataSize == sizeof(uint8_t))
{
uint8_t tmp;
memcpy((void*)&tmp, bt.data, bt.dataSize);
camera.setISO(tmp);
}
break;
//.........这里部分代码省略.........