Procházet zdrojové kódy

Fix compiler warning in M145

Scott Lahteine před 7 roky
rodič
revize
396434a445
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp Zobrazit soubor

@@ -5518,8 +5518,8 @@ inline void gcode_M140() {
5518 5518
    *   F<fan speed>
5519 5519
    */
5520 5520
   inline void gcode_M145() {
5521
-    int8_t material = code_seen('S') ? (int8_t)code_value_int() : 0;
5522
-    if (material < 0 || material >= COUNT(lcd_preheat_hotend_temp)) {
5521
+    uint8_t material = code_seen('S') ? (uint8_t)code_value_int() : 0;
5522
+    if (material >= COUNT(lcd_preheat_hotend_temp)) {
5523 5523
       SERIAL_ERROR_START;
5524 5524
       SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX);
5525 5525
     }

Loading…
Zrušit
Uložit