diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.cpp b/src/protocols/PhysicalLayer/PhysicalLayer.cpp index b30a0cf9..82d04910 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.cpp +++ b/src/protocols/PhysicalLayer/PhysicalLayer.cpp @@ -167,3 +167,13 @@ int32_t PhysicalLayer::random(int32_t min, int32_t max) { return(PhysicalLayer::random(max - min) + min); } + +int16_t PhysicalLayer::startDirect() { + // disable encodings + int16_t state = setEncoding(0); + RADIOLIB_ASSERT(state); + + // set frequency deviation to the lowest possible value + state = setFrequencyDeviation(0); + return(state); +} diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.h b/src/protocols/PhysicalLayer/PhysicalLayer.h index d817fbcc..b3fe2829 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.h +++ b/src/protocols/PhysicalLayer/PhysicalLayer.h @@ -239,7 +239,7 @@ class PhysicalLayer { \param min The minimum value of the random number (inclusive). \param max The maximum value of the random number (non-inclusive). - + \returns Random number. */ int32_t random(int32_t min, int32_t max); @@ -251,6 +251,13 @@ class PhysicalLayer { */ virtual uint8_t random() = 0; + /*! + \brief Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX.25. Only available in FSK mode. + + \returns \ref status_codes + */ + int16_t startDirect(); + #ifndef RADIOLIB_GODMODE private: #endif