I'm writing a quick GPS_MEDIATEK library in order to use my MediaTek GPS with the ArduPilot Mega project and I have question about code structure. Is there a particular reason why DIYDrones has chosen to put the GPS libraries in entirely separate include files? Why not have a single "gps.h" that contains an abstract GPS class, and then includes the correct GPS implementation based on a constant defined elsewhere in the project? This is the approach WinAVR takes -- programmers include "io.h" and define what AVR they're using; they don't include "atmega1280io.h".
Thanks! --Ben
You need to be a member of diydrones to add comments!
The separate includes vs abstract class is pure inertia. That's the way it was done before I started working on Ardupilot and there is really no way to change it. As for Mega, Jose is architecting the GPS library.
Replies
GPS_MTK.zip
The separate includes vs abstract class is pure inertia. That's the way it was done before I started working on Ardupilot and there is really no way to change it. As for Mega, Jose is architecting the GPS library.