UpdateQTRs module
Houses the UpdateQTRs task class.
- class UpdateQTRs.UpdateQTRs(qtrfront: QTRSensors, qtrrear: QTRSensors, s_pos: Share, linePosTarget_front: int = 3000, linePosTarget_rear: int = 2000)
Bases:
object
“Manages BOTH QTR sensors.
Maintans a singular s_pos value to replace the “pos” variable that used to be in LineFollower.
- Parameters:
qtrfront (QTRSensors.QTRSensors) – Front sensor.
qtrrear (QTRSensors.QTRSensors) – Rear sensor.
s_pos (Share) – Composite guess of line position.
linePosTarget_front (int, optional) – Target front line pos, only used for rear position scaling in this class. Defaults to 3000.
linePosTarget_rear (int, optional) – Target rear line pos, only used for rear position scaling in this class. Defaults to 2000.
- run()
Implementation as a generator function
- Yields:
int – machine state