|
| template<typename... Args> |
| void | debug (const Args &... args) |
| | Print a debug message, as Serial.print() does (only with ENABLE_DEBUG).
|
| |
| template<typename... Args> |
| void | debugln (const Args &... args) |
| | Print a debug message and a line end, as Serial.println() does (only with ENABLE_DEBUG).
|
| |
| void | info (const __FlashStringHelper *text) |
| | Print a text in flash, F("..."): info() out of line.
|
| |
| template<typename... Args> |
| void | info (const Args &... args) |
| | Print an informational message, as Serial.print() does.
|
| |
| void | infoln (const __FlashStringHelper *text) |
| | Print a text in flash, F("..."), and a line end: infoln() out of line.
|
| |
| template<typename... Args> |
| void | infoln (const Args &... args) |
| | Print an informational message and a line end, as Serial.println() does.
|
| |
| void | infolnDecimals (const int32_t value, const uint8_t decimals) |
| | Print a value given as an integer with a fixed number of decimals, and a line end.
|
| |
| void | infolnDecimals_P (const int32_t *value, const uint8_t decimals) |
| | Same as infolnDecimals(), with the value read from PROGMEM.
|
| |
| template<typename... Args> |
| void | status (const Args &... args) |
| | Print a status message, as Serial.print() does (human-readable output only).
|
| |
| template<typename... Args> |
| void | statusln (const Args &... args) |
| | Print a status message and a line end, as Serial.println() does (human-readable output only).
|
| |
The text output: informational messages (info) and debug messages (debug)
- Author
- Frédéric Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
- Version
- 0.1
- Date
- 2026-11-21
- Copyright
- Copyright (c) 2023-2026 SPDX-License-Identifier: GPL-3.0-or-later
In the IoT and JSON modes, the serial port carries data for another device (mk2Wifi...).
- info(), infoln(): the startup configuration, in every output mode: without it, no way to know what the router runs with. In IoT output, it is printed at 9600 baud 8N1, the default of serial monitors, before setup() switches to the 7E1 of the telemetry: the mk2pvrouter ESPHome component drops everything until its first frame. In JSON output, its lines come before the first JSON line.
- status(), statusln(): status changes while running, in human-readable output only.
- debug(), debugln(): debug messages at startup, as info(), only with ENABLE_DEBUG.
The arguments are those of Serial.print() / Serial.println(). A datalog output still in progress is written first, so a message never lands in the middle of a datalog line or telemetry frame (see serial_output.h). When a message is off, the call compiles to nothing, provided its arguments have no side effects.
The templates are always inlined: out of line, GCC keeps a copy per argument type, about 20 bytes more in all. A text in flash, F("..."), the most common message by far, goes to an overload that is not inlined instead: one call per message, rather than complete() and Serial.print() at each of them.
- Note
- Reads SERIAL_OUTPUT_TYPE and ENABLE_DEBUG from config.h, which it includes.
Definition in file debug.h.