I guess we all need better email clients, eh? I was wondering how the network manager disambiguated calls. Makes more sense now.
And I didn't think the protocol was terribly important since nobody is changing grids on any protocol, are they? It appears JT65 is also a candidate since that comment is stolen from their code. Makes sense though for future protection. RRRMike W9MDB From: Bill Somerville <g4...@classdesign.com> To: wsjt-devel@lists.sourceforge.net Sent: Wednesday, January 6, 2016 5:14 PM Subject: Re: [wsjt-devel] Feature Request, JT9 to SNUS On 06/01/2016 23:08, Bill Somerville wrote: > // send telemetry to HAB server if required > // will send the RX station callsign, grid, frequency and JT9/65 > string > decodedtext.deCallAndGrid(/*out*/dx_call,dx_grid); > if (decodedtext.isJT9 () > && m_config.spot_to_snus_reporter () > && stdMsg > && !m_diskData) { > QString dx_call; > QString dx_grid; > if (gridChanged(dx_call,dx_grid)) { > Frequency frequency = m_dialFreq + > decodedtext.frequencyOffset(); > QUrlQuery q; > q.addQueryItem("callsign", m_config.my_callsign()); > q.addQueryItem("grid", m_config.my_grid()); > q.addQueryItem("frequency", QString::number(frequency)); > q.addQueryItem("data", decodedtext.string().replace("+", > "%2B")); > q.addQueryItem("version", version()); > auto request = QNetworkRequest > {{"http://vps.comms.net.au/snus.php"}}; > request.setHeader (QNetworRequest::ContentTypeHeader, > "application/x-www-form-urlencoded"); > auto * reply = m_network_manager->post (request, > post_data.toString (QUrl::FullyEncoded).toUtf8 ()); > connect (reply, &QNetworkReply::finished, [this, reply] () { > if (reply->error ()) { > QMessageBox::warning (this, tr ("Network Error"), > tr ("failed to send spot to SNUS > server:\n%1\n%2") > .arg (reply->url > ().toDisplayString ()) > .arg (reply->errorString ()); > ); > reply->deleteLater (); > }); > } > } > } Sorry, as usual my email client failed to spot the errors in my code :( Better something like: > // send telemetry to HAB server if required > // will send the RX station callsign, grid, frequency and JT9/65 > string > decodedtext.deCallAndGrid(/*out*/dx_call,dx_grid); > if (decodedtext.isJT9 () > && m_config.spot_to_snus_reporter () > && stdMsg > && !m_diskData) { > QString dx_call; > QString dx_grid; > if (gridChanged(dx_call,dx_grid)) { > Frequency frequency = m_dialFreq + > decodedtext.frequencyOffset(); > QUrlQuery q; > q.addQueryItem("callsign", m_config.my_callsign()); > q.addQueryItem("grid", m_config.my_grid()); > q.addQueryItem("frequency", QString::number(frequency)); > q.addQueryItem("data", decodedtext.string().replace("+", > "%2B")); > q.addQueryItem("version", version()); > auto request = QNetworkRequest > {{"http://vps.comms.net.au/snus.php"}}; > request.setHeader (QNetworRequest::ContentTypeHeader, > "application/x-www-form-urlencoded"); > auto * reply = m_network_manager->post (request, > post_data.toString (QUrl::FullyEncoded).toUtf8 ()); > connect (reply, &QNetworkReply::finished, [this, reply] () { > if (reply->error ()) { > QMessageBox::warning (this, tr ("Network Error"), > tr ("failed to send spot to SNUS > server:\n%1\n%2") > .arg (reply->url > ().toDisplayString ()) > .arg (reply->errorString ()); > ); > } > reply->deleteLater (); > }); > } > } 73 Bill G4WJS. ------------------------------------------------------------------------------ _______________________________________________ wsjt-devel mailing list wsjt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wsjt-devel
------------------------------------------------------------------------------
_______________________________________________ wsjt-devel mailing list wsjt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wsjt-devel