mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 14:19:57 +08:00
events::send(id, log_levels, message) was an inline function, so every module using it got either a private clone or the body inlined at each call site. The message is never part of the sent event: it only feeds the build-time event generator and the optional console print. Keep a thin inline wrapper so the compiler still drops the unused message string, and build the event in one out-of-line function that takes the two log levels as scalars to keep the call sites small. This saves 1760 bytes of FLASH on px4_fmu-v6x and 1184 bytes on px4_fmu-v2. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Michael Rogov Papernov <michael@membrowse.com>