Commit graph

155 commits

Author SHA1 Message Date
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 8e0705e2a9 Switch off D-Star fast data for now. 2025-04-24 14:41:45 +01:00
Jonathan Naylor 3a2c2fadaa Enable the network watchdog timer for fast data. 2025-04-22 13:30:20 +01:00
Jonathan Naylor 65ebb55171 Fix an overlooked D-Star frame counter setting. 2025-04-19 18:55:19 +01:00
Jonathan Naylor 5d2f528ec7 Fix some naming issues around NULL and a D-Star bug with frame counts. 2025-04-19 16:36:00 +01:00
Jonathan Naylor 05b9c4d79b Clean up the slow data handling. 2025-04-17 12:32:54 +01:00
Jonathan Naylor 29af1f9258 Revert some D-Star slow data changes. 2025-03-27 18:27:48 +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 351c1199fb Remove the D-Star fast data handling for now as it appears to be
mangling D-Star DTMF data.
2025-02-27 12:46:25 +00:00
Jonathan Naylor af21cef54d Add interpretation of D-Star slow data text. 2023-06-16 11:35:16 +01:00
Jonathan Naylor f75ad66a33 Handle the case where the D-Star RF timeout timer is not stopped at the end of a transmission. 2023-01-11 19:35:23 +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 f9e953d687 D-Star rejected transmissions are still valid RF for the host. 2021-06-25 09:58:34 +01:00
Jonathan Naylor c7effe5e2d Merge branch 'master' into M17_AX25_FM 2021-06-03 19:08:17 +01:00
Geoffrey Merck deff9910eb Fix Sprintf warnings (maybe should consider moving to std::string) 2021-05-31 21:02:35 +02:00
Jonathan Naylor 8363a72f6a Merge branch 'master' into M17_AX25_FM 2021-05-18 20:05:40 +01:00
Jonathan Naylor e2d61d1572 Clean up the D-Star Control class a little. 2021-05-18 19:44:41 +01:00
Geoffrey d7c95f05f0 Add leading 0 to + 2021-05-17 07:14:26 +02:00
Geoffrey 0e39d81797 Remove leading - and trailing + where not needed 2021-05-15 12:22:39 +02:00
Geoffrey 19d234a627 Make sure dBm is not truncated when RSSI < 99 2021-05-15 07:06:37 +02:00
Geoffrey f5e3427cd8 Add SMeter to DStar ack and error 2021-05-15 06:51:12 +02:00
Geoffrey Merck 4c4ea18319 Forgot that slow data is limited to 20 chars -_- 2021-05-04 21:07:35 +02:00
Geoffrey Merck 39620c22bd Also send BER with RSSI in Ack 2021-05-04 21:02:41 +02:00
Geoffrey Merck 77741318a0 Always send BER and RSSI in Dstar ack 2021-05-04 20:46:14 +02:00
Jonathan Naylor 8dc54ed21f Ignore M17 packet data, for now. 2021-03-29 19:36:55 +01:00
Jonathan Naylor 6344f8b9ef Merge branch 'master' into M17_AX25_FM 2021-01-02 12:56:27 +00:00
Tim Stewart 0e6208cc67 Add frame content details to D-Star debug logging
Commit bf5651b deleted all log entries related to D-Star frame
contents.  This change adds some detail to the existing D-Star frame
debugging log entries.  Rather than always printing "audio", frames
may be logged as one of "audio", "nullaudio", or "fastdata".

A minimum width has been set for some fields so that the log messages
form columns while watching a data stream.

By virtue of centralizing the frame log messages, this commit also
adds debugging entries for frames originating from the network.

Example log entries that contain all three types as generated by a
Kenwood TH-D74 using fast data:

  M: 2021-01-01 19:52:44.255 D-Star, received RF header from KG4BXH  /D74  to CQCQCQ
  D: 2021-01-01 19:52:44.282 D-Star, RF nullaudio sequence no.  0
  D: 2021-01-01 19:52:44.282 D-Star, RF nullaudio sequence no.  1
  D: 2021-01-01 19:52:44.309 D-Star, RF nullaudio sequence no.  2
  D: 2021-01-01 19:52:44.332 D-Star, RF nullaudio sequence no.  3
  D: 2021-01-01 19:52:44.354 D-Star, RF nullaudio sequence no.  4
  D: 2021-01-01 19:52:44.365 D-Star, RF nullaudio sequence no.  5
  D: 2021-01-01 19:52:44.388 D-Star, RF nullaudio sequence no.  6
  D: 2021-01-01 19:52:44.404 D-Star, RF nullaudio sequence no.  7
  D: 2021-01-01 19:52:44.426 D-Star, RF nullaudio sequence no.  8
  D: 2021-01-01 19:52:44.443 D-Star, RF nullaudio sequence no.  9
  D: 2021-01-01 19:52:44.465 D-Star, RF nullaudio sequence no. 10
  D: 2021-01-01 19:52:44.488 D-Star, RF nullaudio sequence no. 11
  D: 2021-01-01 19:52:44.510 D-Star, RF nullaudio sequence no. 12
  D: 2021-01-01 19:52:44.526 D-Star, RF nullaudio sequence no. 13
  D: 2021-01-01 19:52:44.543 D-Star, RF nullaudio sequence no. 14
  D: 2021-01-01 19:52:44.565 D-Star, RF nullaudio sequence no. 15
  D: 2021-01-01 19:52:44.588 D-Star, RF nullaudio sequence no. 16
  D: 2021-01-01 19:52:44.604 D-Star, RF nullaudio sequence no. 17
  D: 2021-01-01 19:52:44.627 D-Star, RF nullaudio sequence no. 18
  D: 2021-01-01 19:52:44.649 D-Star, RF nullaudio sequence no. 19
  D: 2021-01-01 19:52:44.665 D-Star, RF nullaudio sequence no. 20
  D: 2021-01-01 19:52:44.704 D-Star, RF fastdata  sequence no.  0
  D: 2021-01-01 19:52:44.704 D-Star, RF fastdata  sequence no.  1
  D: 2021-01-01 19:52:44.726 D-Star, RF fastdata  sequence no.  2
  D: 2021-01-01 19:52:44.748 D-Star, RF fastdata  sequence no.  3
  D: 2021-01-01 19:52:44.765 D-Star, RF fastdata  sequence no.  4
   ... many fastdata frames elided ...
  D: 2021-01-01 19:52:45.486 D-Star, RF fastdata  sequence no. 19
  D: 2021-01-01 19:52:45.508 D-Star, RF fastdata  sequence no. 20
  D: 2021-01-01 19:52:45.548 D-Star, RF fastdata  sequence no.  0
  D: 2021-01-01 19:52:45.548 D-Star, RF fastdata  sequence no.  1
  D: 2021-01-01 19:52:45.565 D-Star, RF fastdata  sequence no.  2
  D: 2021-01-01 19:52:45.587 D-Star, RF audio     sequence no.  3, errs:  0/48 (  0.0%)
  D: 2021-01-01 19:52:45.609 D-Star, RF audio     sequence no.  4, errs:  0/48 (  0.0%)
  D: 2021-01-01 19:52:45.631 D-Star, RF audio     sequence no.  5, errs:  0/48 (  0.0%)
  D: 2021-01-01 19:52:45.648 D-Star, RF audio     sequence no.  6, errs:  0/48 (  0.0%)
  D: 2021-01-01 19:52:45.670 D-Star, RF audio     sequence no.  7, errs:  0/48 (  0.0%)
  D: 2021-01-01 19:52:45.687 D-Star, RF audio     sequence no.  8, errs:  0/48 (  0.0%)
  D: 2021-01-01 19:52:45.709 D-Star, RF fastdata  sequence no.  9
  D: 2021-01-01 19:52:45.731 D-Star, RF fastdata  sequence no. 10
  D: 2021-01-01 19:52:45.753 D-Star, RF fastdata  sequence no. 11
  D: 2021-01-01 19:52:45.775 D-Star, RF fastdata  sequence no. 12
  D: 2021-01-01 19:52:45.786 D-Star, RF fastdata  sequence no. 13
   ... many more fastdata frames with periodic audio as above ...
2021-01-01 17:55:48 -05:00
Jonathan Naylor d77e2a00ce Restore the branch 2020-12-15 16:21:07 +00: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 99a4d37082 Merge branch 'master' into M17_AX25_FM 2020-12-14 10:14:53 +00:00
Tim Stewart bf5651b7a0 Remove DV Fast Data debugging statements 2020-12-13 19:27:38 -05:00
Tim Stewart b2844bc0a6 Avoid FEC regeneration and DTMF blanking for null AMBE data
FEC recalculation always reports errors for null AMBE frames, and
there is no DTMF present by definition.

In practice, null AMBE data is often (always?) sent by the Kenwood
TH-D74 in the first 21 voice frames, and I've also seen it at the end
of a fast data transmission.
2020-12-13 19:25:09 -05:00
Tim Stewart efe9b3d459 Process FEC and DTMF on Voice frames followed by Sync frame
Rather than skipping FEC recalculation and DTMF blanking on Voice
frames that do not have a corresponding mini-header (i.e. Voice frames
followed by a Sync frame), set aside the frame's data.  The data is
processed and submitted to the modem/network during the next
iteration, once the presence of DV Fast Data can be determined.
2020-11-29 16:26:32 -05:00
Tim Stewart 8874d1262b Detect DV Fast Data on a per-frame basis
This commit adds a maybeFixupVoiceFrame() function that is used by
both the RF and Net code to manage FEC regeneration and DTMF blanking
in voice frames.

The presence of Fast Data is discovered by reading the mini-header in
every second data frame.  If found, FEC regeneration and DTMF blanking
are disabled for the current and next voice frames.

An exception is voice frames that have a sync frame instead of a data
frame.  This commit always disables FEC regeneration and DTMF blanking
for these frames.  A later commit will add support for these frames by
setting aside the voice frame until the next data frame can be read.

This commit also includes a number of debugging statements that will
be removed in a later commit.
2020-11-29 16:12:58 -05:00
Tim Stewart 8656aaedaa Add back desired changes that were reverted 2020-11-27 18:36:39 -05:00
Tim Stewart 1fd1a4f6d1 Revert "First attempt at detecting D-Star data frames, Kenwood and Icom."
This reverts commit 3362e29b62.
2020-11-27 18:01:02 -05:00
Tim Stewart 7aabb96351 Revert "Fix a bug and add a second Icom D-Star fast data mode identifier."
This reverts commit 18398efe97.
2020-11-27 17:51:22 -05:00
Tim Stewart 821db7910a Revert "Regenerate the data mode markers."
This reverts commit 54fbacb487.
2020-11-27 17:51:06 -05:00
Tim Stewart 4f0f0fea66 Revert "Don't insert silence on lost D-Star fast data."
This reverts commit 1bd814a079.
2020-11-27 17:50:47 -05:00
Tim Stewart b8ae0febb0 Revert "New way to detect D-Star fast data mode."
This reverts commit a9b7179d13.
2020-11-27 17:47:51 -05:00
Tim Stewart 2d2b736c54 Revert "Don't forget to descramble the byte first."
This reverts commit 16bf9d5745.
2020-11-27 17:47:24 -05:00
Tim Stewart 449ca905ee Revert "Place the scrambled null data regeneration into the right place."
This reverts commit 59cb07329d.
2020-11-27 17:47:04 -05:00
Tim Stewart fcad5ee0d2 Revert "Only test the slow data type in the correct place."
This reverts commit ff0082b18b.
2020-11-27 17:46:19 -05:00
Tim Stewart bbbfbbbfad Revert "Simplify the D-Star sequence number processing."
This reverts commit 99d4a9bc51.
2020-11-27 17:45:19 -05:00
Tim Stewart 7ea37fc5e9 Revert "Fix the silence insertion for D-Star."
This reverts commit 9cc2bfaaec.
2020-11-27 17:44:33 -05:00
Tim Stewart c94f4f5d4a Revert "Check the guard byte on fast data as well as the mini header."
This reverts commit 317bda0177.
2020-11-27 17:14:31 -05:00
Tim Stewart a87449bf51 Revert "Loosen fast data admission criteria."
This reverts commit 6d719353c6.
2020-11-27 17:14:10 -05:00