Browse Source

increased version to 0.2, added links, refactored statemachine enum

Thomas Buck 3 years ago
parent
commit
7fa4a40284
5 changed files with 78 additions and 75 deletions
  1. 9
    9
      include/Statemachine.h
  2. 1
    1
      include/config.h
  3. 4
    2
      src/SimpleUpdater.cpp
  4. 60
    60
      src/Statemachine.cpp
  5. 4
    3
      src/WifiStuff.cpp

+ 9
- 9
include/Statemachine.h View File

11
         init = 0,
11
         init = 0,
12
         menu, // auto, pumps, valves
12
         menu, // auto, pumps, valves
13
         
13
         
14
-        menu_auto, // select mode
15
-        menu_auto_fertilizer, // select fertilizer
16
-        menu_auto_fertilizer_running,
17
-        menu_auto_reservoir_running,
18
-        menu_auto_plant, // select plant
19
-        menu_auto_plant_running,
20
-        menu_auto_done,
14
+        auto_mode, // select mode
15
+        auto_fert, // select fertilizer
16
+        auto_fert_run,
17
+        auto_tank_run,
18
+        auto_plant, // select plant
19
+        auto_plant_run,
20
+        auto_done,
21
         
21
         
22
         menu_pumps, // selet pump
22
         menu_pumps, // selet pump
23
         menu_pumps_time, // set runtime
23
         menu_pumps_time, // set runtime
24
         menu_pumps_go, // running
24
         menu_pumps_go, // running
25
-        menu_pumps_running,
25
+        menu_pumps_run,
26
         menu_pumps_done,
26
         menu_pumps_done,
27
         
27
         
28
         menu_valves, // select valve
28
         menu_valves, // select valve
29
         menu_valves_time, // set runtime
29
         menu_valves_time, // set runtime
30
         menu_valves_go, // running
30
         menu_valves_go, // running
31
-        menu_valves_running,
31
+        menu_valves_run,
32
         menu_valves_done,
32
         menu_valves_done,
33
         
33
         
34
         error
34
         error

+ 1
- 1
include/config.h View File

15
 #define MAX_AUTO_PLANT_RUNTIME 15
15
 #define MAX_AUTO_PLANT_RUNTIME 15
16
 
16
 
17
 // Sketch version
17
 // Sketch version
18
-#define FIRMWARE_VERSION "0.1"
18
+#define FIRMWARE_VERSION "0.2"
19
 
19
 
20
 // all given in milliseconds
20
 // all given in milliseconds
21
 #define SERVER_HANDLE_INTERVAL 10
21
 #define SERVER_HANDLE_INTERVAL 10

+ 4
- 2
src/SimpleUpdater.cpp View File

32
         "</head><body>\n"
32
         "</head><body>\n"
33
         
33
         
34
         "<h1>SimpleUpdater</h1>\n"
34
         "<h1>SimpleUpdater</h1>\n"
35
+        "<p>Select the update file. If you have built this project with PlatformIO, you can find a firmware.bin in the .pio folder.</p>\n"
35
         "<form method='POST' action='#' enctype='multipart/form-data' id='upload_form'>\n"
36
         "<form method='POST' action='#' enctype='multipart/form-data' id='upload_form'>\n"
36
         "<input type='file' name='update' accept='.bin'>\n"
37
         "<input type='file' name='update' accept='.bin'>\n"
37
         "<input type='submit' value='Update'>\n"
38
         "<input type='submit' value='Update'>\n"
38
-        "</form>\n"
39
+        "</form><br>\n"
39
         "<div id='prg'>progress: 0%</div>\n"
40
         "<div id='prg'>progress: 0%</div>\n"
41
+        "<p>After the update is finished, you will automatically be redirected to the main page.</p>\n"
40
         "<a href=\"/\">Back to Main Page</a>\n"
42
         "<a href=\"/\">Back to Main Page</a>\n"
41
         
43
         
42
         "<script>\n"
44
         "<script>\n"
67
                     "}, 3000);\n"
69
                     "}, 3000);\n"
68
                 "},\n"
70
                 "},\n"
69
                 "error: function(a, b, c) {\n"
71
                 "error: function(a, b, c) {\n"
70
-                    "$('#prg').html('progress: error! redirecting...');\n"
72
+                    "$('#prg').html('progress: finished! redirecting...');\n"
71
                     "setTimeout(function() {\n"
73
                     "setTimeout(function() {\n"
72
                         "window.location.href = '/';\n"
74
                         "window.location.href = '/';\n"
73
                     "}, 1000);\n"
75
                     "}, 1000);\n"

+ 60
- 60
src/Statemachine.cpp View File

54
 static const char *state_names[] = {
54
 static const char *state_names[] = {
55
     stringify(init),
55
     stringify(init),
56
     stringify(menu),
56
     stringify(menu),
57
-    stringify(menu_auto),
58
-    stringify(menu_auto_fertilizer),
59
-    stringify(menu_auto_fertilizer_running),
60
-    stringify(menu_auto_reservoir_running),
61
-    stringify(menu_auto_plant),
62
-    stringify(menu_auto_plant_running),
63
-    stringify(menu_auto_done),
57
+    stringify(auto_mode),
58
+    stringify(auto_fert),
59
+    stringify(auto_fert_run),
60
+    stringify(auto_tank_run),
61
+    stringify(auto_plant),
62
+    stringify(auto_plant_run),
63
+    stringify(auto_done),
64
     stringify(menu_pumps),
64
     stringify(menu_pumps),
65
     stringify(menu_pumps_time),
65
     stringify(menu_pumps_time),
66
     stringify(menu_pumps_go),
66
     stringify(menu_pumps_go),
67
-    stringify(menu_pumps_running),
67
+    stringify(menu_pumps_run),
68
     stringify(menu_pumps_done),
68
     stringify(menu_pumps_done),
69
     stringify(menu_valves),
69
     stringify(menu_valves),
70
     stringify(menu_valves_time),
70
     stringify(menu_valves_time),
71
     stringify(menu_valves_go),
71
     stringify(menu_valves_go),
72
-    stringify(menu_valves_running),
72
+    stringify(menu_valves_run),
73
     stringify(menu_valves_done),
73
     stringify(menu_valves_done),
74
     stringify(error)
74
     stringify(error)
75
 };
75
 };
102
         switch_to(menu);
102
         switch_to(menu);
103
     } else if (state == menu) {
103
     } else if (state == menu) {
104
         if (n == 1) {
104
         if (n == 1) {
105
-            switch_to(menu_auto);
105
+            switch_to(auto_mode);
106
         } else if (n == 2) {
106
         } else if (n == 2) {
107
             switch_to(menu_pumps);
107
             switch_to(menu_pumps);
108
         } else if (n == 3) {
108
         } else if (n == 3) {
110
         } else if ((n == -1) || (n == -2)) {
110
         } else if ((n == -1) || (n == -2)) {
111
             switch_to(init);
111
             switch_to(init);
112
         }
112
         }
113
-    } else if (state == menu_auto) {
113
+    } else if (state == auto_mode) {
114
         if (n == 1) {
114
         if (n == 1) {
115
-            switch_to(menu_auto_fertilizer);
115
+            switch_to(auto_fert);
116
         } else if (n == 2) {
116
         } else if (n == 2) {
117
             auto wl = plants.getWaterlevel();
117
             auto wl = plants.getWaterlevel();
118
             if ((wl != Plants::full) && (wl != Plants::invalid)) {
118
             if ((wl != Plants::full) && (wl != Plants::invalid)) {
120
                 selected_id = plants.countPlants() + 1;
120
                 selected_id = plants.countPlants() + 1;
121
                 selected_time = MAX_TANK_FILL_TIME;
121
                 selected_time = MAX_TANK_FILL_TIME;
122
                 start_time = millis();
122
                 start_time = millis();
123
-                switch_to(menu_auto_reservoir_running);
123
+                switch_to(auto_tank_run);
124
             } else if (wl == Plants::full) {
124
             } else if (wl == Plants::full) {
125
                 stop_time = millis();
125
                 stop_time = millis();
126
-                switch_to(menu_auto);
126
+                switch_to(auto_mode);
127
             } else if (wl == Plants::invalid) {
127
             } else if (wl == Plants::invalid) {
128
                 error_condition = "Invalid sensor state";
128
                 error_condition = "Invalid sensor state";
129
-                state = menu_auto;
129
+                state = auto_mode;
130
                 switch_to(error);
130
                 switch_to(error);
131
             }
131
             }
132
         } else if (n == 3) {
132
         } else if (n == 3) {
133
-            switch_to(menu_auto_plant);
133
+            switch_to(auto_plant);
134
         } else if ((n == -1) || (n == -2)) {
134
         } else if ((n == -1) || (n == -2)) {
135
             switch_to(menu);
135
             switch_to(menu);
136
         }
136
         }
137
-    } else if (state == menu_auto_fertilizer) {
137
+    } else if (state == auto_fert) {
138
         if ((n >= 1) && (n <= 3)) {
138
         if ((n >= 1) && (n <= 3)) {
139
             auto wl = plants.getWaterlevel();
139
             auto wl = plants.getWaterlevel();
140
             if ((wl != Plants::full) && (wl != Plants::invalid)) {
140
             if ((wl != Plants::full) && (wl != Plants::invalid)) {
142
                 selected_id = n;
142
                 selected_id = n;
143
                 selected_time = AUTO_PUMP_RUNTIME;
143
                 selected_time = AUTO_PUMP_RUNTIME;
144
                 start_time = millis();
144
                 start_time = millis();
145
-                switch_to(menu_auto_fertilizer_running);
145
+                switch_to(auto_fert_run);
146
             } else if (wl == Plants::full) {
146
             } else if (wl == Plants::full) {
147
                 stop_time = millis();
147
                 stop_time = millis();
148
-                switch_to(menu_auto);
148
+                switch_to(auto_mode);
149
             } else if (wl == Plants::invalid) {
149
             } else if (wl == Plants::invalid) {
150
                 error_condition = "Invalid sensor state";
150
                 error_condition = "Invalid sensor state";
151
-                state = menu_auto;
151
+                state = auto_mode;
152
                 switch_to(error);
152
                 switch_to(error);
153
             }
153
             }
154
         } else if ((n == -1) || (n == -2)) {
154
         } else if ((n == -1) || (n == -2)) {
155
-            switch_to(menu_auto);
155
+            switch_to(auto_mode);
156
         }
156
         }
157
-    } else if (state == menu_auto_fertilizer_running) {
157
+    } else if (state == auto_fert_run) {
158
             plants.abort();
158
             plants.abort();
159
             stop_time = millis();
159
             stop_time = millis();
160
-            switch_to(menu_auto_done);
161
-    } else if (state == menu_auto_reservoir_running) {
160
+            switch_to(auto_done);
161
+    } else if (state == auto_tank_run) {
162
             plants.abort();
162
             plants.abort();
163
             stop_time = millis();
163
             stop_time = millis();
164
-            switch_to(menu_auto_done);
165
-    } else if (state == menu_auto_plant) {
164
+            switch_to(auto_done);
165
+    } else if (state == auto_plant) {
166
         if (n == -1) {
166
         if (n == -1) {
167
             if (db.hasDigits()) {
167
             if (db.hasDigits()) {
168
                 backspace();
168
                 backspace();
169
                 db.removeDigit();
169
                 db.removeDigit();
170
             } else {
170
             } else {
171
-                switch_to(menu_auto);
171
+                switch_to(auto_mode);
172
             }
172
             }
173
         } else if (n == -2) {
173
         } else if (n == -2) {
174
             if (!db.hasDigits()) {
174
             if (!db.hasDigits()) {
186
                     plants.startPlant(selected_id - 1);
186
                     plants.startPlant(selected_id - 1);
187
                     selected_time = MAX_AUTO_PLANT_RUNTIME;
187
                     selected_time = MAX_AUTO_PLANT_RUNTIME;
188
                     start_time = millis();
188
                     start_time = millis();
189
-                    switch_to(menu_auto_plant_running);
189
+                    switch_to(auto_plant_run);
190
                 } else if (wl == Plants::empty) {
190
                 } else if (wl == Plants::empty) {
191
                     stop_time = millis();
191
                     stop_time = millis();
192
-                    switch_to(menu_auto);
192
+                    switch_to(auto_mode);
193
                 } else if (wl == Plants::invalid) {
193
                 } else if (wl == Plants::invalid) {
194
                     error_condition = "Invalid sensor state";
194
                     error_condition = "Invalid sensor state";
195
-                    state = menu_auto;
195
+                    state = auto_mode;
196
                     switch_to(error);
196
                     switch_to(error);
197
                 }
197
                 }
198
             }
198
             }
203
                 backspace();
203
                 backspace();
204
             }
204
             }
205
         }
205
         }
206
-    } else if (state == menu_auto_plant_running) {
206
+    } else if (state == auto_plant_run) {
207
             plants.abort();
207
             plants.abort();
208
             stop_time = millis();
208
             stop_time = millis();
209
-            switch_to(menu_auto_done);
210
-    } else if (state == menu_auto_done) {
211
-        switch_to(menu_auto);
209
+            switch_to(auto_done);
210
+    } else if (state == auto_done) {
211
+        switch_to(auto_mode);
212
     } else if (state == menu_pumps) {
212
     } else if (state == menu_pumps) {
213
         if (n == -1) {
213
         if (n == -1) {
214
             if (db.hasDigits()) {
214
             if (db.hasDigits()) {
273
             auto wl = plants.getWaterlevel();
273
             auto wl = plants.getWaterlevel();
274
             if ((wl != Plants::full) && (wl != Plants::invalid)) {
274
             if ((wl != Plants::full) && (wl != Plants::invalid)) {
275
                 plants.startFertilizer(selected_id - 1);
275
                 plants.startFertilizer(selected_id - 1);
276
-                switch_to(menu_pumps_running);
276
+                switch_to(menu_pumps_run);
277
             } else if (wl == Plants::full) {
277
             } else if (wl == Plants::full) {
278
                 stop_time = millis();
278
                 stop_time = millis();
279
                 switch_to(menu_pumps_done);
279
                 switch_to(menu_pumps_done);
285
         } else {
285
         } else {
286
             switch_to(menu_pumps_time);
286
             switch_to(menu_pumps_time);
287
         }
287
         }
288
-    } else if (state == menu_pumps_running) {
288
+    } else if (state == menu_pumps_run) {
289
             plants.abort();
289
             plants.abort();
290
             stop_time = millis();
290
             stop_time = millis();
291
             switch_to(menu_pumps_done);
291
             switch_to(menu_pumps_done);
360
                     plants.startPlant(selected_id - 1);
360
                     plants.startPlant(selected_id - 1);
361
                 }
361
                 }
362
                 
362
                 
363
-                switch_to(menu_valves_running);
363
+                switch_to(menu_valves_run);
364
             } else if (wl == Plants::full) {
364
             } else if (wl == Plants::full) {
365
                 stop_time = millis();
365
                 stop_time = millis();
366
                 switch_to(menu_valves_done);
366
                 switch_to(menu_valves_done);
372
         } else {
372
         } else {
373
             switch_to(menu_valves_time);
373
             switch_to(menu_valves_time);
374
         }
374
         }
375
-    } else if (state == menu_valves_running) {
375
+    } else if (state == menu_valves_run) {
376
             plants.abort();
376
             plants.abort();
377
             stop_time = millis();
377
             stop_time = millis();
378
             switch_to(menu_valves_done);
378
             switch_to(menu_valves_done);
402
 }
402
 }
403
 
403
 
404
 void Statemachine::act(void) {
404
 void Statemachine::act(void) {
405
-    if ((state == menu_pumps_running) || (state == menu_valves_running)) {
405
+    if ((state == menu_pumps_run) || (state == menu_valves_run)) {
406
         unsigned long runtime = millis() - start_time;
406
         unsigned long runtime = millis() - start_time;
407
         if ((runtime / 1000UL) >= selected_time) {
407
         if ((runtime / 1000UL) >= selected_time) {
408
             // stop if timeout has been reached
408
             // stop if timeout has been reached
409
             plants.abort();
409
             plants.abort();
410
             stop_time = millis();
410
             stop_time = millis();
411
-            switch_to((state == menu_pumps_running) ? menu_pumps_done : menu_valves_done);
411
+            switch_to((state == menu_pumps_run) ? menu_pumps_done : menu_valves_done);
412
         } else if ((millis() - last_animation_time) >= 500) {
412
         } else if ((millis() - last_animation_time) >= 500) {
413
             // update animation if needed
413
             // update animation if needed
414
             last_animation_time = millis();
414
             last_animation_time = millis();
416
         }
416
         }
417
     }
417
     }
418
     
418
     
419
-    if ((state == menu_pumps_running) || ((state == menu_valves_running) && (selected_id == (plants.countPlants() + 1)))) {
419
+    if ((state == menu_pumps_run) || ((state == menu_valves_run) && (selected_id == (plants.countPlants() + 1)))) {
420
         // check water level state
420
         // check water level state
421
         auto wl = plants.getWaterlevel();
421
         auto wl = plants.getWaterlevel();
422
         if (wl == Plants::full) {
422
         if (wl == Plants::full) {
423
             plants.abort();
423
             plants.abort();
424
             stop_time = millis();
424
             stop_time = millis();
425
-            switch_to((state == menu_pumps_running) ? menu_pumps_done : menu_valves_done);
425
+            switch_to((state == menu_pumps_run) ? menu_pumps_done : menu_valves_done);
426
         } else if (wl == Plants::invalid) {
426
         } else if (wl == Plants::invalid) {
427
             plants.abort();
427
             plants.abort();
428
             error_condition = "Invalid sensor state";
428
             error_condition = "Invalid sensor state";
429
-            state = (state == menu_pumps_running) ? menu_pumps : menu_valves;
429
+            state = (state == menu_pumps_run) ? menu_pumps : menu_valves;
430
             switch_to(error);
430
             switch_to(error);
431
         }
431
         }
432
     }
432
     }
433
     
433
     
434
-    if ((state == menu_auto_fertilizer_running) || (state == menu_auto_reservoir_running)) {
434
+    if ((state == auto_fert_run) || (state == auto_tank_run)) {
435
         unsigned long runtime = millis() - start_time;
435
         unsigned long runtime = millis() - start_time;
436
         if ((runtime / 1000UL) >= selected_time) {
436
         if ((runtime / 1000UL) >= selected_time) {
437
             // stop if timeout has been reached
437
             // stop if timeout has been reached
438
             plants.abort();
438
             plants.abort();
439
             stop_time = millis();
439
             stop_time = millis();
440
-            switch_to(menu_auto_done);
440
+            switch_to(auto_done);
441
         } else if ((millis() - last_animation_time) >= 500) {
441
         } else if ((millis() - last_animation_time) >= 500) {
442
             // update animation if needed
442
             // update animation if needed
443
             last_animation_time = millis();
443
             last_animation_time = millis();
449
         if (wl == Plants::full) {
449
         if (wl == Plants::full) {
450
             plants.abort();
450
             plants.abort();
451
             stop_time = millis();
451
             stop_time = millis();
452
-            switch_to(menu_auto_done);
452
+            switch_to(auto_done);
453
         } else if (wl == Plants::invalid) {
453
         } else if (wl == Plants::invalid) {
454
             plants.abort();
454
             plants.abort();
455
             error_condition = "Invalid sensor state";
455
             error_condition = "Invalid sensor state";
456
-            state = menu_auto;
456
+            state = auto_mode;
457
             switch_to(error);
457
             switch_to(error);
458
         }
458
         }
459
     }
459
     }
460
         
460
         
461
-    if (state == menu_auto_plant_running) {
461
+    if (state == auto_plant_run) {
462
         unsigned long runtime = millis() - start_time;
462
         unsigned long runtime = millis() - start_time;
463
         if ((runtime / 1000UL) >= selected_time) {
463
         if ((runtime / 1000UL) >= selected_time) {
464
             // stop if timeout has been reached
464
             // stop if timeout has been reached
465
             plants.abort();
465
             plants.abort();
466
             stop_time = millis();
466
             stop_time = millis();
467
-            switch_to(menu_auto_done);
467
+            switch_to(auto_done);
468
         } else if ((millis() - last_animation_time) >= 500) {
468
         } else if ((millis() - last_animation_time) >= 500) {
469
             // update animation if needed
469
             // update animation if needed
470
             last_animation_time = millis();
470
             last_animation_time = millis();
476
         if (wl == Plants::empty) {
476
         if (wl == Plants::empty) {
477
             plants.abort();
477
             plants.abort();
478
             stop_time = millis();
478
             stop_time = millis();
479
-            switch_to(menu_auto_done);
479
+            switch_to(auto_done);
480
         } else if (wl == Plants::invalid) {
480
         } else if (wl == Plants::invalid) {
481
             plants.abort();
481
             plants.abort();
482
             error_condition = "Invalid sensor state";
482
             error_condition = "Invalid sensor state";
483
-            state = menu_auto;
483
+            state = auto_mode;
484
             switch_to(error);
484
             switch_to(error);
485
         }
485
         }
486
     }
486
     }
504
               "2: Fertilizer pumps",
504
               "2: Fertilizer pumps",
505
               "3: Outlet valves",
505
               "3: Outlet valves",
506
               -1);
506
               -1);
507
-    } else if (s == menu_auto) {
507
+    } else if (s == auto_mode) {
508
         print("------- Auto -------",
508
         print("------- Auto -------",
509
               "1: Add Fertilizer",
509
               "1: Add Fertilizer",
510
               "2: Fill Reservoir",
510
               "2: Fill Reservoir",
511
               "3: Water a plant",
511
               "3: Water a plant",
512
               -1);
512
               -1);
513
-    } else if (s == menu_auto_fertilizer) {
513
+    } else if (s == auto_fert) {
514
         print("---- Fertilizer ----",
514
         print("---- Fertilizer ----",
515
               "1: Vegetation Phase",
515
               "1: Vegetation Phase",
516
               "2: Bloom Phase",
516
               "2: Bloom Phase",
517
               "3: Special",
517
               "3: Special",
518
               -1);
518
               -1);
519
-    } else if (s == menu_auto_fertilizer_running) {
519
+    } else if (s == auto_fert_run) {
520
         unsigned long runtime = millis() - start_time;
520
         unsigned long runtime = millis() - start_time;
521
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
521
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
522
         
522
         
531
               b.c_str(),
531
               b.c_str(),
532
               "Hit any key to stop!",
532
               "Hit any key to stop!",
533
               -1);
533
               -1);
534
-    } else if (s == menu_auto_reservoir_running) {
534
+    } else if (s == auto_tank_run) {
535
         unsigned long runtime = millis() - start_time;
535
         unsigned long runtime = millis() - start_time;
536
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
536
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
537
         
537
         
546
               b.c_str(),
546
               b.c_str(),
547
               "Hit any key to stop!",
547
               "Hit any key to stop!",
548
               -1);
548
               -1);
549
-    } else if (s == menu_auto_plant) {
549
+    } else if (s == auto_plant) {
550
         String a = String("(Input 1 to ") + String(plants.countPlants()) + String(")");
550
         String a = String("(Input 1 to ") + String(plants.countPlants()) + String(")");
551
         
551
         
552
         print("--- Select Plant ---",
552
         print("--- Select Plant ---",
554
               a.c_str(),
554
               a.c_str(),
555
               "Plant: ",
555
               "Plant: ",
556
               3);
556
               3);
557
-    } else if (s == menu_auto_plant_running) {
557
+    } else if (s == auto_plant_run) {
558
         unsigned long runtime = millis() - start_time;
558
         unsigned long runtime = millis() - start_time;
559
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
559
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
560
         
560
         
569
               b.c_str(),
569
               b.c_str(),
570
               "Hit any key to stop!",
570
               "Hit any key to stop!",
571
               -1);
571
               -1);
572
-    } else if (s == menu_auto_done) {
572
+    } else if (s == auto_done) {
573
         String a = String("after ") + String((stop_time - start_time) / 1000UL) + String("s.");
573
         String a = String("after ") + String((stop_time - start_time) / 1000UL) + String("s.");
574
         
574
         
575
         print("------- Done -------",
575
         print("------- Done -------",
602
               b.c_str(),
602
               b.c_str(),
603
               "           # Confirm",
603
               "           # Confirm",
604
               -1);
604
               -1);
605
-    } else if (s == menu_pumps_running) {
605
+    } else if (s == menu_pumps_run) {
606
         unsigned long runtime = millis() - start_time;
606
         unsigned long runtime = millis() - start_time;
607
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
607
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
608
         
608
         
650
               b.c_str(),
650
               b.c_str(),
651
               "           # Confirm",
651
               "           # Confirm",
652
               -1);
652
               -1);
653
-    } else if (s == menu_valves_running) {
653
+    } else if (s == menu_valves_run) {
654
         unsigned long runtime = millis() - start_time;
654
         unsigned long runtime = millis() - start_time;
655
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
655
         String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
656
         
656
         

+ 4
- 3
src/WifiStuff.cpp View File

373
     
373
     
374
 #endif
374
 #endif
375
 
375
 
376
-    message += F("<p>\n");
377
-    message += F("Try <a href='/update'>/update</a> for OTA firmware updates!\n");
378
-    message += F("</p></div>\n");
376
+    message += F("<p>Try <a href='/update'>/update</a> for OTA firmware updates!</p>\n");
377
+    message += F("<p>Made by <a href='https://xythobuz.de'>xythobuz</a></p>\n");
378
+    message += F("<p><a href='https://git.xythobuz.de/thomas/giess-o-mat'>Project Repository</a></p>\n");
379
+    message += F("</div>\n");
379
     message += F("</div></body>\n");
380
     message += F("</div></body>\n");
380
     
381
     
381
     message += F("<script type='text/javascript'>\n");
382
     message += F("<script type='text/javascript'>\n");

Loading…
Cancel
Save