CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_ADSB/AP_ADSB_uAvionix_MAVLink.h
Views: 1798
1
#pragma once
2
3
/*
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#include "AP_ADSB_Backend.h"
19
20
#if HAL_ADSB_UAVIONIX_MAVLINK_ENABLED
21
class AP_ADSB_uAvionix_MAVLink : public AP_ADSB_Backend {
22
public:
23
using AP_ADSB_Backend::AP_ADSB_Backend;
24
25
void update() override;
26
27
// static detection function
28
static bool detect();
29
30
private:
31
// send static and dynamic data to ADSB transceiver
32
void send_configure(const mavlink_channel_t chan);
33
void send_dynamic_out(const mavlink_channel_t chan) const;
34
35
// special helpers for uAvionix workarounds
36
uint32_t encode_icao(const uint32_t icao_id) const;
37
uint8_t get_encoded_callsign_null_char(void);
38
};
39
#endif // HAL_ADSB_ENABLED
40
41
42