[PHY] Added method to set direct mode parameters (#177)
This commit is contained in:
parent
6b46623133
commit
1a2d66305d
2 changed files with 18 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue