Properly implemented registerInternalFailure(); some logging in STM32 test app

This commit is contained in:
Pavel Kirienko
2014-04-11 14:18:36 +04:00
parent 1fbd6c2cdd
commit d2eb0a03ee
3 changed files with 13 additions and 2 deletions
@@ -143,6 +143,8 @@ int main()
lowsyslog("Starting the UAVCAN thread\n");
app::uavcan_node_thread.start(LOWPRIO);
app::getNode().getLogger().setLevel(uavcan::protocol::debug::LogLevel::INFO);
while (true)
{
for (int i = 0; i < 200; i++)
@@ -156,5 +158,13 @@ int main()
static_cast<unsigned long>(utc.toMSec() / 1000),
uavcan_stm32::clock::getUtcSpeedCorrectionPPM(),
uavcan_stm32::clock::getUtcAjdustmentJumpCount());
if (app::getNode().isStarted())
{
app::getNode().logInfo("app", "UTC %* sec, %* corr, %* jumps",
utc.toMSec() / 1000,
uavcan_stm32::clock::getUtcSpeedCorrectionPPM(),
uavcan_stm32::clock::getUtcAjdustmentJumpCount());
}
}
}