mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 23:13:34 +08:00
Shorter error strings - saves ~200 bytes
This commit is contained in:
@@ -30,13 +30,13 @@ void GlobalTimeSyncMaster::IfaceMaster::setTxTimestamp(UtcTime ts)
|
||||
if (ts.isZero())
|
||||
{
|
||||
assert(0);
|
||||
pub_.getNode().registerInternalFailure("GlobalTimeSyncMaster got zero UTC TX timestamp");
|
||||
pub_.getNode().registerInternalFailure("GlobalTimeSyncMaster zero TX ts");
|
||||
return;
|
||||
}
|
||||
if (!prev_tx_utc_.isZero())
|
||||
{
|
||||
prev_tx_utc_ = UtcTime(); // Reset again, because there's something broken in the driver and we don't trust it
|
||||
pub_.getNode().registerInternalFailure("GlobalTimeSyncMaster publication conflict");
|
||||
pub_.getNode().registerInternalFailure("GlobalTimeSyncMaster pub conflict");
|
||||
return;
|
||||
}
|
||||
prev_tx_utc_ = ts;
|
||||
|
||||
@@ -15,7 +15,7 @@ NodeStatusMonitor::Entry& NodeStatusMonitor::getEntry(NodeID node_id) const
|
||||
{
|
||||
if (node_id.get() < 1 || node_id.get() > NodeID::Max)
|
||||
{
|
||||
handleFatalError("NodeStatusMonitor NodeID out of range");
|
||||
handleFatalError("NodeStatusMonitor NodeID");
|
||||
}
|
||||
return entries_[node_id.get() - 1];
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ void NodeStatusProvider::publishWithErrorHandling()
|
||||
const int res = publish();
|
||||
if (res < 0)
|
||||
{
|
||||
getNode().registerInternalFailure("NodeStatus publication failed");
|
||||
getNode().registerInternalFailure("NodeStatus pub failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ void PanicBroadcaster::publishOnce()
|
||||
const int res = pub_.broadcast(msg_);
|
||||
if (res < 0)
|
||||
{
|
||||
pub_.getNode().registerInternalFailure("Panic broadcasting failure");
|
||||
pub_.getNode().registerInternalFailure("Panic pub failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user