Skip to content

Commit

Permalink
Reset engine degrees when changing diagonals mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafacouto committed Feb 21, 2018
1 parent 029895d commit e2c403a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Escornabot/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class Engine
bool isExecuting() { return _program != NULL; }

bool isSquareDiagonals() { return _square_diagonals; }
void setSquareDiagonals(bool value) { _square_diagonals = value; }
void setSquareDiagonals(bool value)
{ _square_diagonals = value; _current_degrees = 0; }

bool isAligned(int16_t degrees) { return _current_degrees % degrees == 0; }

Expand Down

0 comments on commit e2c403a

Please sign in to comment.