Unify behavior of menu items with questions/warnings (#157)

This commit is contained in:
Jan Krupička
2017-12-15 23:31:50 +01:00
committed by Ben V. Brown
parent 4c0ba72542
commit 538a741912
6 changed files with 138 additions and 118 deletions

View File

@@ -20,6 +20,7 @@ extern const enum ShortNameType SettingsShortNameType;
extern const char* SettingsShortNames[16][2];
extern const char* SettingsLongNames[16];
extern const char* SettingsCalibrationWarning;
extern const char* SettingsResetWarning;
extern const char* UVLOWarningString;
extern const char* SleepingSimpleString;
extern const char* SleepingAdvancedString;
@@ -32,5 +33,6 @@ extern const char SettingRightChar;
extern const char SettingLeftChar;
extern const char SettingAutoChar;
#define LANG_CS_CZ
#endif /* TRANSLATION_H_ */

View File

@@ -28,6 +28,6 @@ typedef struct {
const state_func draw;
} menuitem;
extern bool settingsResetRequest;
extern const menuitem settingsMenu[];
#endif /* GUI_H_ */

View File

@@ -1,11 +1,13 @@
#ifndef __MAIN_H
#define __MAIN_H
#include <MMA8652FC.hpp>
#include "Setup.h"
#include "OLED.hpp"
extern OLED lcd;
extern MMA8652FC accel;
enum ButtonState {
BUTTON_NONE = 0, /* No buttons pressed / < filter time*/
BUTTON_F_SHORT = 1, /* User has pressed the front button*/
@@ -20,6 +22,8 @@ enum ButtonState {
* holding means it has gone low, and been low for longer than filter time
*/
};
ButtonState getButtonState();
void waitForButtonPressOrTimeout(uint32_t timeout);
#endif /* __MAIN_H */