Skip to content

Commit

Permalink
AP_ADSB: add option to force Mode3AC Only
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub committed Dec 15, 2024
1 parent 137915a commit a48ff84
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_ADSB/AP_ADSB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const AP_Param::GroupInfo AP_ADSB::var_info[] = {
// @Param: OPTIONS
// @DisplayName: ADS-B Options
// @Description: Options for emergency failsafe codes and device capabilities
// @Bitmask: 0:Ping200X Send GPS,1:Squawk 7400 on RC failsafe,2:Squawk 7400 on GCS failsafe,3:Sagetech MXS use External Config
// @Bitmask: 0:Ping200X Send GPS,1:Squawk 7400 on RC failsafe,2:Squawk 7400 on GCS failsafe,3:Sagetech MXS use External Config,4:Transmit in traditional Mode 3A/C only and inhibit Mode-S and ES (ADSB) transmissions
// @User: Advanced
AP_GROUPINFO("OPTIONS", 15, AP_ADSB, _options, 0),

Expand Down
1 change: 1 addition & 0 deletions libraries/AP_ADSB/AP_ADSB.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class AP_ADSB {
Squawk_7400_FS_RC = (1<<1),
Squawk_7400_FS_GCS = (1<<2),
SagteTech_MXS_External_Config = (1<<3),
Mode3_Only = (1<<4),
};

// for holding parameters
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void AP_ADSB_Sagetech_MXS::update()
last.operating_rf_select = _frontend.out_state.cfg.rfSelect;
last.modeAEnabled = _frontend.out_state.ctrl.modeAEnabled;
last.modeCEnabled = _frontend.out_state.ctrl.modeCEnabled;
last.modeSEnabled = _frontend.out_state.ctrl.modeSEnabled;
last.modeSEnabled = (_frontend._options & uint32_t(AP_ADSB::AdsbOption::Mode3_Only)) ? 0 : _frontend.out_state.ctrl.modeSEnabled;

last.operating_alt = _frontend._my_loc.alt;
last.packet_Operating_ms = now_ms;
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_ADSB/AP_ADSB_uAvionix_UCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ void AP_ADSB_uAvionix_UCP::send_Transponder_Control()
_frontend.out_state.ctrl.identActive = false; // only send identButtonActive once per request
msg.modeAEnabled = _frontend.out_state.ctrl.modeAEnabled;
msg.modeCEnabled = _frontend.out_state.ctrl.modeCEnabled;
msg.modeSEnabled = _frontend.out_state.ctrl.modeSEnabled;
msg.es1090TxEnabled = _frontend.out_state.ctrl.es1090TxEnabled;
msg.modeSEnabled = (_frontend._options & uint32_t(AP_ADSB::AdsbOption::Mode3_Only)) ? 0 : _frontend.out_state.ctrl.modeSEnabled;
msg.es1090TxEnabled = (_frontend._options & uint32_t(AP_ADSB::AdsbOption::Mode3_Only)) ? 0 : _frontend.out_state.ctrl.es1090TxEnabled;

// if enabled via param ADSB_OPTIONS, use squawk 7400 while in any Loss-Comms related failsafe
// https://www.faa.gov/documentLibrary/media/Notice/N_JO_7110.724_5-2-9_UAS_Lost_Link_2.pdf
Expand Down

0 comments on commit a48ff84

Please sign in to comment.