From 261f31182573db4bee4e89f007290a6cbb3db7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sun, 8 Aug 2021 19:45:29 +0000 Subject: [PATCH] Change two arrays from int to uint8_t __preheat_counter has max value of 16 __preheat_errors has max value of 5 Saves 58 bytes of flash memory and 4 bytes of SRAM --- Firmware/temperature.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index abeaa264..4faf1341 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -1247,8 +1247,8 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren uint16_t __timeout = 0; bool temp_runaway_check_active = false; static float __preheat_start[2] = { 0,0}; //currently just bed and one extruder - static int __preheat_counter[2] = { 0,0}; - static int __preheat_errors[2] = { 0,0}; + static uint8_t __preheat_counter[2] = { 0,0}; + static uint8_t __preheat_errors[2] = { 0,0}; if (_millis() - temp_runaway_timer[_heater_id] > 2000)