mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-06 08:24:27 +01:00
terminal: trying to fix Print API usage
- more static flash strings and flash string formats - println() will write \r\n when we mostly just use the \n (and avoid mixing it up in the same function)
This commit is contained in:
@@ -832,13 +832,14 @@ void buttonSetup() {
|
||||
terminalRegisterCommand(F("BUTTON"), [](const terminal::CommandContext& ctx) {
|
||||
unsigned index { 0u };
|
||||
for (auto& button : _buttons) {
|
||||
ctx.output.printf("%u - ", index++);
|
||||
ctx.output.printf_P(PSTR("%u - "), index++);
|
||||
if (button.event_emitter) {
|
||||
auto& pin = button.event_emitter->pin();
|
||||
ctx.output.println(pin->description());
|
||||
ctx.output.print(pin->description());
|
||||
} else {
|
||||
ctx.output.println(F("Virtual"));
|
||||
ctx.output.print(F("Virtual"));
|
||||
}
|
||||
ctx.output.print('\n');
|
||||
}
|
||||
|
||||
terminalOK(ctx);
|
||||
|
||||
Reference in New Issue
Block a user