Commit abf959fa authored by João Lino's avatar João Lino

menus sorted

menus sorted
parent d5ea03fd
...@@ -118,6 +118,7 @@ typedef struct menuData_ { ...@@ -118,6 +118,7 @@ typedef struct menuData_ {
int _position; int _position;
int _selection; int _selection;
bool _repaint; bool _repaint;
void (*_selectionFunction)(void);
} MenuData; } MenuData;
#endif #endif
...@@ -17,6 +17,14 @@ ...@@ -17,6 +17,14 @@
#include "CustomDataStructures.h" #include "CustomDataStructures.h"
#include "debug.h" #include "debug.h"
// ++++++++++++++++++++++++ FUNCTIONS (used in configuration) +++++++++++++++++++++++++++++++++
void runMainMenuSelection();
void runStartFromStageSelection();
void runBeerProfileSelection();
void runStageSelection();
void runMaltSelection();
void runSettingsSelection();
#include "config.h" #include "config.h"
#include "Melody.h" #include "Melody.h"
...@@ -38,13 +46,9 @@ void xWelcomeUser(); ...@@ -38,13 +46,9 @@ void xWelcomeUser();
void runMenu(); void runMenu();
void runSettingsSelection(); void runMenuProcessor( MenuData *data );
void runMaltSelection(); void runStageSelection_Generic( unsigned long * selectedStageTime, int *selectedStageTemperature);
void runStageSelection();
void runBeerProfileSelection();
void xStartStage( unsigned long *stageTime, int *stageTemperature, eCookingStages nextStage, bool bPurgePump, bool bSetFinalYield, bool bSetTime, bool bSetTemperature ); void xStartStage( unsigned long *stageTime, int *stageTemperature, eCookingStages nextStage, bool bPurgePump, bool bSetFinalYield, bool bSetTime, bool bSetTemperature );
...@@ -52,10 +56,6 @@ void xStartStageHeadless( eCookingStages nextStage, bool bPurgePump ); ...@@ -52,10 +56,6 @@ void xStartStageHeadless( eCookingStages nextStage, bool bPurgePump );
void xStartStageInteractive( unsigned long *stageTime, int *stageTemperature, eCookingStages nextStage ); void xStartStageInteractive( unsigned long *stageTime, int *stageTemperature, eCookingStages nextStage );
void runStartFromStageSelection();
void runMainMenuSelection();
void xCountTheTime( int temperatureRange, boolean bAverageUpDown ); void xCountTheTime( int temperatureRange, boolean bAverageUpDown );
bool isTimeLeft(); bool isTimeLeft();
......
This diff is collapsed.
...@@ -95,36 +95,45 @@ ...@@ -95,36 +95,45 @@
#define MENU_MAIN_INIT_POSITION eMainMenu_GO #define MENU_MAIN_INIT_POSITION eMainMenu_GO
#define MENU_MAIN_INIT_SELECTION eMainMenu_NULL #define MENU_MAIN_INIT_SELECTION eMainMenu_NULL
#define MENU_MAIN_INIT_REPAINT false #define MENU_MAIN_INIT_REPAINT false
#define MENU_MAIN_FUNCTION &runMainMenuSelection
#define MENU_PROFILE_TITLE "Profile Menu" #define MENU_PROFILE_TITLE "Profile Menu"
#define MENU_PROFILE_DIALOG {"", "-> Basic ", "-> Trigo ", "-> IPA ", "-> Belga ", "-> Red ", "-> APA ", "-> Custom ", "-> Back " } #define MENU_PROFILE_DIALOG {"", "-> Basic ", "-> Trigo ", "-> IPA ", "-> Belga ", "-> Red ", "-> APA ", "-> Custom ", "-> Back " }
#define MENU_PROFILE_INIT_POSITION eBeerProfileMenu_Basic #define MENU_PROFILE_INIT_POSITION eBeerProfileMenu_Basic
#define MENU_PROFILE_INIT_SELECTION eBeerProfileMenu_NULL #define MENU_PROFILE_INIT_SELECTION eBeerProfileMenu_NULL
#define MENU_PROFILE_INIT_REPAINT false #define MENU_PROFILE_INIT_REPAINT false
#define MENU_PROFILE_FUNCTION &runBeerProfileSelection
#define MENU_STAGE_TITLE "Stage Menu" #define MENU_STAGE_TITLE "Stage Menu"
#define MENU_STAGE_DIALOG {"", "-> Startpoint ", "-> BetaGlucanase", "-> Debranching ", "-> Proteolytic ", "-> Beta Amylase ", "-> Alpha Amylase", "-> Mashout ", "-> Recirculation", "-> Sparge ", "-> Boil ", "-> Cooling ", "-> Back " } #define MENU_STAGE_DIALOG {"", "-> Startpoint ", "-> BetaGlucanase", "-> Debranching ", "-> Proteolytic ", "-> Beta Amylase ", "-> Alpha Amylase", "-> Mashout ", "-> Recirculation", "-> Sparge ", "-> Boil ", "-> Cooling ", "-> Back " }
#define MENU_STAGE_INIT_POSITION eStageMenu_Startpoint #define MENU_STAGE_INIT_POSITION eStageMenu_Startpoint
#define MENU_STAGE_INIT_SELECTION eStageMenu_NULL #define MENU_STAGE_INIT_SELECTION eStageMenu_NULL
#define MENU_STAGE_INIT_REPAINT false #define MENU_STAGE_INIT_REPAINT false
#define MENU_STAGE_FUNCTION &runStageSelection
#define MENU_MALT_TITLE "Malt Menu" #define MENU_MALT_TITLE "Malt Menu"
#define MENU_MALT_DIALOG {"", "-> CM Ch. Pilsen", "-> CM Wheat Blan", "-> Back " } #define MENU_MALT_DIALOG {"", "-> CM Ch. Pilsen", "-> CM Wheat Blan", "-> Back " }
#define MENU_MALT_INIT_POSITION eMaltMenu_CastleMalting_Chteau_Pilsen_2RS #define MENU_MALT_INIT_POSITION eMaltMenu_CastleMalting_Chteau_Pilsen_2RS
#define MENU_MALT_INIT_SELECTION eMaltMenu_NULL #define MENU_MALT_INIT_SELECTION eMaltMenu_NULL
#define MENU_MALT_INIT_REPAINT false #define MENU_MALT_INIT_REPAINT false
#define MENU_MALT_FUNCTION &runMaltSelection
#define MENU_SETTINGS_TITLE "Settings Menu" #define MENU_SETTINGS_TITLE "Settings Menu"
#define MENU_SETTINGS_DIALOG {"", "-> PT100 Element", "-> PT100 Up ", "-> PT100 Down ", "-> Back " } #define MENU_SETTINGS_DIALOG {"", "-> PT100 Element", "-> PT100 Up ", "-> PT100 Down ", "-> Back " }
#define MENU_SETTINGS_INIT_POSITION eSettingsMenu_PT100_Element #define MENU_SETTINGS_INIT_POSITION eSettingsMenu_PT100_Element
#define MENU_SETTINGS_INIT_SELECTION eSettingsMenu_NULL #define MENU_SETTINGS_INIT_SELECTION eSettingsMenu_NULL
#define MENU_SETTINGS_INIT_REPAINT false #define MENU_SETTINGS_INIT_REPAINT false
#define MENU_SETTINGS_FUNCTION &runSettingsSelection
#define MENU_GLOBAL_STR_TEMPERATURE "temperature"
#define MENU_GLOBAL_STR_CELSIUS "*C"
#define MENU_START_TITLE MENU_STAGE_TITLE #define MENU_START_TITLE MENU_STAGE_TITLE
#define MENU_START_DIALOG MENU_STAGE_DIALOG #define MENU_START_DIALOG MENU_STAGE_DIALOG
#define MENU_START_INIT_POSITION MENU_STAGE_INIT_POSITION #define MENU_START_INIT_POSITION MENU_STAGE_INIT_POSITION
#define MENU_START_INIT_SELECTION MENU_STAGE_INIT_SELECTION #define MENU_START_INIT_SELECTION MENU_STAGE_INIT_SELECTION
#define MENU_START_INIT_REPAINT MENU_STAGE_INIT_REPAINT #define MENU_START_INIT_REPAINT MENU_STAGE_INIT_REPAINT
#define MENU_START_FUNCTION &runStartFromStageSelection
// ++++++++++++++++++++++++ Serial Monotor ++++++++++++++++++++++++ // ++++++++++++++++++++++++ Serial Monotor ++++++++++++++++++++++++
#define SETTING_SERIAL_MONITOR_BAUD_RATE 9600 #define SETTING_SERIAL_MONITOR_BAUD_RATE 9600
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment