2018-03-04 05:41:06 -04:00
|
|
|
/*
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL.h>
|
|
|
|
|
2021-11-18 23:34:22 -04:00
|
|
|
#ifndef AP_DEVO_TELEM_ENABLED
|
|
|
|
#define AP_DEVO_TELEM_ENABLED 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if AP_DEVO_TELEM_ENABLED
|
2018-03-04 05:41:06 -04:00
|
|
|
class AP_DEVO_Telem {
|
|
|
|
public:
|
|
|
|
//constructor
|
2019-02-13 01:01:12 -04:00
|
|
|
AP_DEVO_Telem() {}
|
2018-03-04 05:41:06 -04:00
|
|
|
|
|
|
|
/* Do not allow copies */
|
2022-09-30 06:50:43 -03:00
|
|
|
CLASS_NO_COPY(AP_DEVO_Telem);
|
2018-03-04 05:41:06 -04:00
|
|
|
|
2019-02-13 00:44:33 -04:00
|
|
|
void init();
|
2018-03-04 05:41:06 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2021-11-11 12:29:26 -04:00
|
|
|
uint32_t gpsDdToDmsFormat(int32_t ddm);
|
2018-03-04 05:41:06 -04:00
|
|
|
|
2019-02-13 00:46:31 -04:00
|
|
|
// tick - main call to send updates to transmitter
|
2018-03-04 05:41:06 -04:00
|
|
|
void tick(void);
|
|
|
|
|
|
|
|
// send_frames - sends updates down telemetry link
|
2019-02-13 19:12:14 -04:00
|
|
|
void send_frames();
|
2018-03-04 05:41:06 -04:00
|
|
|
|
|
|
|
AP_HAL::UARTDriver *_port; // UART used to send data to receiver
|
|
|
|
uint32_t _last_frame_ms;
|
|
|
|
|
|
|
|
};
|
2021-11-18 23:34:22 -04:00
|
|
|
#endif
|