️ Misc. optimizations

This commit is contained in:
Scott Lahteine 2023-03-18 17:13:06 -05:00
parent 283d093a4c
commit e6ac9ff204
6 changed files with 30 additions and 25 deletions

View file

@ -85,11 +85,6 @@ void serial_offset(const_float_t v, const uint8_t sp/*=0*/) {
SERIAL_DECIMAL(v);
}
void serial_ternary(const bool onoff, FSTR_P const pre, FSTR_P const on, FSTR_P const off, FSTR_P const post/*=nullptr*/) {
if (pre) serial_print(pre);
serial_print(onoff ? on : off);
if (post) serial_print(post);
}
void serialprint_onoff(const bool onoff) { serial_print(onoff ? F(STR_ON) : F(STR_OFF)); }
void serialprintln_onoff(const bool onoff) { serialprint_onoff(onoff); SERIAL_EOL(); }
void serialprint_truefalse(const bool tf) { serial_print(tf ? F("true") : F("false")); }