Added API function allowing to query the current status of the RX audio squelch
This commit is contained in:
parent
7c978470c2
commit
3c6ad9802c
|
|
@ -88,6 +88,16 @@ public:
|
||||||
{
|
{
|
||||||
return NONE;
|
return NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if RX squelch is open.
|
||||||
|
*
|
||||||
|
* @return true if RX squelch is open.
|
||||||
|
*/
|
||||||
|
virtual bool rxSquelchOpen()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* OPMODE_H */
|
#endif /* OPMODE_H */
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,13 @@ public:
|
||||||
return FM;
|
return FM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if RX squelch is open.
|
||||||
|
*
|
||||||
|
* @return true if RX squelch is open.
|
||||||
|
*/
|
||||||
|
virtual bool rxSquelchOpen() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool rfSqlOpen; ///< Flag for RF squelch status (analog squelch).
|
bool rfSqlOpen; ///< Flag for RF squelch status (analog squelch).
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,16 @@ public:
|
||||||
return M17;
|
return M17;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if RX squelch is open.
|
||||||
|
*
|
||||||
|
* @return true if RX squelch is open.
|
||||||
|
*/
|
||||||
|
virtual bool rxSquelchOpen() override
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,13 @@ void rtx_taskFunc();
|
||||||
*/
|
*/
|
||||||
float rtx_getRssi();
|
float rtx_getRssi();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current status of the RX squelch. This function is thread-safe and can
|
||||||
|
* be called also from threads other than the one running the RTX task.
|
||||||
|
* @return true if RX squelch is open.
|
||||||
|
*/
|
||||||
|
bool rtx_rxSquelchOpen();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -194,3 +194,8 @@ void OpMode_FM::update(rtxStatus_t *const status, const bool newCfg)
|
||||||
// Sleep thread for 30ms for 33Hz update rate
|
// Sleep thread for 30ms for 33Hz update rate
|
||||||
sleepFor(0u, 30u);
|
sleepFor(0u, 30u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool OpMode_FM::rxSquelchOpen()
|
||||||
|
{
|
||||||
|
return sqlOpen;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,3 +207,8 @@ float rtx_getRssi()
|
||||||
{
|
{
|
||||||
return rssi;
|
return rssi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool rtx_rxSquelchOpen()
|
||||||
|
{
|
||||||
|
return currMode->rxSquelchOpen();
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue