Reformat file

This commit is contained in:
Arnaud Vergnet 2021-03-12 13:35:49 +01:00
parent c2662209c4
commit 66d4c6f94d

View file

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