소스 검색

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,9 +231,9 @@ void Statemachine::input(int n) {
231 231
             }
232 232
         }
233 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 237
     } else if (state == auto_done) {
238 238
         switch_to(auto_mode);
239 239
     } else if (state == menu_pumps) {
@@ -564,7 +564,7 @@ void Statemachine::switch_to(States s) {
564 564
               -1);
565 565
     } else if (s == auto_fert_run) {
566 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 569
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
570 570
         String b;
@@ -579,7 +579,7 @@ void Statemachine::switch_to(States s) {
579 579
               -1);
580 580
     } else if (s == auto_tank_run) {
581 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 584
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
585 585
         String b;
@@ -602,7 +602,7 @@ void Statemachine::switch_to(States s) {
602 602
               3);
603 603
     } else if (s == auto_plant_run) {
604 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 607
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
608 608
         String b;
@@ -650,7 +650,7 @@ void Statemachine::switch_to(States s) {
650 650
               -1);
651 651
     } else if (s == menu_pumps_run) {
652 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 655
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
656 656
         String b;
@@ -698,7 +698,7 @@ void Statemachine::switch_to(States s) {
698 698
               -1);
699 699
     } else if (s == menu_valves_run) {
700 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 703
         unsigned long anim = runtime * 20UL / (selected_time * 1000UL);
704 704
         String b;

Loading…
취소
저장