Serial macros cleanup

This commit is contained in:
Scott Lahteine
2021-02-28 19:43:46 -06:00
committed by Scott Lahteine
parent f0b662ff58
commit dd42831cba
48 changed files with 101 additions and 117 deletions

View File

@ -34,8 +34,8 @@
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
static void cap_line(PGM_P const name, bool ena=false) {
SERIAL_ECHOPGM("Cap:");
serialprintPGM(name);
SERIAL_CHAR(':', ena ? '1' : '0');
SERIAL_ECHOPGM_P(name);
SERIAL_CHAR(':', '0' + ena);
SERIAL_EOL();
}
#endif

View File

@ -34,10 +34,9 @@
static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8_t ind=-1) {
SERIAL_ECHOPGM("Config:");
if (pref) serialprintPGM(pref);
if (pref) SERIAL_ECHOPGM_P(pref);
if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); }
serialprintPGM(name);
SERIAL_CHAR(':');
SERIAL_ECHOPAIR_P(name, AS_CHAR(':'));
}
static void config_line(PGM_P const name, const float val, PGM_P const pref=nullptr, const int8_t ind=-1) {
config_prefix(name, pref, ind);