diff --git a/software/raspberry/superviseur-robot/tasks.cpp b/software/raspberry/superviseur-robot/tasks.cpp index 66063b7..29943d0 100644 --- a/software/raspberry/superviseur-robot/tasks.cpp +++ b/software/raspberry/superviseur-robot/tasks.cpp @@ -656,7 +656,7 @@ void Tasks::StartRobotTaskWithoutWatchdog(void *arg) { void Tasks::StartRobotTaskWithWatchdog(void *arg) { int killBatteryOk=0; - int cpt=0; + int cpt=1; Message * msgSend; while(1){ @@ -697,7 +697,7 @@ void Tasks::StartRobotTaskWithWatchdog(void *arg) { cpt++; if(cpt==2){ rt_mutex_acquire(&mutex_robot, TM_INFINITE); - robot.Write(MESSAGE_ROBOT_RELOAD_WD); + robot.Write(robot.ReloadWD()); rt_mutex_release(&mutex_robot); cpt=0; } @@ -727,7 +727,7 @@ void Tasks::MoveTask(void *arg) { /**************************************************************************************/ /* The task starts here */ /**************************************************************************************/ - rt_task_set_periodic(NULL, TM_NOW, 1000000000); + rt_task_set_periodic(NULL, TM_NOW, 100000000); while (1) { rt_task_wait_period(NULL);