Compare commits
No commits in common. "3fabeb95596d731a0280adfb89bde3273033d403" and "19cefe3563a28bf9367fbebba2f3b7745c56ca15" have entirely different histories.
3fabeb9559
...
19cefe3563
1 changed files with 3 additions and 4 deletions
|
@ -658,6 +658,7 @@ void Tasks::StartRobotTaskWithWatchdog(void *arg) {
|
|||
int killBatteryOk=0;
|
||||
int cpt=1;
|
||||
Message * msgSend;
|
||||
int err;
|
||||
|
||||
while(1){
|
||||
|
||||
|
@ -696,13 +697,11 @@ void Tasks::StartRobotTaskWithWatchdog(void *arg) {
|
|||
while (killBatteryOk==0) {
|
||||
cpt++;
|
||||
if(cpt==2){
|
||||
rt_mutex_acquire(&mutex_robot, TM_INFINITE);
|
||||
robot.Write(robot.ReloadWD());
|
||||
rt_mutex_release(&mutex_robot);
|
||||
cpt=0;
|
||||
}
|
||||
rt_task_wait_period(NULL);
|
||||
rt_sem_v(&sem_askBattery);
|
||||
|
||||
rt_mutex_acquire(&mutex_killBattery, TM_INFINITE);
|
||||
killBatteryOk=killBattery;
|
||||
rt_mutex_release(&mutex_killBattery);
|
||||
|
@ -727,7 +726,7 @@ void Tasks::MoveTask(void *arg) {
|
|||
/**************************************************************************************/
|
||||
/* The task starts here */
|
||||
/**************************************************************************************/
|
||||
rt_task_set_periodic(NULL, TM_NOW, 100000000);
|
||||
rt_task_set_periodic(NULL, TM_NOW, 1000000000);
|
||||
|
||||
while (1) {
|
||||
rt_task_wait_period(NULL);
|
||||
|
|
Loading…
Reference in a new issue