瀏覽代碼

Apply const to thermal_runaway_protection args

Scott Lahteine 7 年之前
父節點
當前提交
45c2388a58
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. 1
    1
      Marlin/src/module/temperature.cpp
  2. 1
    1
      Marlin/src/module/temperature.h

+ 1
- 1
Marlin/src/module/temperature.cpp 查看文件

1357
     millis_t Temperature::thermal_runaway_bed_timer;
1357
     millis_t Temperature::thermal_runaway_bed_timer;
1358
   #endif
1358
   #endif
1359
 
1359
 
1360
-  void Temperature::thermal_runaway_protection(Temperature::TRState* state, millis_t* timer, float current, float target, int heater_id, int period_seconds, int hysteresis_degc) {
1360
+  void Temperature::thermal_runaway_protection(Temperature::TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) {
1361
 
1361
 
1362
     static float tr_target_temperature[HOTENDS + 1] = { 0.0 };
1362
     static float tr_target_temperature[HOTENDS + 1] = { 0.0 };
1363
 
1363
 

+ 1
- 1
Marlin/src/module/temperature.h 查看文件

574
 
574
 
575
       typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate;
575
       typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate;
576
 
576
 
577
-      static void thermal_runaway_protection(TRState* state, millis_t* timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
577
+      static void thermal_runaway_protection(TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
578
 
578
 
579
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
579
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
580
         static TRState thermal_runaway_state_machine[HOTENDS];
580
         static TRState thermal_runaway_state_machine[HOTENDS];

Loading…
取消
儲存