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

@ -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