AP_Logger: add Write_NamedValueFloat

for getting diagnostics into the code during ddebug fast
This commit is contained in:
Peter Barker 2023-07-15 14:41:37 +10:00 committed by Andrew Tridgell
parent f5d6e167b5
commit 8ff9fc0f70
2 changed files with 15 additions and 0 deletions

View File

@ -912,6 +912,20 @@ void AP_Logger::Write_Fence()
} }
#endif #endif
void AP_Logger::Write_NamedValueFloat(const char *name, float value)
{
WriteStreaming(
"NVF",
"TimeUS,Name,Value",
"s#-",
"F--",
"QNf",
AP_HAL::micros(),
name,
value
);
}
// output a FMT message for each backend if not already done so // output a FMT message for each backend if not already done so
void AP_Logger::Safe_Write_Emit_FMT(log_write_fmt *f) void AP_Logger::Safe_Write_Emit_FMT(log_write_fmt *f)
{ {

View File

@ -247,6 +247,7 @@ public:
#if HAL_LOGGER_FENCE_ENABLED #if HAL_LOGGER_FENCE_ENABLED
void Write_Fence(); void Write_Fence();
#endif #endif
void Write_NamedValueFloat(const char *name, float value);
void Write_Power(void); void Write_Power(void);
void Write_Radio(const mavlink_radio_t &packet); void Write_Radio(const mavlink_radio_t &packet);
void Write_Message(const char *message); void Write_Message(const char *message);