diff --git a/src/async/core/AsyncTcpPrioClientBase.cpp b/src/async/core/AsyncTcpPrioClientBase.cpp index ffe0bf6a..0693c30d 100644 --- a/src/async/core/AsyncTcpPrioClientBase.cpp +++ b/src/async/core/AsyncTcpPrioClientBase.cpp @@ -481,7 +481,7 @@ class TcpPrioClientBase::Machine : Async::StateBase { static constexpr auto NAME = "ConnectedLowerPrio"; - }; /* StateConnecting */ + }; /* StateConnectedLowerPrio */ struct StateConnectedLowerPrioIdle diff --git a/src/doc/man/devcal.1 b/src/doc/man/devcal.1 index 6d9c35aa..c0ef4d3b 100644 --- a/src/doc/man/devcal.1 +++ b/src/doc/man/devcal.1 @@ -54,10 +54,10 @@ neighbouring channels. The default value is 5000Hz. .BI "-H|--headroom=" "headroom in dB" The headroom is the margin to add above the maximum deviation level. Adding a headroom will allow SvxLink to handle levels above the maximum deviation level -without causing immediate distorsion. The default is 6dB which mean that +without causing immediate distortion. The default is 6dB which mean that SvxLink can handle twice the specified maximum deviation. If both maxdev and headroom are left at their default this will mean that SvxLink can handle 10kHz -deviation without distorsion. +deviation without distortion. Changing the headroom cause a lot of different effects so don't do that unless you are prepared to deal with the problems. For example, increasing the diff --git a/src/svxlink/ChangeLog b/src/svxlink/ChangeLog index 248edad8..5861385e 100644 --- a/src/svxlink/ChangeLog +++ b/src/svxlink/ChangeLog @@ -1477,7 +1477,7 @@ the input volume. It is enabled by setting the PEAK_METER variable in the receiver configuration section. Start SvxLink and open the squelch on the receiver so that only noise is available on the input. Adjust the input - volume until you see messages printed about distorsion. Then lower the + volume until you see messages printed about distortion. Then lower the volume until there are no more messages. * Now using libsigc++ version 1.2 instead of the old and outdated 1.0. diff --git a/src/svxlink/svxlink/ReflectorLogic.tcl b/src/svxlink/svxlink/ReflectorLogic.tcl index 07318b50..38d0dd2a 100644 --- a/src/svxlink/svxlink/ReflectorLogic.tcl +++ b/src/svxlink/svxlink/ReflectorLogic.tcl @@ -39,6 +39,22 @@ if {$logic_name != [namespace tail [namespace current]]} { } +# +# A helper function for announcing a talkgroup. +# If there is an audio clip matching the name talk_group- it will be played +# instead of spelling the digits. Look at the documentation for playMsg for +# more information on where to put the audio clip. +# +# tg - The talkgroup to announce +# +proc say_talkgroup {tg} { + if [playMsg "Core" "talk_group-$tg" 0] { + } else { + spellNumber $tg + } +} + + # # Executed when an unknown command is received # cmd - The command string @@ -69,11 +85,11 @@ proc report_tg_status {} { set prev_announce_time [clock seconds] set prev_announce_tg $selected_tg playMsg "Core" "talk_group" - spellNumber $selected_tg + say_talkgroup $selected_tg } else { playMsg "Core" "previous" playMsg "Core" "talk_group" - spellNumber $previous_tg + say_talkgroup $previous_tg } } @@ -116,7 +132,7 @@ proc tg_local_activation {new_tg old_tg} { set prev_announce_tg $new_tg playSilence 100 playMsg "Core" "talk_group" - spellNumber $new_tg + say_talkgroup $new_tg } } @@ -143,7 +159,7 @@ proc tg_remote_activation {new_tg old_tg} { set prev_announce_tg $new_tg playSilence 100 playMsg "Core" "talk_group" - spellNumber $new_tg + say_talkgroup $new_tg } } @@ -175,7 +191,7 @@ proc tg_command_activation {new_tg old_tg} { set prev_announce_tg $new_tg playSilence 100 playMsg "Core" "talk_group" - spellNumber $new_tg + say_talkgroup $new_tg } @@ -195,7 +211,7 @@ proc tg_default_activation {new_tg old_tg} { # set prev_announce_tg $new_tg # playSilence 100 # playMsg "Core" "talk_group" - # spellNumber $new_tg + # say_talkgroup $new_tg #} } @@ -216,7 +232,7 @@ proc tg_qsy {new_tg old_tg} { playSilence 100 playMsg "Core" "qsy" #playMsg "Core" "talk_group" - spellNumber $new_tg + say_talkgroup $new_tg } @@ -254,7 +270,7 @@ proc tg_qsy_failed {} { proc tg_qsy_pending {tg} { playSilence 100 playMsg "Core" "qsy" - spellNumber $tg + say_talkgroup $tg playMsg "Core" "pending" } @@ -269,7 +285,7 @@ proc tg_qsy_ignored {tg} { playSilence 100 if {!$qsy_pending_active} { playMsg "Core" "qsy" - spellNumber $tg + say_talkgroup $tg } playMsg "Core" "ignored" playSilence 500 @@ -337,7 +353,7 @@ proc tmp_monitor_add {tg} { #puts "### tmp_monitor_add: $tg" playSilence 100 playMsg "Core" "monitor" - spellNumber $tg + say_talkgroup $tg } diff --git a/src/svxlink/svxlink/events.tcl b/src/svxlink/svxlink/events.tcl index 56876073..34218f1c 100644 --- a/src/svxlink/svxlink/events.tcl +++ b/src/svxlink/svxlink/events.tcl @@ -18,17 +18,43 @@ # EchoLink, Help, Parrot etc. If a sound is not found in the specified context, # a search in the "Default" context is done. # -proc playMsg {context msg} { +# It's also possible to have local overrides by putting files under a "local" +# directory either directly under the "sounds" directory or under the language +# pack directory. For example if context is "Core" and the language is set to +# "en_US" the following paths will be searched: +# +# .../sounds/en_US/local/Core/ +# .../sounds/local/Core/ +# .../sounds/en_US/Core/ +# .../sounds/en_US/local/Default/ +# .../sounds/local/Default/ +# .../sounds/en_US/Default/ +# +# context - The context to look for the sound files in (e.g Default, +# Parrot etc). +# msg - The basename of the file to play +# warn - Set to 0 to not print a warning if no sound clip was found +# +proc playMsg {context msg {warn 1}} { global basedir global langdir - set candidates [glob -nocomplain "$langdir/$context/$msg.{wav,raw,gsm}" \ - "$langdir/Default/$msg.{wav,raw,gsm}"]; - if { [llength $candidates] > 0 } { + set candidates [glob -nocomplain \ + "$langdir/local/$context/$msg.{wav,raw,gsm}" \ + "$basedir/sounds/local/$context/$msg.{wav,raw,gsm}" \ + "$langdir/$context/$msg.{wav,raw,gsm}" \ + "$langdir/local/Default/$msg.{wav,raw,gsm}" \ + "$basedir/sounds/local/Default/$msg.{wav,raw,gsm}" \ + "$langdir/Default/$msg.{wav,raw,gsm}"]; + if {[llength $candidates] > 0} { playFile [lindex $candidates 0]; } else { - puts "*** WARNING: Could not find audio clip \"$msg\" in context \"$context\""; + if {$warn} { + puts "*** WARNING: Could not find audio clip \"$msg\" in context \"$context\""; + } + return 0 } + return 1 } diff --git a/src/svxlink/trx/LocalRxBase.cpp b/src/svxlink/trx/LocalRxBase.cpp index 80c35a4b..5df52c5b 100644 --- a/src/svxlink/trx/LocalRxBase.cpp +++ b/src/svxlink/trx/LocalRxBase.cpp @@ -136,7 +136,7 @@ class PeakMeter : public AudioPassthrough if (i < ret) { cout << name - << ": Distorsion detected! Please lower the input volume!\n"; + << ": Distortion detected! Please lower the input volume!\n"; } return ret; diff --git a/src/svxlink/trx/RtlSdr.cpp b/src/svxlink/trx/RtlSdr.cpp index 03bb6210..9c59755e 100644 --- a/src/svxlink/trx/RtlSdr.cpp +++ b/src/svxlink/trx/RtlSdr.cpp @@ -300,7 +300,7 @@ void RtlSdr::handleIq(const complex *samples, int samp_count) { if (dist_print_cnt == static_cast(samp_rate)) { - cout << "*** WARNING: Distorsion detected on Rtl tuner " + cout << "*** WARNING: Distortion detected on Rtl tuner " << displayName() << ". Lower the RF gain\n"; } dist_print_cnt -= samp_count; @@ -423,7 +423,7 @@ int RtlSdr::dataReceived(Async::TcpConnection *con, void *buf, int count) { if (dist_print_cnt == static_cast(samp_rate)) { - cout << "*** WARNING: Distorsion detected on RtlSdr tuner " + cout << "*** WARNING: Distortion detected on RtlSdr tuner " << con->remoteHost() << ":" << con->remotePort() << ". " << "Lower the RF gain\n"; } diff --git a/src/svxlink/trx/RtlSdr.h b/src/svxlink/trx/RtlSdr.h index 5cdae595..a7515c41 100644 --- a/src/svxlink/trx/RtlSdr.h +++ b/src/svxlink/trx/RtlSdr.h @@ -143,7 +143,7 @@ class RtlSdr : public sigc::trackable virtual ~RtlSdr(void); /** - * @brief Enable printing of distorsion warnings + * @brief Enable printing of distortion warnings * @param enable Set to \em true to enable printing */ void enableDistPrint(bool enable); diff --git a/src/versions b/src/versions index 8b774bf7..770f27af 100644 --- a/src/versions +++ b/src/versions @@ -11,7 +11,7 @@ LIBECHOLIB=1.3.3.99.2 LIBASYNC=1.6.99.22 # SvxLink versions -SVXLINK=1.7.99.68 +SVXLINK=1.7.99.69 MODULE_HELP=1.0.0 MODULE_PARROT=1.1.1 MODULE_ECHO_LINK=1.5.99.3 @@ -25,13 +25,13 @@ MODULE_FRN=1.1.0 MODULE_TRX=1.0.0 # Version for the RemoteTrx application -REMOTE_TRX=1.3.99.9 +REMOTE_TRX=1.3.99.10 # Version for the signal level calibration utility -SIGLEV_DET_CAL=1.0.7.99.5 +SIGLEV_DET_CAL=1.0.7.99.6 # Version for the deviation calibration utility -DEVCAL=1.0.2.99.6 +DEVCAL=1.0.2.99.7 # Version for svxserver SVXSERVER=0.0.6