mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
OME_Funcall now chains functions based on p->func's return value
This commit is contained in:
parent
f1035c52eb
commit
fc1c8d7596
2 changed files with 13 additions and 2 deletions
|
@ -675,7 +675,16 @@ STATIC_UNIT_TESTED uint16_t cmsHandleKey(displayPort_t *pDisplay, uint8_t key)
|
|||
}
|
||||
break;
|
||||
|
||||
case OME_Funcall:
|
||||
case OME_Funcall:;
|
||||
long retval;
|
||||
if (p->func && key == KEY_RIGHT) {
|
||||
retval = p->func(pDisplay, p->data);
|
||||
if (retval == MENU_CHAIN_BACK)
|
||||
cmsMenuBack(pDisplay);
|
||||
res = BUTTON_PAUSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case OME_OSD_Exit:
|
||||
if (p->func && key == KEY_RIGHT) {
|
||||
p->func(pDisplay, p->data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue