Navigation code shared and improved (#6923)
This commit is contained in:
@@ -38,6 +38,21 @@
|
||||
#define CASE_EVT_ROTARY_RIGHT
|
||||
#endif
|
||||
|
||||
#if defined(NAVIGATION_X7) || defined(NAVIGATION_X9D) || defined(NAVIGATION_HORUS)
|
||||
inline uint8_t MENU_FIRST_LINE_EDIT(const uint8_t * horTab, uint8_t horTabMax)
|
||||
{
|
||||
if (horTab) {
|
||||
uint8_t result = 0;
|
||||
while (result < horTabMax && horTab[result] >= HIDDEN_ROW)
|
||||
++result;
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef bool (*IsValueAvailable)(int);
|
||||
|
||||
int circularIncDec(int current, int inc, int min, int max, IsValueAvailable isValueAvailable=nullptr);
|
||||
|
||||
Reference in New Issue
Block a user