ソースを参照

temp runaway: proper cast to prevent any overflow.

Philippe L 9年前
コミット
30248214c7
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      Marlin/temperature.cpp

+ 1
- 1
Marlin/temperature.cpp ファイルの表示

@@ -1049,7 +1049,7 @@ void thermal_runaway_protection(int *state, unsigned long *timer, float temperat
1049 1049
       {
1050 1050
         *timer = millis();
1051 1051
       } 
1052
-      else if ( (millis() - *timer) > period_seconds*1000)
1052
+      else if ( (millis() - *timer) > ((unsigned long) period_seconds) * 1000)
1053 1053
       {
1054 1054
         SERIAL_ERROR_START;
1055 1055
         SERIAL_ERRORLNPGM("Thermal Runaway, system stopped! Heater_ID: ");

読み込み中…
キャンセル
保存