Commit graph

143 commits

Author SHA1 Message Date
Andy Taylor 9b8a6c1e2c Always emit source_info and reflector fields in JSON output
Several JSON message builders conditionally omit fields when their
values are empty or null:
 - DMRSlot, P25Control, NXDNControl: source_info omitted when the
   callsign/ID lookup returns an empty string
 - DStarControl: reflector omitted in RF start messages and when
   the reflector pointer is null in network start messages
 - YSFControl: reflector omitted in RF start messages

Downstream consumers (such as Display-Driver) that access these
fields via nlohmann::json const operator[] crash with an assertion
failure when the key is absent.

Always emit these fields with an empty string default so that the
JSON schema is consistent regardless of lookup results or message
source.
2026-03-17 15:04:54 +00:00
Jonathan Naylor d085ca8b0f Merge branch 'master' into mqtt 2025-08-27 17:02:37 +01:00
Daniel Caujolle-Bert 7d2da549c2 CDMRSlot::clock(),
CDStarControl::clock(),
CM17Control::clock(),
CNXDNControl::clock(),
CP25Control::clock(),
CYSFControl::clock():
  - Leave ASAP when it's disabled.

CDMRSlot::enable(),
CDStarControl::enable(),
CM17Control::enable(),
CNXDNControl::enable(),
CP25Control::enable(),
CYSFControl::enable():
  - Log a message when Controller get disabled while running, "<MODE>, RF user has timed out" or "<MODE>, network user has timed out", depending of the RF/Net state.

CMMDVMHost::run():
  - After getting the modem data, don't handle it (read/write<Controler>, etc) if the given mode is not enabled.

MMDVMHost:
  - Rename CMMDVMHost::processEnableCommand() to CMMDVMHost::enableModemMode().
  - Add CMMDVMHost::enableMode() and CMMDVMHost::disableMode(), called now from CMMDVMHost::remoteControl(), which clarify the code.
  - CMMDVMHost::remoteControl():
    * Fix indentation,
    * Simplify ENABLE_x/DISABLE_x cases code.
  - CMMDVMHost::setMode():
    * Enable pocsag network only if m_pocsagEnabled is true,
    * Enable ax25 network only if m_ax25Enabled is true (not m_fmEnabled).
2025-05-29 18:29:42 +02:00
Jonathan Naylor 3109cd03ae Clean ups from merging from master. 2025-03-14 16:11:04 +00:00
Jonathan Naylor 62c33086ca Merge branch 'master' into mqtt 2025-03-14 13:39:49 +00:00
Jonathan Naylor cf15f42a0f Convert to C++ nullptr from NULL. 2025-03-14 12:13:11 +00:00
Jonathan Naylor 43f8b2f6f0 Change all of the enums to the modern format. 2025-03-13 18:16:33 +00:00
Jonathan Naylor 376ff71fea Clean up the RSSI code to work with negative values correctly. 2023-08-05 16:51:55 +01:00
Jonathan Naylor 893952f024 Make all of the rest of the code base be conditionally compiled. 2023-07-03 16:21:35 +01:00
Jonathan Naylor cf9d470f23 Merge branch 'mqtt' into mqtt_plus 2023-06-19 14:08:53 +01:00
Jonathan Naylor 8a80d9678c Disable JSON RSSI reporting when RSSI is not being used. 2023-06-19 13:58:10 +01:00
Steve Miller 4aefe13d46
Update YSFControl.cpp
typo
2023-06-17 13:49:09 -04:00
Jonathan Naylor d01520bea1 Remove all of the display processing from the code. 2023-06-16 17:18:43 +01:00
Jonathan Naylor 46ce993c5d Fix YSF RSSI and BER JSON. 2023-06-16 15:44:20 +01:00
Jonathan Naylor c52ae58816 Add JSON RSSI and BER to P25. 2023-06-11 14:58:29 +01:00
Jonathan Naylor fb5e5b5fa1 Add JSON RSSI and BER messages to YSF. 2023-06-11 14:39:18 +01:00
Jonathan Naylor cf161dbd3d Remove the unneeded source from the JSON except for the start of the transmission. 2023-06-09 17:24:07 +01:00
Jonathan Naylor 8d941db7b1 Simplify the end of transmission JSON for all DV modes. 2023-06-09 15:46:29 +01:00
Jonathan Naylor 0ecf2dec39 Minor rework of JSON creation. 2023-01-19 10:08:50 +00:00
Jonathan Naylor 82dab9a93f Refactor the JSON code and schema. 2023-01-17 13:35:06 +00:00
Jonathan Naylor eb53b0739e Add System Fusion to the JSON status output. 2023-01-07 15:41:14 +00:00
Jonathan Naylor e2e5ddf4c8 Add M17 Codec 1600 mode on RX and remove the remains of M17 packet mode
support.
2021-08-10 19:54:14 +01:00
Jonathan Naylor 50337639b2 Accept rejected or invalid transmissions as being 'in' despite not being
relayed. Also give extra headroom on the convolution decoders.
2021-06-25 16:21:48 +01:00
Jonathan Naylor 8dc54ed21f Ignore M17 packet data, for now. 2021-03-29 19:36:55 +01:00
Jonathan Naylor d77e2a00ce Restore the branch 2020-12-15 16:21:07 +00:00
Jonathan Naylor ff19408e2d Fix bug added in FICH regeneration. 2020-10-13 10:11:13 +01:00
Jonathan Naylor c1171bc052 Regenerate the FICH correctly. 2020-10-13 10:07:31 +01:00
Jonathan Naylor 040ea4a15c Regenerate the odd VW mode message after the header. 2020-09-24 13:47:31 +01:00
Jonathan Naylor c7fbeecc50 Change the displays to show the DG-ID instead of the TO field for YSF. 2020-08-09 19:23:18 +01:00
Jonathan Naylor f070410f7e Display and log the DG-ID in the Fusion mode. 2020-08-09 15:09:08 +01:00
msraya ffd90f6941 Remove DG-ID clear to zero 2020-08-04 18:03:50 +01:00
Jonathan Naylor c57a313677 Revert "YSF updated from msraya."
This reverts commit 7a1b71ecf5.
2020-08-04 10:34:18 +01:00
Manuel Sánchez Raya 01d8fe1a58
Do not remove DG-ID information for use in new servers
Please remove reset to zero or setting of DG-ID because is not necessary. 
There are many reflectors that use DG-ID to change communication between TGs or rooms.
2020-08-03 19:38:21 +02:00
Jonathan Naylor 0eae2c8224 Add extra end of transmission data for YSF. 2019-09-29 16:59:11 +01:00
Jonathan Naylor 0dd446eb29 Fix compile issue. 2019-02-12 20:45:03 +00:00
Jonathan Naylor 72fe13780f Remove the old System Fusion SQL config option and processing. 2019-02-12 11:29:05 +00:00
Jonathan Naylor 6b7dba92aa Correct the YSF DN mode BER calculation based on Andy CA6JAU's
observations.
2019-01-20 20:33:51 +00:00
Jonathan Naylor 0f6945ef4e Stop any response from any mode when not enabled. 2019-01-20 17:09:40 +00:00
Jonathan Naylor ae9e6ea6ab Reset the mode's state machines when going to the disabled state. 2019-01-19 17:15:24 +00:00
Jonathan Naylor 335b56f4bd Add busy lockout to remote mode handling. 2019-01-10 09:05:15 +00:00
Jonathan Naylor 52b1bc4059 Remove MR checking for incoming RF traffic. Should fix remote gateway in
YSF mode.
2018-12-08 10:33:52 +00:00
Andy CA6JAU 52a7f63cdb Fix remote gateway for DR-1X 2018-10-23 21:59:10 -03:00
Jonathan Naylor 980efe3023 Remove the RSSI debug message if nothing interesting to show. 2018-03-06 20:12:29 +00:00
Jonathan Naylor d87b861628 Hopefully fix the remote gateway issues. 2018-02-27 18:34:32 +00:00
Jonathan Naylor e843115928 Add log and screen data from the data when header data is missing. 2018-02-27 18:25:09 +00:00
Jonathan Naylor 83d68c7a01 Add FCS details to the log and display. 2018-02-26 21:59:18 +00:00
Jonathan Naylor d3996c4758 Fix self-only in YSF. 2018-01-09 07:41:04 +00:00
Jonathan Naylor 139be054be Add better validation of DG-ID for DSQ use. 2017-09-17 12:16:14 +01:00
Jonathan Naylor 5fa3b8f524 Handle the new firmware version better. 2017-09-16 19:33:33 +01:00
Jonathan Naylor 7905a75618 Fix various bugs in the new YSF state machine. 2017-08-19 12:08:28 +01:00