pos-sys-cam: avoid infinite loop

when camera has not been seen for a while
pull/1/head
emamaker 2022-06-09 10:01:03 +02:00
parent 23b285da14
commit b7aca28332
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ void PositionSysCamera::update(){
do{ do{
valid_data = getDataAtIndex_backwardsFromCurrent(i); valid_data = getDataAtIndex_backwardsFromCurrent(i);
i++; i++;
}while(!valid_data.ySeen && !valid_data.bSeen); }while(!valid_data.ySeen && !valid_data.bSeen && i < dim);
if(valid_data.ySeen || valid_data.bSeen){ if(valid_data.ySeen || valid_data.bSeen){
posx = valid_data.posx; posx = valid_data.posx;