AP_Devo_Telem.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. This program is free software: you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation, either version 3 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. */
  13. #pragma once
  14. #include <AP_HAL/AP_HAL.h>
  15. #include <AP_SerialManager/AP_SerialManager.h>
  16. class AP_DEVO_Telem {
  17. public:
  18. //constructor
  19. AP_DEVO_Telem() {}
  20. /* Do not allow copies */
  21. AP_DEVO_Telem(const AP_DEVO_Telem &other) = delete;
  22. AP_DEVO_Telem &operator=(const AP_DEVO_Telem&) = delete;
  23. void init();
  24. private:
  25. uint32_t gpsDdToDmsFormat(float ddm);
  26. // tick - main call to send updates to transmitter
  27. void tick(void);
  28. // send_frames - sends updates down telemetry link
  29. void send_frames();
  30. AP_HAL::UARTDriver *_port; // UART used to send data to receiver
  31. uint32_t _last_frame_ms;
  32. };