Navigation code shared and improved (#6923)

This commit is contained in:
Bertrand Songis
2019-10-10 14:03:49 +02:00
committed by GitHub
parent 200d2f3357
commit aee77ed9e9
6 changed files with 28 additions and 18 deletions
+15
View File
@@ -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);