Browse Source

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
Guðni Már Gilbert 2 years ago
parent
commit
261f311825
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Firmware/temperature.cpp

+ 2 - 2
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)