From 3f6189c103b2d1c6bd72c462fffbd41da9343d69 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 16 Feb 2016 17:37:12 +0000 Subject: [PATCH] Small additions to the System Fusion controller. --- YSFControl.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/YSFControl.cpp b/YSFControl.cpp index 63120bb..32ea508 100644 --- a/YSFControl.cpp +++ b/YSFControl.cpp @@ -21,6 +21,14 @@ // #define DUMP_YSF +/* + * TODO: + * AMBE FEC reconstruction. + * FICH regeneration. + * Callsign extraction + late entry. + * Uplink and downlink callsign addition. + */ + CYSFControl::CYSFControl(const std::string& callsign, IDisplay* display, unsigned int timeout, bool duplex) : m_display(display), m_duplex(duplex), @@ -60,6 +68,9 @@ bool CYSFControl::writeModem(unsigned char *data) m_display->writeFusion("XXXXXX"); m_state = RS_RELAYING_RF_AUDIO; LogMessage("YSF, received RF header"); +#if defined(DUMP_YSF) + openFile(); +#endif } if (m_state != RS_RELAYING_RF_AUDIO) @@ -76,6 +87,10 @@ bool CYSFControl::writeModem(unsigned char *data) writeQueue(data); } +#if defined(DUMP_YSF) + writeFile(data + 2U); +#endif + LogMessage("YSF, received RF end of transmission, %.1f seconds", float(m_frames) / 10.0F); writeEndOfTransmission(); @@ -91,6 +106,10 @@ bool CYSFControl::writeModem(unsigned char *data) data[1U] = 0x00U; writeQueue(data); } + +#if defined(DUMP_YSF) + writeFile(data + 2U); +#endif } return true;