More work towards a working main loop...
This commit is contained in:
parent
1dc4f5a2d7
commit
678c94532e
6 changed files with 72 additions and 24 deletions
|
@ -27,13 +27,14 @@ def run():
|
|||
while(communication.status() is Mode.GOTOSTATION or communication.status() is Mode.TARGET): # should be triggered if current station has no unexplored edges
|
||||
for instructions in communication.navto:
|
||||
for instructions in communication.navto:
|
||||
communication.update(None)
|
||||
communication.update(None, None)
|
||||
move.turnto(instructions[1])
|
||||
move.traversetonextstation(True)
|
||||
|
||||
communication.update(move.getstationedges()) # TODO: Register in map
|
||||
communication.update(move._odometry.coordinates_get(), move.getstationedges()) # TODO: Register in map
|
||||
move.updatevars()
|
||||
move.turnto(communication.navto[0][1]) # TODO: add control mechanism to communication class
|
||||
if(communication.check(move.traversetonextstation(False)) is False): # TODO: let same control mechanism decide if station is known, also traversetonextstation needs a return value
|
||||
if(communication.check(move.traversetonextstation(False)) is False):
|
||||
move.setcurdir(communication.getdir())
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue