Merge remote-tracking branch 'origin/cmake' into cmake

This commit is contained in:
Yohan Simard 2021-03-12 13:50:58 +01:00
commit 2673651834

View file

@ -218,7 +218,8 @@ void Tasks::ServerTask(void *arg) {
cout << "Open server on port " << (SERVER_PORT) << " (" << status << ")" << endl;
if (status < 0) throw std::runtime_error {
if (status < 0)
throw std::runtime_error{
"Unable to start server on port " + std::to_string(SERVER_PORT)
};
monitor.AcceptClient(); // Wait the monitor client
@ -368,10 +369,10 @@ void Tasks::ReceiveFromMonTask(void *arg) {
/* The task sendBatteryLevel starts here */
/* *************************************************************************************/
rt_task_set_periodic(NULL, TM_NOW, 500000000); // 500 ms //TODO
rt_task_set_periodic(nullptr, TM_NOW, 500000000); // 500 ms //TODO
while (true) {
rt_task_wait_period(NULL);
rt_task_wait_period(nullptr);
cout << "Periodic battery level update" << endl;
rt_mutex_acquire(&mutex_robotStarted, TM_INFINITE);