Merge pull request #1835 from mkbel/fix_compiler_warning

Fix compiler warnings
This commit is contained in:
Ondřej Tůma 2019-05-15 10:32:52 +02:00 committed by GitHub
commit 04ac259938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 15 deletions

View File

@ -865,23 +865,23 @@ void show_fw_version_warnings() {
lcd_update_enable(true); lcd_update_enable(true);
} }
//try to check if firmware is on right type of printer //! @brief try to check if firmware is on right type of printer
void check_if_fw_is_on_right_printer(){ static void check_if_fw_is_on_right_printer(){
#ifdef FILAMENT_SENSOR #ifdef FILAMENT_SENSOR
swi2c_init();
uint8_t pat9125_detected = swi2c_readByte_A8(PAT9125_I2C_ADDR,0x00,NULL);
uint8_t ir_detected = !(PIN_GET(IR_SENSOR_PIN)); //will return 1 only if IR can detect filament in bondtech extruder so this may fail even when we have IR sensor
#ifdef IR_SENSOR #ifdef IR_SENSOR
swi2c_init();
const uint8_t pat9125_detected = swi2c_readByte_A8(PAT9125_I2C_ADDR,0x00,NULL);
if (pat9125_detected){ if (pat9125_detected){
lcd_show_fullscreen_message_and_wait_P(_i("MK3S firmware detected on MK3 printer"));} lcd_show_fullscreen_message_and_wait_P(_i("MK3S firmware detected on MK3 printer"));}
#endif #endif //IR_SENSOR
#ifdef PAT9125 #ifdef PAT9125
//will return 1 only if IR can detect filament in bondtech extruder so this may fail even when we have IR sensor
const uint8_t ir_detected = !(PIN_GET(IR_SENSOR_PIN));
if (ir_detected){ if (ir_detected){
lcd_show_fullscreen_message_and_wait_P(_i("MK3 firmware detected on MK3S printer"));} lcd_show_fullscreen_message_and_wait_P(_i("MK3 firmware detected on MK3S printer"));}
#endif #endif //PAT9125
#endif #endif //FILAMENT_SENSOR
} }
uint8_t check_printer_version() uint8_t check_printer_version()
@ -9652,7 +9652,7 @@ void marlin_wait_for_click()
manage_inactivity(true); manage_inactivity(true);
lcd_update(0); lcd_update(0);
} }
KEEPALIVE_STATE(busy_state); KEEPALIVE_STATE(busy_state_backup);
} }
#define FIL_LOAD_LENGTH 60 #define FIL_LOAD_LENGTH 60

View File

@ -174,7 +174,7 @@ static void menu_draw_item_puts_P(char type_char, const char* str)
lcd_printf_P(PSTR("%c%-18.18S%c"), (lcd_encoder == menu_item)?'>':' ', str, type_char); lcd_printf_P(PSTR("%c%-18.18S%c"), (lcd_encoder == menu_item)?'>':' ', str, type_char);
} }
static int menu_draw_item_puts_P(char type_char, const char* str, char num) static void menu_draw_item_puts_P(char type_char, const char* str, char num)
{ {
lcd_set_cursor(0, menu_row); lcd_set_cursor(0, menu_row);
lcd_printf_P(PSTR("%c%-.16S "), (lcd_encoder == menu_item)?'>':' ', str); lcd_printf_P(PSTR("%c%-.16S "), (lcd_encoder == menu_item)?'>':' ', str);

View File

@ -965,7 +965,7 @@ void display_loading()
} }
} }
void extr_adj(int extruder) //loading filament for SNMM void extr_adj(uint8_t extruder) //loading filament for SNMM
{ {
#ifndef SNMM #ifndef SNMM
MmuCmd cmd = MmuCmd::L0 + extruder; MmuCmd cmd = MmuCmd::L0 + extruder;

View File

@ -103,7 +103,7 @@ extern void extr_mov(float shift, float feed_rate);
extern void change_extr(int extr); extern void change_extr(int extr);
extern int get_ext_nr(); extern int get_ext_nr();
extern void display_loading(); extern void display_loading();
extern void extr_adj(int extruder); extern void extr_adj(uint8_t extruder);
extern void extr_unload(); extern void extr_unload();
//-// //-//
extern void extr_unload_(); extern void extr_unload_();

View File

@ -129,7 +129,6 @@ void lcd_commands();
void change_extr(int extr); void change_extr(int extr);
void extr_adj(int extruder);
#ifdef SNMM #ifdef SNMM
void extr_unload_all(); void extr_unload_all();