Parcourir la source

Misc formatting, cleanup

Scott Lahteine il y a 4 ans
Parent
révision
0ddef5544a

+ 1
- 1
Marlin/src/feature/tmc_util.h Voir le fichier

35
 #define CHOPPER_DEFAULT_36V  { 5,  2, 4 }
35
 #define CHOPPER_DEFAULT_36V  { 5,  2, 4 }
36
 #define CHOPPER_PRUSAMK3_24V { 3, -2, 6 }
36
 #define CHOPPER_PRUSAMK3_24V { 3, -2, 6 }
37
 #define CHOPPER_MARLIN_119   { 5,  2, 3 }
37
 #define CHOPPER_MARLIN_119   { 5,  2, 3 }
38
-#define CHOPPER_09STEP_24V   { 3, -1, 5 } 
38
+#define CHOPPER_09STEP_24V   { 3, -1, 5 }
39
 
39
 
40
 #if ENABLED(MONITOR_DRIVER_STATUS) && !defined(MONITOR_DRIVER_STATUS_INTERVAL_MS)
40
 #if ENABLED(MONITOR_DRIVER_STATUS) && !defined(MONITOR_DRIVER_STATUS_INTERVAL_MS)
41
   #define MONITOR_DRIVER_STATUS_INTERVAL_MS 500u
41
   #define MONITOR_DRIVER_STATUS_INTERVAL_MS 500u

+ 19
- 20
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp Voir le fichier

87
 }
87
 }
88
 
88
 
89
 void StressTestScreen::startupCheck() {
89
 void StressTestScreen::startupCheck() {
90
-  if (LockScreen::get_hash() == 0xDEAD) {
90
+  if (LockScreen::get_hash() == 0xDEAD)
91
     GOTO_SCREEN(StressTestScreen);
91
     GOTO_SCREEN(StressTestScreen);
92
-  }
93
 }
92
 }
94
 
93
 
95
 void StressTestScreen::onEntry() {
94
 void StressTestScreen::onEntry() {
120
   reset_menu_timeout();
119
   reset_menu_timeout();
121
 
120
 
122
   if (!commandsInQueue()) {
121
   if (!commandsInQueue()) {
123
-      if (!isPositionKnown()) {
124
-        extern const char G28_STR[];
125
-        injectCommands_P(G28_STR);
126
-      }
127
-      else {
128
-        injectCommands_P(PSTR(
129
-          "G0 X100 Y100 Z100 F6000\n"
130
-          "T0\nG4 S1"
131
-          #if EXTRUDERS > 1
132
-            "\nT1\nG4 S1"
133
-          #endif
134
-          "\nG0 X150 Y150 Z150"
135
-        ));
136
-      }
122
+    if (!isPositionKnown()) {
123
+      extern const char G28_STR[];
124
+      injectCommands_P(G28_STR);
125
+    }
126
+    else {
127
+      injectCommands_P(PSTR(
128
+        "G0 X100 Y100 Z100 F6000\n"
129
+        "T0\nG4 S1"
130
+        #if EXTRUDERS > 1
131
+          "\nT1\nG4 S1"
132
+        #endif
133
+        "\nG0 X150 Y150 Z150"
134
+      ));
135
+    }
137
   }
136
   }
138
 
137
 
139
   if (refresh_timer.elapsed(STRESS_TEST_CHANGE_INTERVAL)) {
138
   if (refresh_timer.elapsed(STRESS_TEST_CHANGE_INTERVAL)) {
141
   }
140
   }
142
 
141
 
143
   if (watchDogTestNow()) {
142
   if (watchDogTestNow()) {
144
-      if (random(2) % 2)
145
-        iterativeLockup();
146
-      else
147
-        recursiveLockup();
143
+    if (random(2) % 2)
144
+      iterativeLockup();
145
+    else
146
+      recursiveLockup();
148
   }
147
   }
149
 
148
 
150
   BaseScreen::onIdle();
149
   BaseScreen::onIdle();

+ 4
- 4
Marlin/src/lcd/ultralcd.cpp Voir le fichier

1524
       const int8_t xdir = col < (LCD_WIDTH ) / 2 ? -1 : 1,
1524
       const int8_t xdir = col < (LCD_WIDTH ) / 2 ? -1 : 1,
1525
                    ydir = row < (LCD_HEIGHT) / 2 ? -1 : 1;
1525
                    ydir = row < (LCD_HEIGHT) / 2 ? -1 : 1;
1526
       if (on_edit_screen)
1526
       if (on_edit_screen)
1527
-        encoderDiff = ENCODER_PULSES_PER_STEP * ydir;
1527
+        encoderDiff = (ENCODER_PULSES_PER_STEP) * ydir;
1528
       else if (screen_items > 0) {
1528
       else if (screen_items > 0) {
1529
         // Last 3 cols act as a scroll :-)
1529
         // Last 3 cols act as a scroll :-)
1530
         if (col > (LCD_WIDTH) - 5)
1530
         if (col > (LCD_WIDTH) - 5)
1531
           // 2 * LCD_HEIGHT to scroll to bottom of next page. (LCD_HEIGHT would only go 1 item down.)
1531
           // 2 * LCD_HEIGHT to scroll to bottom of next page. (LCD_HEIGHT would only go 1 item down.)
1532
-          encoderDiff = ENCODER_PULSES_PER_STEP * (encoderLine - encoderTopLine + 2 * (LCD_HEIGHT)) * ydir;
1532
+          encoderDiff = (ENCODER_PULSES_PER_STEP) * (encoderLine - encoderTopLine + 2 * (LCD_HEIGHT)) * ydir;
1533
         else
1533
         else
1534
-          encoderDiff = ENCODER_PULSES_PER_STEP * (row - encoderPosition + encoderTopLine);
1534
+          encoderDiff = (ENCODER_PULSES_PER_STEP) * (row - encoderPosition + encoderTopLine);
1535
       }
1535
       }
1536
       else if (!on_status_screen())
1536
       else if (!on_status_screen())
1537
-        encoderDiff = ENCODER_PULSES_PER_STEP * xdir;
1537
+        encoderDiff = (ENCODER_PULSES_PER_STEP) * xdir;
1538
     }
1538
     }
1539
 
1539
 
1540
   #endif
1540
   #endif

Chargement…
Annuler
Enregistrer