Bugfix: Unlogical tg activation when OPEN_SQL_FLANK=CLOSE
The behaviour of talkgroup activation was not logical when using a RepeaterLogic with OPEN_SQL_FLANK=CLOSE. The selected talkgroup would be announced before the PTT was released and the next reception (the second one) was filtered out by the MUTE_FIRST_TX_LOC=1 feature which made it a bit confusing to understand when audio actually started to be sent to the reflector.
This commit is contained in:
parent
4ce8e7893d
commit
df6de421ae
|
|
@ -318,7 +318,7 @@ class LogicBase : public sigc::trackable
|
|||
* This function is used by a logic implementation to set which talk group
|
||||
* that local traffic is received on.
|
||||
*/
|
||||
void setReceivedTg(uint32_t tg)
|
||||
virtual void setReceivedTg(uint32_t tg)
|
||||
{
|
||||
m_received_tg = tg;
|
||||
receivedTgUpdated(tg);
|
||||
|
|
|
|||
|
|
@ -1559,10 +1559,6 @@ void ReflectorLogic::onLogicConInStreamStateChanged(bool is_active,
|
|||
// << is_active << " is_idle=" << is_idle << endl;
|
||||
if (is_idle)
|
||||
{
|
||||
if ((m_logic_con_in_valve != 0) && (m_selected_tg > 0))
|
||||
{
|
||||
m_logic_con_in_valve->setOpen(true);
|
||||
}
|
||||
if (m_qsy_pending_timer.isEnabled())
|
||||
{
|
||||
std::ostringstream os;
|
||||
|
|
@ -1576,6 +1572,10 @@ void ReflectorLogic::onLogicConInStreamStateChanged(bool is_active,
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((m_logic_con_in_valve != 0) && (m_selected_tg > 0))
|
||||
{
|
||||
m_logic_con_in_valve->setOpen(true);
|
||||
}
|
||||
if (m_tg_select_timeout_cnt == 0) // No TG currently selected
|
||||
{
|
||||
if (m_default_tg > 0)
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ RepeaterLogic::RepeaterLogic(Async::Config& cfg, const std::string& name)
|
|||
open_sql_flank(SQL_FLANK_CLOSE),
|
||||
short_sql_open_cnt(0), sql_flap_sup_min_time(1000),
|
||||
sql_flap_sup_max_cnt(0), rgr_enable(true), open_reason("?"),
|
||||
ident_nag_min_time(2000), ident_nag_timer(-1)
|
||||
ident_nag_min_time(2000), ident_nag_timer(-1), delayed_tg_activation(0)
|
||||
{
|
||||
up_timer.expired.connect(mem_fun(*this, &RepeaterLogic::idleTimeout));
|
||||
open_on_sql_timer.expired.connect(
|
||||
|
|
@ -450,6 +450,19 @@ void RepeaterLogic::dtmfCtrlPtyCmdReceived(const void *buf, size_t count)
|
|||
} /* RepeaterLogic::dtmfCtrlPtyCmdReceived */
|
||||
|
||||
|
||||
void RepeaterLogic::setReceivedTg(uint32_t tg)
|
||||
{
|
||||
if (repeater_is_up || !activate_on_sql_close)
|
||||
{
|
||||
Logic::setReceivedTg(tg);
|
||||
}
|
||||
else
|
||||
{
|
||||
delayed_tg_activation = tg;
|
||||
}
|
||||
} /* RepeaterLogic::setReceivedTg */
|
||||
|
||||
|
||||
#if 0
|
||||
bool RepeaterLogic::getIdleState(void) const
|
||||
{
|
||||
|
|
@ -642,6 +655,8 @@ void RepeaterLogic::squelchOpen(bool is_open)
|
|||
{
|
||||
activate_on_sql_close = false;
|
||||
setUp(true, open_reason);
|
||||
Logic::setReceivedTg(delayed_tg_activation);
|
||||
delayed_tg_activation = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ class RepeaterLogic : public Logic
|
|||
virtual void allMsgsWritten(void);
|
||||
virtual void audioStreamStateChange(bool is_active, bool is_idle);
|
||||
virtual void dtmfCtrlPtyCmdReceived(const void *buf, size_t count);
|
||||
|
||||
virtual void setReceivedTg(uint32_t tg);
|
||||
|
||||
private:
|
||||
typedef enum
|
||||
|
|
@ -204,7 +204,8 @@ class RepeaterLogic : public Logic
|
|||
std::string open_reason;
|
||||
int ident_nag_min_time;
|
||||
Async::Timer ident_nag_timer;
|
||||
|
||||
uint32_t delayed_tg_activation;
|
||||
|
||||
void idleTimeout(Async::Timer *t);
|
||||
void setIdle(bool idle);
|
||||
void setUp(bool up, std::string reason);
|
||||
|
|
|
|||
Loading…
Reference in New Issue