Swapped short/long press for option: short is now the menu, long turns the display off
Swapped Reset and Cancel in menu: Cancel is now the default
This commit is contained in:
parent
b6974d9e80
commit
b7d7bf405f
|
@ -24,16 +24,16 @@ void handleCounterScreen()
|
|||
{
|
||||
if (button_is_pressed_short(&buttonOption))
|
||||
{
|
||||
// Turn off power to the screen
|
||||
if (powerState == On)
|
||||
setPowerState(ManualOff);
|
||||
|
||||
setCurrentScreen(Menu);
|
||||
return;
|
||||
}
|
||||
|
||||
if (button_is_pressed_long(&buttonOption))
|
||||
{
|
||||
setCurrentScreen(Menu);
|
||||
// Turn off power to the screen
|
||||
if (powerState == On)
|
||||
setPowerState(ManualOff);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include "counter.h"
|
||||
|
||||
|
||||
#define MenuItemReset 0
|
||||
#define MenuItemCancel 1
|
||||
#define MenuCount MenuItemCancel + 1
|
||||
#define MenuItemCancel 0
|
||||
#define MenuItemReset 1
|
||||
#define MenuCount MenuItemReset + 1
|
||||
|
||||
|
||||
uint8_t currentIndex = 0;
|
||||
|
@ -68,8 +68,8 @@ void drawMenu()
|
|||
{
|
||||
// Since there are only two items at the moment, they're always going to be
|
||||
// involved in the change, so simply repaint them.
|
||||
drawMenuItem(MenuItemReset, "Reset ");
|
||||
drawMenuItem(MenuItemCancel, "Cancel ");
|
||||
drawMenuItem(MenuItemReset, "Reset ");
|
||||
|
||||
|
||||
// Can't use sprintf because that'll use up more than the
|
||||
|
|
Loading…
Reference in New Issue