Fix ANNOUNCE_REMOTE_MIN_INTERVAL
The ANNOUNCE_REMOTE_MIN_INTERVAL configuration variable did not work so the defaut time was always used. The default is now 0 so the feature is disabled if not set in the configuration file.
This commit is contained in:
parent
ab4fc256ef
commit
879c8761a8
|
|
@ -263,10 +263,6 @@ bool ReflectorLogic::initialize(void)
|
|||
m_event_handler->playTone.connect(sigc::bind<0>(
|
||||
mem_fun(LinkManager::instance(), &LinkManager::playTone), this));
|
||||
m_event_handler->setVariable("logic_name", name().c_str());
|
||||
if (!m_event_handler->initialize())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_event_handler->processEvent("namespace eval Logic {}");
|
||||
list<string> cfgvars = cfg().listSection(name());
|
||||
|
|
@ -279,6 +275,11 @@ bool ReflectorLogic::initialize(void)
|
|||
m_event_handler->setVariable(var, value);
|
||||
}
|
||||
|
||||
if (!m_event_handler->initialize())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!LogicBase::initialize())
|
||||
{
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ variable prev_announce_tg 0
|
|||
|
||||
# The minimum time between announcements of the same TG.
|
||||
# Change through ANNOUNCE_REMOTE_MIN_INTERVAL config variable.
|
||||
variable announce_remote_min_interval 300
|
||||
variable announce_remote_min_interval 0
|
||||
|
||||
#
|
||||
# Checking to see if this is the correct logic core
|
||||
|
|
@ -88,6 +88,7 @@ proc tg_local_activation {new_tg old_tg} {
|
|||
proc tg_remote_activation {new_tg old_tg} {
|
||||
variable prev_announce_time
|
||||
variable prev_announce_tg
|
||||
variable announce_remote_min_interval
|
||||
|
||||
#puts "### tg_remote_activation"
|
||||
set now [clock seconds];
|
||||
|
|
@ -193,8 +194,8 @@ proc talker_stop {tg callsign} {
|
|||
}
|
||||
|
||||
|
||||
if [info exists CFG_ANNOUNCE_REMOTE_MIN_INTERVAL] {
|
||||
set announce_remote_min_interval $CFG_ANNOUNCE_REMOTE_MIN_INTERVAL
|
||||
if [info exists ::Logic::CFG_ANNOUNCE_REMOTE_MIN_INTERVAL] {
|
||||
set announce_remote_min_interval $::Logic::CFG_ANNOUNCE_REMOTE_MIN_INTERVAL
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ AUTH_KEY="Change this key now!"
|
|||
#DEFAULT_TG=1
|
||||
#MONITOR_TGS=1 2 3
|
||||
#TG_SELECT_TIMEOUT=30
|
||||
#ANNOUNCE_REMOTE_MIN_INTERVAL=300
|
||||
ANNOUNCE_REMOTE_MIN_INTERVAL=300
|
||||
EVENT_HANDLER=@SVX_SHARE_INSTALL_DIR@/events.tcl
|
||||
|
||||
[LinkToR4]
|
||||
|
|
|
|||
Loading…
Reference in New Issue