David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Diff: line_tracker.cpp
- Revision:
- 31:739b91331f31
- Parent:
- 24:fc01d9125d3b
--- a/line_tracker.cpp Tue Mar 04 02:09:54 2014 +0000 +++ b/line_tracker.cpp Tue Mar 04 03:04:00 2014 +0000 @@ -1,10 +1,5 @@ #include "line_tracker.h" -static uint16_t readSensor(uint8_t index) -{ - return lineSensorsAnalog[index].read_u16(); -} - LineTracker::LineTracker() { for(uint8_t s = 0; s < LINE_SENSOR_COUNT; s++) @@ -24,10 +19,7 @@ void LineTracker::readRawValues() { - for(uint8_t s = 0; s < LINE_SENSOR_COUNT; s++) - { - rawValues[s] = readSensor(s); - } + readSensors(rawValues); } void LineTracker::updateCalibratedValues()