![]() |
QPIDfirmware
v0.1
Object oriented firmware for autonomous motor drivers with encoder based PID controller and flexible interface
|
check private, protected, public for all classes
check use of 'override' for all derived classes (because in c++ everything* that makes more fool proob is either optional or not available at all)
AD converters need short pauses between readings on Arduinos. We could use a timer to recycle very fresh readings.
Also, two endstops sharing the same pin don't know from each other, which complicates the possible problem. Needs testing to see if this actually could lead to errors. A possible solution could be based on semaphores or something like that.
Initially developed with only DC motors in mind (PWM, frequency, decay etc.). I'd be better to have an even more generic class and derive QPID_DC_MotorDriver and QPID_Stepper_MotorDriver classes
(done) document abstract methods as implementation guide for derived classes. For now, look at sample DRV8833 class
(done) add fault signaling
Access to the master I2C bus should be regulated, in case other subsystems use I2C too (e.g. endstops on an I2C extender). So, for the moment, watch out for possible problems yourself.
(done?) Can only use the system's default I2C bus (Wire). The library supports providing your own Wire interfaces which would make it possible to use an alternate bus, e.g. if the default bis is used for slave access to the device.
Where are these values saved?
Make options an enum insteat of booleans?
At the moment, no checks are implemented for valid positions, configured PIDs etc.
Implement endstops!!!
(partly done) At the moment, no checks are implemented for valid positions, configured PIDs etc.
(done) Implement endstops!!!
At the moment, no checks are implemented for valid positions, configured PIDs etc.
Implement endstops!!!