kopia lustrzana https://github.com/OpenRTX/OpenRTX
Added API function allowing to query the current status of the RX audio squelch
rodzic
7c978470c2
commit
3c6ad9802c
|
@ -88,6 +88,16 @@ public:
|
|||
{
|
||||
return NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if RX squelch is open.
|
||||
*
|
||||
* @return true if RX squelch is open.
|
||||
*/
|
||||
virtual bool rxSquelchOpen()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* OPMODE_H */
|
||||
|
|
|
@ -81,6 +81,13 @@ public:
|
|||
return FM;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if RX squelch is open.
|
||||
*
|
||||
* @return true if RX squelch is open.
|
||||
*/
|
||||
virtual bool rxSquelchOpen() override;
|
||||
|
||||
private:
|
||||
|
||||
bool rfSqlOpen; ///< Flag for RF squelch status (analog squelch).
|
||||
|
|
|
@ -83,6 +83,16 @@ public:
|
|||
return M17;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if RX squelch is open.
|
||||
*
|
||||
* @return true if RX squelch is open.
|
||||
*/
|
||||
virtual bool rxSquelchOpen() override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
|
|
@ -131,6 +131,13 @@ void rtx_taskFunc();
|
|||
*/
|
||||
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
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -194,3 +194,8 @@ void OpMode_FM::update(rtxStatus_t *const status, const bool newCfg)
|
|||
// Sleep thread for 30ms for 33Hz update rate
|
||||
sleepFor(0u, 30u);
|
||||
}
|
||||
|
||||
bool OpMode_FM::rxSquelchOpen()
|
||||
{
|
||||
return sqlOpen;
|
||||
}
|
||||
|
|
|
@ -207,3 +207,8 @@ float rtx_getRssi()
|
|||
{
|
||||
return rssi;
|
||||
}
|
||||
|
||||
bool rtx_rxSquelchOpen()
|
||||
{
|
||||
return currMode->rxSquelchOpen();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue