소스 검색

made string shorter to fit runtimes with 4 digits. fixed indentation.

Thomas Buck 3 년 전
부모
커밋
48de5aefd7
1개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 8
    8
      src/Statemachine.cpp

+ 8
- 8
src/Statemachine.cpp 파일 보기

231
             }
231
             }
232
         }
232
         }
233
     } else if (state == auto_plant_run) {
233
     } else if (state == auto_plant_run) {
234
-            plants.abort();
235
-            stop_time = millis();
236
-            switch_to(auto_done);
234
+        plants.abort();
235
+        stop_time = millis();
236
+        switch_to(auto_done);
237
     } else if (state == auto_done) {
237
     } else if (state == auto_done) {
238
         switch_to(auto_mode);
238
         switch_to(auto_mode);
239
     } else if (state == menu_pumps) {
239
     } else if (state == menu_pumps) {
564
               -1);
564
               -1);
565
     } else if (s == auto_fert_run) {
565
     } else if (s == auto_fert_run) {
566
         unsigned long runtime = millis() - start_time;
566
         unsigned long runtime = millis() - start_time;
567
-        String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
567
+        String a = String("Time: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
568
         
568
         
569
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
569
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
570
         String b;
570
         String b;
579
               -1);
579
               -1);
580
     } else if (s == auto_tank_run) {
580
     } else if (s == auto_tank_run) {
581
         unsigned long runtime = millis() - start_time;
581
         unsigned long runtime = millis() - start_time;
582
-        String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
582
+        String a = String("Time: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
583
         
583
         
584
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
584
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
585
         String b;
585
         String b;
602
               3);
602
               3);
603
     } else if (s == auto_plant_run) {
603
     } else if (s == auto_plant_run) {
604
         unsigned long runtime = millis() - start_time;
604
         unsigned long runtime = millis() - start_time;
605
-        String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
605
+        String a = String("Time: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
606
         
606
         
607
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
607
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
608
         String b;
608
         String b;
650
               -1);
650
               -1);
651
     } else if (s == menu_pumps_run) {
651
     } else if (s == menu_pumps_run) {
652
         unsigned long runtime = millis() - start_time;
652
         unsigned long runtime = millis() - start_time;
653
-        String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
653
+        String a = String("Time: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
654
         
654
         
655
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
655
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
656
         String b;
656
         String b;
698
               -1);
698
               -1);
699
     } else if (s == menu_valves_run) {
699
     } else if (s == menu_valves_run) {
700
         unsigned long runtime = millis() - start_time;
700
         unsigned long runtime = millis() - start_time;
701
-        String a = String("Runtime: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
701
+        String a = String("Time: ") + String(runtime / 1000UL) + String("s / ") + String(selected_time) + String('s');
702
         
702
         
703
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
703
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
704
         String b;
704
         String b;

Loading…
취소
저장