Commit graph

316 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 19ead93af9 Fix some search & replace mistakes. 2025-03-14 16:31:29 +00: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 78fc96b0a5 Add new processing for D-Star Fast Data which doesn't clobber normal
D-Star audio.
2025-03-12 12:55:25 +00:00
Jonathan Naylor ac6842fe2c Merge branch 'master' into mqtt 2024-10-04 17:37:55 +01:00
Jonathan Naylor ebea3eddb2 Revert "Amalgamate the two Trellis implementations and small cleanups."
This reverts commit ec9f7d7496.
2024-10-04 17:14:36 +01:00
Jonathan Naylor 84c9da7e8f Merge branch 'master' into mqtt 2024-10-02 14:59:58 +01:00
Jonathan Naylor ec9f7d7496 Amalgamate the two Trellis implementations and small cleanups. 2024-10-02 14:42:25 +01:00
Jonathan Naylor d9e2f52ae6 Fixes for VS2019, and the use of a different compiler. 2024-05-30 14:53:55 +01:00
Jonathan Naylor 1a42cb1021 Merge branch 'mqtt' into mqtt_plus 2023-09-27 14:43:57 +01:00
Jonathan Naylor b714b56c32 Merge branch 'master' into mqtt 2023-09-27 14:37:31 +01:00
Jonathan Naylor 05db572738 Fix formatting. 2023-09-27 14:29:34 +01:00
Alex Ernst a79793ee8a Fix formatting 2023-09-18 13:28:42 +02:00
Alex Ernst 3a670f84c9 Add debugging messages for DMR data packets 2023-09-17 22:36:43 +02: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
Jonathan Naylor d01520bea1 Remove all of the display processing from the code. 2023-06-16 17:18:43 +01:00
Jonathan Naylor f5e82b6019 Merge branch 'mqtt' into mqtt_plus 2023-06-16 15:45:17 +01:00
Jonathan Naylor ac076a7a23 Fix DMR JSON handling. 2023-06-16 12:58:29 +01:00
Jonathan Naylor 8da6556440 Add JSON RSSI, DMR and Talker Alias to DMR. 2023-06-11 11:38:59 +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 2ac5b1bcfe Merge branch 'master' into mqtt 2023-06-07 11:38:23 +01:00
Jonathan Naylor d709c2bc60 Clean up the DMR Talker Alias code and logging. 2023-06-06 20:33:25 +01:00
Jonathan Naylor 391e382a7b Remove the direct network access to DMR Masters. 2023-06-05 17:30:39 +01:00
Jonathan Naylor 0ecf2dec39 Minor rework of JSON creation. 2023-01-19 10:08:50 +00:00
Jonathan Naylor 72f249b12e Add DMR to JSON/MQTT. 2023-01-18 17:58:53 +00:00
rick51231 ecf21f9573 Emergency call CSBK support. 2022-12-15 14:11:40 +03:00
Jonathan Naylor fe195c4e40 Rewrite the OVCM handling. 2022-05-23 22:35:14 +01:00
iddq 82024fae5f Add Radio Check CSBK 2022-03-04 10:53:54 +01: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 bfacdee8e2 Merge branch 'master' into M17_AX25_FM 2021-08-09 22:14:15 +01:00
Stefan Saraev 61e5623ad3 DMRSlot: reset m_rfState after rejecting rf activity 2021-08-08 00:29:34 +03:00
Jonathan Naylor 8dc54ed21f Ignore M17 packet data, for now. 2021-03-29 19:36:55 +01:00
Jonathan Naylor 5d8d1a3fb9 Add mode 4 (force off) for the DMR OVCM flag. 2021-03-07 17:42:55 +00:00
Randy Hall c6f5a21a27
Proposed fix for #683
Adding 2 byte offset to the data pointer passed to CDMRTA::add() in the "RF" section of CDMRSlot.cpp::writeModem(). Fixes the bug that incorrectly decodes talker alias coming in over RF.
2021-03-07 07:27:34 -08:00
Jonathan Naylor 135fd04e0d Revert "Merge branch 'M17_AX25_FM'"
This reverts commit e1427e3e37, reversing
changes made to bcdba292eb.
2020-12-15 15:52:27 +00:00
Jonathan Naylor ef6056506c Merge branch 'master' into M17_AX25_FM 2020-12-06 16:46:10 +00:00
Jonathan Naylor 136deac61a Allow optional direct connections to masters again. 2020-12-06 16:12:54 +00:00
Jonathan Naylor aa8b78a311 Refactor the Modem class hierarchy. 2020-06-30 12:35:03 +01:00
SASANO Takayoshi 4ff77c50d6 use UserDBentry from findWithName() to writeDMR(), add writeDMREx() 2020-03-08 08:06:27 +09:00
Jonathan Naylor ab13f355d5 Add decode for Call Alert and Call Alert Ack CSBKs. 2020-03-02 12:10:44 +00:00
SASANO Takayoshi 45013ac179 Lookup name on DMR network late entry (2)
There is two cases that shows "received network late entry"

1. dataType == DT_VOICE_PI_HEADER && m_netState != RS_NET_AUDIO
2. dataType == DT_VOICE_SYNC && m_netState == RS_NET_IDLE

case 1 is already treated. this fix is for case 2.
2020-02-17 19:57:47 +09:00