Przeglądaj źródła

unsigned char => uint8_t

Scott Lahteine 8 lat temu
rodzic
commit
076f3a8284
2 zmienionych plików z 16 dodań i 16 usunięć
  1. 12
    12
      Marlin/temperature.cpp
  2. 4
    4
      Marlin/temperature.h

+ 12
- 12
Marlin/temperature.cpp Wyświetl plik

@@ -64,10 +64,10 @@ int   Temperature::current_temperature_raw[HOTENDS] = { 0 },
64 64
   float Temperature::redundant_temperature = 0.0;
65 65
 #endif
66 66
 
67
-unsigned char Temperature::soft_pwm_bed;
67
+uint8_t Temperature::soft_pwm_bed;
68 68
 
69 69
 #if ENABLED(FAN_SOFT_PWM)
70
-  unsigned char Temperature::fanSpeedSoftPwm[FAN_COUNT];
70
+  uint8_t Temperature::fanSpeedSoftPwm[FAN_COUNT];
71 71
 #endif
72 72
 
73 73
 #if ENABLED(PIDTEMP)
@@ -188,10 +188,10 @@ int Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TEMP ,
188 188
   millis_t Temperature::next_auto_fan_check_ms = 0;
189 189
 #endif
190 190
 
191
-unsigned char Temperature::soft_pwm[HOTENDS];
191
+uint8_t Temperature::soft_pwm[HOTENDS];
192 192
 
193 193
 #if ENABLED(FAN_SOFT_PWM)
194
-  unsigned char Temperature::soft_pwm_fan[FAN_COUNT];
194
+  uint8_t Temperature::soft_pwm_fan[FAN_COUNT];
195 195
 #endif
196 196
 
197 197
 #if ENABLED(FILAMENT_WIDTH_SENSOR)
@@ -482,7 +482,7 @@ int Temperature::getHeaterPower(int heater) {
482 482
     for (uint8_t f = 0; f < COUNT(fanPin); f++) {
483 483
       int8_t pin = fanPin[f];
484 484
       if (pin >= 0 && !TEST(fanDone, fanBit[f])) {
485
-        unsigned char newFanSpeed = TEST(fanState, fanBit[f]) ? EXTRUDER_AUTO_FAN_SPEED : 0;
485
+        uint8_t newFanSpeed = TEST(fanState, fanBit[f]) ? EXTRUDER_AUTO_FAN_SPEED : 0;
486 486
         // this idiom allows both digital and PWM fan outputs (see M42 handling).
487 487
         digitalWrite(pin, newFanSpeed);
488 488
         analogWrite(pin, newFanSpeed);
@@ -1414,19 +1414,19 @@ ISR(TIMER0_COMPB_vect) { Temperature::isr(); }
1414 1414
 
1415 1415
 void Temperature::isr() {
1416 1416
 
1417
-  static unsigned char temp_count = 0;
1417
+  static uint8_t temp_count = 0;
1418 1418
   static TempState temp_state = StartupDelay;
1419
-  static unsigned char pwm_count = _BV(SOFT_PWM_SCALE);
1419
+  static uint8_t pwm_count = _BV(SOFT_PWM_SCALE);
1420 1420
 
1421 1421
   // Static members for each heater
1422 1422
   #if ENABLED(SLOW_PWM_HEATERS)
1423
-    static unsigned char slow_pwm_count = 0;
1423
+    static uint8_t slow_pwm_count = 0;
1424 1424
     #define ISR_STATICS(n) \
1425
-      static unsigned char soft_pwm_ ## n; \
1426
-      static unsigned char state_heater_ ## n = 0; \
1427
-      static unsigned char state_timer_heater_ ## n = 0
1425
+      static uint8_t soft_pwm_ ## n; \
1426
+      static uint8_t state_heater_ ## n = 0; \
1427
+      static uint8_t state_timer_heater_ ## n = 0
1428 1428
   #else
1429
-    #define ISR_STATICS(n) static unsigned char soft_pwm_ ## n
1429
+    #define ISR_STATICS(n) static uint8_t soft_pwm_ ## n
1430 1430
   #endif
1431 1431
 
1432 1432
   // Statics per heater

+ 4
- 4
Marlin/temperature.h Wyświetl plik

@@ -65,10 +65,10 @@ class Temperature {
65 65
       static float redundant_temperature;
66 66
     #endif
67 67
 
68
-    static unsigned char soft_pwm_bed;
68
+    static uint8_t soft_pwm_bed;
69 69
 
70 70
     #if ENABLED(FAN_SOFT_PWM)
71
-      static unsigned char fanSpeedSoftPwm[FAN_COUNT];
71
+      static uint8_t fanSpeedSoftPwm[FAN_COUNT];
72 72
     #endif
73 73
 
74 74
     #if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
@@ -209,10 +209,10 @@ class Temperature {
209 209
       static millis_t next_auto_fan_check_ms;
210 210
     #endif
211 211
 
212
-    static unsigned char soft_pwm[HOTENDS];
212
+    static uint8_t soft_pwm[HOTENDS];
213 213
 
214 214
     #if ENABLED(FAN_SOFT_PWM)
215
-      static unsigned char soft_pwm_fan[FAN_COUNT];
215
+      static uint8_t soft_pwm_fan[FAN_COUNT];
216 216
     #endif
217 217
 
218 218
     #if ENABLED(FILAMENT_WIDTH_SENSOR)

Ładowanie…
Anuluj
Zapisz