ModuleMetarInfo: more flexible announcement of an airport at the beginning of a metar report
This commit is contained in:
parent
0c4977db82
commit
3951c87688
|
|
@ -1,5 +1,8 @@
|
|||
1.8.0 -- ?? ??? ????
|
||||
----------------------
|
||||
* MetarInformation, more flexible airport announcement at the beginning of a
|
||||
Metar
|
||||
|
||||
* SvxReflector now support switching traffic on talk groups.
|
||||
|
||||
* ReflectorLogic can now request switching talk groups based on the received
|
||||
|
|
@ -45,8 +48,8 @@
|
|||
|
||||
1.7.0 -- 01 Sep 2019
|
||||
----------------------
|
||||
* MetarInfo now supports secure http (https) since aviationweather.gov has
|
||||
switched to https only. Read documentation and/or README in directory
|
||||
* MetarInfo now supports secure http (https) since aviationweather.gov has
|
||||
switched to https only. Read documentation and/or README in directory
|
||||
modules/metarinfo for changes.
|
||||
|
||||
* Now possible to set the roger sound to be always on in the SimplexLogic, even
|
||||
|
|
@ -853,7 +856,7 @@
|
|||
* The help module can now accept commands when not active. It will read
|
||||
back help for the given module ID. For example the command 01# will
|
||||
play the help message for the parrot module.
|
||||
|
||||
|
||||
* The parrot module can now accept commands when not active. The only
|
||||
thing it can do is to read back the entered digits. For example the
|
||||
command 1123# will make the parrot module say "one two three".
|
||||
|
|
@ -1002,7 +1005,7 @@
|
|||
|
||||
* Steve also contributed a couple of other improvements, bugfixes
|
||||
and workarounds.
|
||||
|
||||
|
||||
* Bugfix in CW.tcl: The CW code for 'L' was incorrectly mapped to '..-.'.
|
||||
|
||||
* Two new command line options added to SvxLink Server and RemoteTrx:
|
||||
|
|
|
|||
|
|
@ -738,6 +738,19 @@ proc icao_available {} {
|
|||
}
|
||||
|
||||
|
||||
# announce airport at the beginning of the MEATAR
|
||||
proc announce_airport {icao} {
|
||||
global langdir;
|
||||
if [file exists "$langdir/MetarInfo/$icao.wav"] {
|
||||
playMsg $icao;
|
||||
} else {
|
||||
spellWord $icao;
|
||||
}
|
||||
playSilence 100;
|
||||
playMsg "airport";
|
||||
}
|
||||
|
||||
|
||||
# say preconfigured airports
|
||||
proc airports args {
|
||||
global langdir;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
@file ModuleMetarInfo.cpp
|
||||
@brief gives out a METAR report
|
||||
@author Steve Koehler / DH1DM & Adi Bier / DL1HRC
|
||||
@date 2018-03-10
|
||||
@date 2020-04-19
|
||||
|
||||
\verbatim
|
||||
A module (plugin) to request the latest METAR (weather) information from
|
||||
|
|
@ -165,7 +165,7 @@ class ModuleMetarInfo::Http : public sigc::trackable
|
|||
Async::FdWatch wr;
|
||||
};
|
||||
typedef std::map<int, WatchSet> WatchMap;
|
||||
CURLM* multi_handle;
|
||||
CURLM* multi_handle;
|
||||
Async::Timer update_timer;
|
||||
WatchMap watch_map;
|
||||
std::queue<CURL*> url_queue;
|
||||
|
|
@ -208,7 +208,7 @@ class ModuleMetarInfo::Http : public sigc::trackable
|
|||
{
|
||||
int handle_count;
|
||||
curl_multi_perform(multi_handle, &handle_count);
|
||||
if (handle_count == 0)
|
||||
if (handle_count == 0)
|
||||
{
|
||||
disableAllWatches();
|
||||
curl_easy_cleanup(pending_curl);
|
||||
|
|
@ -299,7 +299,7 @@ class ModuleMetarInfo::Http : public sigc::trackable
|
|||
FD_ZERO(&fdexcep);
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
for (int fd = 0; fd <= maxfd; fd++)
|
||||
for (int fd = 0; fd <= maxfd; fd++)
|
||||
{
|
||||
bool read_isset = FD_ISSET(fd, &fdread);
|
||||
bool write_isset = FD_ISSET(fd, &fdwrite);
|
||||
|
|
@ -572,26 +572,26 @@ bool ModuleMetarInfo::initialize(void)
|
|||
{
|
||||
debug = true;
|
||||
}
|
||||
|
||||
|
||||
if (!cfg().getValue(cfgName(), "TYPE", type))
|
||||
{
|
||||
cout << "**** WARNING: Config variable " << cfgName()
|
||||
cout << "**** WARNING: Config variable " << cfgName()
|
||||
<< "/TYPE is not set.\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type != "TXT" && type != "XML")
|
||||
{
|
||||
cout << "**** WARNING: Config variable " << cfgName()
|
||||
cout << "**** WARNING: Config variable " << cfgName()
|
||||
<< "/TYPE: " << type << " is not valid.\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!cfg().getValue(cfgName(), "SERVER", server))
|
||||
{
|
||||
cout << "**** WARNING: Config variable " << cfgName()
|
||||
cout << "**** WARNING: Config variable " << cfgName()
|
||||
<< "/SERVER: " << server << " is not set.\n";
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
cfg().getValue(cfgName(), "LINK", link);
|
||||
|
|
@ -892,8 +892,8 @@ void ModuleMetarInfo::onData(std::string metarinput, size_t count)
|
|||
std::string metar = "";
|
||||
html += metarinput;
|
||||
|
||||
// switching between the newer xml-service by aviationweather and the old
|
||||
// noaa.gov version. With the standard TXT format anybody will be able to
|
||||
// switching between the newer xml-service by aviationweather and the old
|
||||
// noaa.gov version. With the standard TXT format anybody will be able to
|
||||
// create it's own METAR report from it's own weather station
|
||||
|
||||
if (type == "XML")
|
||||
|
|
@ -937,7 +937,7 @@ void ModuleMetarInfo::onData(std::string metarinput, size_t count)
|
|||
}
|
||||
}
|
||||
// the TXT version of METAR
|
||||
else
|
||||
else
|
||||
{
|
||||
// This is a METAR-report:
|
||||
//
|
||||
|
|
@ -1047,11 +1047,9 @@ int ModuleMetarInfo::handleMetar(std::string input)
|
|||
temp << "metar \"" << input << "\"";
|
||||
say(temp);
|
||||
|
||||
temp << "airports " << icao;
|
||||
temp << "announce_airport " << icao;
|
||||
say(temp);
|
||||
|
||||
processEvent("say airport");
|
||||
|
||||
splitStr(values, input, " ");
|
||||
StrList::iterator it = values.begin();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
Metar information module for SvxLink
|
||||
Metar information module for SvxLink
|
||||
by Adi / DL1HRC
|
||||
|
||||
VERSION 1.0.99.0 (21 Feb 2017)
|
||||
VERSION 1.2.0.0 (12 Mar 2018)
|
||||
VERSION 1.2.1.99.2 (19 Apr 2020)
|
||||
|
||||
|
||||
CHANGES:
|
||||
- support for https since aviationweather.gov has switched to secure
|
||||
http
|
||||
- make airport announcement more flexible, porting code from c++ to tcl
|
||||
|
||||
|
||||
FUNCTION:
|
||||
|
||||
Get METAR (weather) information from ICAO locations, usually airports and
|
||||
Get METAR (weather) information from ICAO locations, usually airports and
|
||||
gives them out. With V1.2.0.0 you can request a METAR from an
|
||||
airport of your interest.
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ command function
|
|||
01 available preconfigured airports
|
||||
1...XX request METARs from preconfigured airports in order to configuration
|
||||
|
||||
You have two search functions for not preconfigured airports to request a METAR
|
||||
You have two search functions for not preconfigured airports to request a METAR
|
||||
of an airport of your interest:
|
||||
|
||||
1) the svx-like:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ MODULE_PROPAGATION_MONITOR=1.0.1
|
|||
MODULE_TCL_VOICE_MAIL=1.0.2
|
||||
MODULE_SELCALLENC=1.0.0
|
||||
MODULE_DTMF_REPEATER=1.0.2
|
||||
MODULE_METAR_INFO=1.2.1.99.1
|
||||
MODULE_METAR_INFO=1.2.1.99.2
|
||||
MODULE_FRN=1.1.0
|
||||
MODULE_TRX=1.0.0
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue