mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 22:04:07 +08:00
Improved doc for PanicBroadcaster
This commit is contained in:
parent
f2cfed70cb
commit
2d7e20b885
@ -32,10 +32,12 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin broadcasting at the standard interval.
|
||||
* Begin broadcasting at the standard interval (see BROADCASTING_INTERVAL_MS).
|
||||
* This method does not block and can't fail.
|
||||
* @param short_reason Short ASCII string that describes the reason of the panic, 7 characters max.
|
||||
* If the string exceeds 7 characters, it will be truncated.
|
||||
*/
|
||||
void panic(const char* short_reason);
|
||||
void panic(const char* short_reason_description);
|
||||
|
||||
/**
|
||||
* Stop broadcasting immediately.
|
||||
|
||||
@ -22,10 +22,10 @@ void PanicBroadcaster::handleTimerEvent(const TimerEvent&)
|
||||
publishOnce();
|
||||
}
|
||||
|
||||
void PanicBroadcaster::panic(const char* short_reason)
|
||||
void PanicBroadcaster::panic(const char* short_reason_description)
|
||||
{
|
||||
msg_.reason_text.clear();
|
||||
const char* p = short_reason;
|
||||
const char* p = short_reason_description;
|
||||
while (p && *p)
|
||||
{
|
||||
if (msg_.reason_text.size() == msg_.reason_text.capacity())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user