|
11 | 11 | #include "ResetLCDScreen.h" |
12 | 12 | #include "SeeDeviceAddress.h" |
13 | 13 | #include "SeeDeviceUptime.h" |
| 14 | +#include "SeeFreeMemory.h" |
14 | 15 | #include "SeeGoogleMins.h" |
15 | 16 | #include "SeeLogFile.h" |
16 | 17 | #include "SeePHSlope.h" |
|
30 | 31 | #include "TemperatureCalibration.h" |
31 | 32 |
|
32 | 33 | MainMenu::MainMenu(TankControllerLib *tc) : UIState(tc) { |
33 | | - viewMenus[VIEW_GOOGLE_MINS] = String("View Google mins"); |
34 | | - viewMenus[VIEW_ADDRESS] = String("View IP and MAC "); |
35 | | - viewMenus[VIEW_LOG_FILE] = String("View log file "); |
36 | | - viewMenus[VIEW_PID] = String("View PID "); |
37 | | - viewMenus[VIEW_PH_SLOPE] = String("View pH slope "); |
38 | | - viewMenus[VIEW_TANK_ID] = String("View tank ID "); |
39 | | - viewMenus[VIEW_TIME] = String("View time "); |
40 | | - viewMenus[VIEW_VERSION] = String("View version "); |
| 34 | + viewMenus[VIEW_GOOGLE_MINS] = "View Google mins"; |
| 35 | + viewMenus[VIEW_ADDRESS] = "View IP and MAC"; |
| 36 | + viewMenus[VIEW_FREE_MEMORY] = "View free memory"; |
| 37 | + viewMenus[VIEW_LOG_FILE] = "View log file"; |
| 38 | + viewMenus[VIEW_PID] = "View PID"; |
| 39 | + viewMenus[VIEW_PH_SLOPE] = "View pH slope"; |
| 40 | + viewMenus[VIEW_TANK_ID] = "View tank ID"; |
| 41 | + viewMenus[VIEW_TIME] = "View time"; |
| 42 | + viewMenus[VIEW_VERSION] = "View version"; |
41 | 43 |
|
42 | | - setMenus[SET_CALIBRATION] = String("pH calibration "); |
43 | | - setMenus[SET_CALIBRATION_CLEAR] = String("Clear pH calibra"); |
44 | | - setMenus[SET_CHILL_OR_HEAT] = String("Set chill/heat "); |
45 | | - setMenus[SET_GOOGLE_MINS] = String("Set Google mins "); |
46 | | - setMenus[SET_PH] = String("Set pH target "); |
47 | | - setMenus[SET_KD] = String("Set KD "); |
48 | | - setMenus[SET_KI] = String("Set KI "); |
49 | | - setMenus[SET_KP] = String("Set KP "); |
50 | | - setMenus[SET_PID_ON_OFF] = String("PID on/off "); |
51 | | - setMenus[SET_TANK_ID] = String("Set Tank ID "); |
52 | | - setMenus[SET_TEMP_CALIBRATION] = String("Temp calibration"); |
53 | | - setMenus[SET_TEMPERATURE] = String("Set temperature "); |
54 | | - setMenus[SET_TIME] = String("Set date/time "); |
| 44 | + setMenus[SET_CALIBRATION] = "pH calibration"; |
| 45 | + setMenus[SET_CALIBRATION_CLEAR] = "Clear pH calibra"; |
| 46 | + setMenus[SET_CHILL_OR_HEAT] = "Set chill/heat"; |
| 47 | + setMenus[SET_GOOGLE_MINS] = "Set Google mins"; |
| 48 | + setMenus[SET_PH] = "Set pH target"; |
| 49 | + setMenus[SET_KD] = "Set KD"; |
| 50 | + setMenus[SET_KI] = "Set KI"; |
| 51 | + setMenus[SET_KP] = "Set KP"; |
| 52 | + setMenus[SET_PID_ON_OFF] = "PID on/off"; |
| 53 | + setMenus[SET_TANK_ID] = "Set Tank ID"; |
| 54 | + setMenus[SET_TEMP_CALIBRATION] = "Temp calibration"; |
| 55 | + setMenus[SET_TEMPERATURE] = "Set temperature"; |
| 56 | + setMenus[SET_TIME] = "Set date/time"; |
55 | 57 | } |
56 | 58 |
|
57 | 59 | /** |
@@ -140,6 +142,9 @@ void MainMenu::selectView() { |
140 | 142 | case VIEW_ADDRESS: |
141 | 143 | this->setNextState(static_cast<UIState *>(new SeeDeviceAddress(tc))); |
142 | 144 | break; |
| 145 | + case VIEW_FREE_MEMORY: |
| 146 | + this->setNextState(static_cast<UIState *>(new SeeFreeMemory(tc))); |
| 147 | + break; |
143 | 148 | case VIEW_LOG_FILE: |
144 | 149 | this->setNextState(static_cast<UIState *>(new SeeLogFile(tc))); |
145 | 150 | break; |
@@ -236,13 +241,13 @@ void MainMenu::loop() { |
236 | 241 | if (level2 == -1) { |
237 | 242 | LiquidCrystal_TC::instance()->writeLine("View settings", 0); |
238 | 243 | } else { |
239 | | - LiquidCrystal_TC::instance()->writeLine(viewMenus[level2].c_str(), 0); |
| 244 | + LiquidCrystal_TC::instance()->writeLine(viewMenus[level2], 0); |
240 | 245 | } |
241 | 246 | } else { |
242 | 247 | if (level2 == -1) { |
243 | 248 | LiquidCrystal_TC::instance()->writeLine("Change settings ", 0); |
244 | 249 | } else { |
245 | | - LiquidCrystal_TC::instance()->writeLine(setMenus[level2].c_str(), 0); |
| 250 | + LiquidCrystal_TC::instance()->writeLine(setMenus[level2], 0); |
246 | 251 | } |
247 | 252 | } |
248 | 253 | LiquidCrystal_TC::instance()->writeLine("<4 ^2 8v 6>", 1); |
|
0 commit comments