Serial refactor. Default 8-bit ECHO to int, not char (#20985)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
X-Ryl669
2021-02-08 07:37:24 +01:00
committed by GitHub
parent 1e726fe405
commit e7c711996b
72 changed files with 379 additions and 337 deletions

View File

@ -1772,7 +1772,7 @@ void HMI_SDCardUpdate() {
if (HMI_flag.home_flag) return;
if (DWIN_lcd_sd_status != card.isMounted()) {
DWIN_lcd_sd_status = card.isMounted();
// SERIAL_ECHOLNPAIR("HMI_SDCardUpdate: ", int(DWIN_lcd_sd_status));
// SERIAL_ECHOLNPAIR("HMI_SDCardUpdate: ", DWIN_lcd_sd_status);
if (DWIN_lcd_sd_status) {
if (checkkey == SelectFile)
Redraw_SD_List();

View File

@ -141,7 +141,7 @@ void AnycubicTFTClass::OnKillTFT() {
void AnycubicTFTClass::OnSDCardStateChange(bool isInserted) {
#if ENABLED(ANYCUBIC_LCD_DEBUG)
SERIAL_ECHOLNPAIR("TFT Serial Debug: OnSDCardStateChange event triggered...", (int)isInserted);
SERIAL_ECHOLNPAIR("TFT Serial Debug: OnSDCardStateChange event triggered...", isInserted);
#endif
DoSDCardStateCheck();
}

View File

@ -1083,7 +1083,7 @@ void CLCD::init() {
if (counter == 249) {
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_MSG("Timeout waiting for device ID, should be 124, got ", int(device_id));
SERIAL_ECHO_MSG("Timeout waiting for device ID, should be 124, got ", device_id);
#endif
}
}
@ -1101,7 +1101,7 @@ void CLCD::init() {
delay(1);
if (ENABLED(TOUCH_UI_DEBUG) && counter == 99)
SERIAL_ECHO_MSG("Timeout waiting for reset status. Should be 0x00, got ", int(reset_status));
SERIAL_ECHO_MSG("Timeout waiting for reset status. Should be 0x00, got ", reset_status);
}
mem_write_8(REG::PWM_DUTY, 0); // turn off Backlight, Frequency already is set to 250Hz default

View File

@ -124,7 +124,7 @@ namespace FTDI {
case UNPRESSED:
if (tag != 0) {
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_MSG("Touch start: ", int(tag));
SERIAL_ECHO_MSG("Touch start: ", tag);
#endif
pressed_tag = tag;
@ -185,7 +185,7 @@ namespace FTDI {
if (UIData::flags.bits.touch_end_sound) sound.play(unpress_sound);
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_MSG("Touch end: ", int(pressed_tag));
SERIAL_ECHO_MSG("Touch end: ", pressed_tag);
#endif
const uint8_t saved_pressed_tag = pressed_tag;

View File

@ -43,7 +43,7 @@ void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) {
if (type != 0xFF) {
setType(type);
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_MSG("New screen: ", int(type));
SERIAL_ECHO_MSG("New screen: ", type);
#endif
}
}

View File

@ -37,9 +37,7 @@ namespace FTDI {
void SoundPlayer::play(effect_t effect, note_t note) {
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_START();
SERIAL_ECHOPAIR ("Playing note ", int(note));
SERIAL_ECHOLNPAIR(", instrument ", int(effect));
SERIAL_ECHO_MSG("Playing note ", note, ", instrument ", effect);
#endif
// Play the note

View File

@ -751,7 +751,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
// For Cartesian / Core motion simply move to the current_position
planner.buffer_line(current_position, fr_mm_s, axis == E_AXIS ? e_index : active_extruder);
//SERIAL_ECHOLNPAIR("Add planner.move with Axis ", int(axis), " at FR ", fr_mm_s);
//SERIAL_ECHOLNPAIR("Add planner.move with Axis ", axis, " at FR ", fr_mm_s);
axis = NO_AXIS;
@ -772,7 +772,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
#endif
start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves
axis = move_axis;
//SERIAL_ECHOLNPAIR("Post Move with Axis ", int(axis), " soon.");
//SERIAL_ECHOLNPAIR("Post Move with Axis ", axis, " soon.");
}
#if ENABLED(AUTO_BED_LEVELING_UBL)

View File

@ -216,7 +216,7 @@ void menu_advanced_settings();
#if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU)
void bltouch_report() {
SERIAL_ECHOLNPAIR("EEPROM Last BLTouch Mode - ", (int)bltouch.last_written_mode);
SERIAL_ECHOLNPAIR("EEPROM Last BLTouch Mode - ", bltouch.last_written_mode);
SERIAL_ECHOLNPGM("Configuration BLTouch Mode - " TERN(BLTOUCH_SET_5V_MODE, "5V", "OD"));
char mess[21];
strcpy_P(mess, PSTR("BLTouch Mode - "));