guarantee -- after the cube has been dropped into the heap, return to original position. Wait for the motor to finish returning before doing anything else
guarantee -- after the cube has been dropped into the heap, return to original position. Wait for the motor to finish returning before doing anything else
-- placement in case the heap's location is already known
guarantee
G (ack_bot = MOVE & spec_stage = TOANGLEPLACE & spec_pausing = go ->
botMot = PLACE & next(spec_stage) = TOANGLERIGHT);
guarantee
G (ack_bot = SLEEP & spec_stage = TOANGLEPLACE & spec_pausing = go ->
horMot = MOVE & next(spec_stage) = DROP);
-- heap search
guarantee -- while the bottom motor is moving, see if the color has been found [botMot is MOVING and the color has NOT been found; we're GOING]
G (atEdge != EDGE & spec_stage = TOANGLERIGHT & detect != botMotColor & spec_pausing = go ->
botMot = RIGHT & next(spec_stage) = TOANGLERIGHT);
guarantee -- while the bottom motor is moving, see if the color has been found [botMot STOPPED MOVING and the color has NOT been found; we're GOING]
G (atEdge = EDGE & spec_stage = TOANGLERIGHT & spec_pausing = go & detect != botMotColor ->
botMot = LEFT & next(spec_stage) = TOANGLELEFT);
guarantee -- while the bottom motor is moving, see if the color has been found [botMot is MOVING and the color has NOT been found; we're GOING]
G (spec_stage = TOANGLELEFT & spec_pausing = go & detect != botMotColor ->
botMot = LEFT & next(spec_stage) = TOANGLELEFT);
guarantee -- after moving to the right angle, move the cube into the heap [we're GOING]
G ((spec_stage = TOANGLERIGHT | spec_stage = TOANGLELEFT) & spec_pausing = go & detect = botMotColor ->
horMot = MOVE & next(spec_stage) = DROP);
guarantee
G (store_place = true <-> (spec_stage = TOANGLERIGHT | spec_stage = TOANGLELEFT) & spec_pausing = go & detect = botMotColor);
-- return to initial position
guarantee -- after the cube has been dropped into the heap, return to original position. Wait for the motor to finish returning before doing anything else