[PHY] Added method to set direct mode parameters (#177)

pull/261/head
jgromes 2021-02-13 15:43:16 +01:00
rodzic 6b46623133
commit 1a2d66305d
2 zmienionych plików z 18 dodań i 1 usunięć

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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