CPSSD / robots

CA224 robotics project
4 stars 0 forks source link

Fix object detection in simulator #197

Closed cgmc closed 8 years ago

cgmc commented 8 years ago

Object detection remained broken because getDestination() was accessing one index ahead of where it should have been.

Rooms larger than 30 cm square could not be properly created and used because hasInterception() was using a hard-coded boundary check.

Fixed edge case allowing illegal destinations.

The room class does not automatically have access to a max() function - it must be referenced from the Arduino header.

Created two new functions to consolidate the float comparison code.

Accounted for mirroring of directions in simulator.

References #162, #164.