|
Re: Motor Control Systems
Our PID started off in OOP fashion, with arrays of pointers to structs representing the motor subsystems, and pointer to functions representing class member functions. It soon fell apart when we started getting memory corruption (garbled printf, Code Error light)
In the end, I reverted back to traditional, procedural C with minimal functions in heavy processing routines (but auton still remains very modular!)
I rest my case that abstraction is still "not there yet" for micro programming, especially with the lack of a properly optimizing compiler (not saying MCC is a bad compiler -- just not 'tough enough' to handle complex C).
__________________
John Dong
Co-Captain, Webmaster / Programmer
Team 245 -- Rochester Adams Robotics
|