Change prusa_stat_printerstatus parameter to uint8_t

Also changes status_number global variable to uint8_t

Changes save 80 bytes of flash and 1 byte of SRAM (Arduino IDE 1.8.19)
This commit is contained in:
Guðni Már Gilbert 2022-02-02 18:35:52 +00:00
parent e525bcb7f5
commit 459570ab66
3 changed files with 5 additions and 5 deletions

View File

@ -335,7 +335,7 @@ extern bool loading_flag;
extern uint8_t usb_printing_counter; extern uint8_t usb_printing_counter;
extern unsigned long total_filament_used; extern unsigned long total_filament_used;
void save_statistics(unsigned long _total_filament_used, unsigned long _total_print_time); void save_statistics(unsigned long _total_filament_used, unsigned long _total_print_time);
extern unsigned int status_number; extern uint8_t status_number;
extern uint8_t heating_status_counter; extern uint8_t heating_status_counter;
extern char snmm_filaments_used; extern char snmm_filaments_used;
extern unsigned long PingTime; extern unsigned long PingTime;

View File

@ -213,7 +213,7 @@ bool mesh_bed_leveling_flag = false;
bool prusa_sd_card_upload = false; bool prusa_sd_card_upload = false;
#endif #endif
unsigned int status_number = 0; uint8_t status_number = 0;
unsigned long total_filament_used; unsigned long total_filament_used;
HeatingStatus heating_status; HeatingStatus heating_status;
@ -4509,7 +4509,7 @@ void process_commands()
} }
} }
else if (code_seen_P(PSTR("PRN"))) { // PRUSA PRN else if (code_seen_P(PSTR("PRN"))) { // PRUSA PRN
printf_P(_N("%d"), status_number); printf_P(_N("%u"), status_number);
} else if( code_seen_P(PSTR("FANPINTST"))){ } else if( code_seen_P(PSTR("FANPINTST"))){
gcode_PRUSA_BadRAMBoFanTest(); gcode_PRUSA_BadRAMBoFanTest();

View File

@ -126,7 +126,7 @@ static void lcd_control_temperature_menu();
#ifdef TMC2130 #ifdef TMC2130
static void lcd_settings_linearity_correction_menu_save(); static void lcd_settings_linearity_correction_menu_save();
#endif #endif
static void prusa_stat_printerstatus(int _status); static void prusa_stat_printerstatus(uint8_t _status);
static void prusa_stat_farm_number(); static void prusa_stat_farm_number();
static void prusa_stat_diameter(); static void prusa_stat_diameter();
static void prusa_stat_temperatures(); static void prusa_stat_temperatures();
@ -4064,7 +4064,7 @@ void prusa_statistics(uint8_t _message, uint8_t _fil_nr) {
} }
static void prusa_stat_printerstatus(int _status) static void prusa_stat_printerstatus(uint8_t _status)
{ {
SERIAL_ECHOPGM("[PRN:"); SERIAL_ECHOPGM("[PRN:");
SERIAL_ECHO(_status); SERIAL_ECHO(_status);