The never complete autopilot.

HACKING 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Hacking
  2. =======
  3. Build
  4. -----
  5. Uses the GNU autotools. Run `autogen -i`; `mkdir build`; `cd build`;
  6. `../configure --prefix=$PWD/install`; `make`.
  7. Layout
  8. ------
  9. Headers are mixed with implementation. Code is platform-agnistic,
  10. except for the innermost functions which are defined in independent
  11. code and implemented under platforms/. Implementations favour a cheap
  12. embedded implementation.
  13. lib/
  14. - common library functions
  15. platform/
  16. - platform specific implementations
  17. experiments/
  18. - small experiments made along the way
  19. external/
  20. - third party libraries
  21. Style
  22. -----
  23. Uses C++11, GCC extensions, and binutils features to make the code
  24. easier to read and maintain.
  25. Product specific behaviour is done by implementing functions in the
  26. common classes. The functions are normally wired together in a
  27. product specific file.
  28. For example, Timer::dispatch() is called when a timer expires. The
  29. platform wiring implements Timer::dispatch() to call
  30. Switcher::trigger() with the platform specific timer callback ID. The
  31. wiring also implements Switcher::dispatch() which calls the event
  32. handler.
  33. Hardware interface
  34. ------------------
  35. Events are generated by the HAL, timers, and other functions. Events
  36. are recorded in a Switcher and then dispatched in priority order.
  37. Event handlers are short and run to completion.
  38. Status
  39. ------
  40. Always out of date, but still.
  41. STM32:
  42. * Basic startup
  43. * System tick driver
  44. * GPIO driver
  45. * USART driver (for GPS)
  46. * PWM input driver (for reading the receiver demands)
  47. * PWM output driver (for driving the servo)
  48. * USB ACM driver
  49. * Watchdog driver
  50. * Serial log based debugging
  51. roverif:
  52. * Application level timers
  53. * Switcher for dispatching events
  54. * Status LED
  55. * Supervisor
  56. * Fail safe configuration
  57. * Software fault fail safe
  58. * GPS driver
  59. * Accelerometer driver
  60. * Gyro driver