Thread history

Fragment of a discussion from User talk:Tkiesel/Dev Notebook
Viewing a history listing
Jump to navigation Jump to search
Time User Activity Comment
No results

Sorry if i'm wrong (i'm a little drunk because of the soccer EM). I think your radar can miss the target in the first search procedure. If the target moves very unlucky you end up with a sitting duck. It happens sometimes that you hit the target under an very bad angle/velocity and than the radar won't lock at the first hit. Looking at your code, i think this would lead to a sitting duck straight from the first round. I think you are better off with something like

public void run()
{
      ....
      while(true)
      {
            if (getRadarTurnRemaining() == 0) setTurnRadarRight(Double.MAX_VALUE);
            excecute();
      }
}

I don't think you have to move all your onScannedRobot(..) stuff to run(). This would lead to some other issues if you miss/skip some turns.

For the execute() at the end of onScannedRobot(..). The paint event has a priority of 5 (i guess) and comes after the onScanned.. so if you end your turn before onPaint(..) is processed you won't get any graphics. Not sure about the priorities now but it is something around this i guess.

I try to have a closer look at this tomorrow ... not sure on what time shift you are :) but maybe it helps right now.

Take Care

Wompi23:53, 17 June 2012