1
0
Fork 0

Remove unneeded time handling and fix compiler warnings.

ycs232-kbc
Jonathan Naylor 8 years ago committed by GitHub
parent 7c188fe7c0
commit 1927af2fcf

@ -24,7 +24,6 @@
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
#include <cmath> #include <cmath>
#include <ctime>
CAPRSWriter::CAPRSWriter(const std::string& callsign, const std::string& suffix, const std::string& password, const std::string& address, unsigned int port) : CAPRSWriter::CAPRSWriter(const std::string& callsign, const std::string& suffix, const std::string& password, const std::string& address, unsigned int port) :
m_thread(NULL), m_thread(NULL),
@ -143,10 +142,6 @@ void CAPRSWriter::sendIdFrames()
if (!m_thread->isConnected()) if (!m_thread->isConnected())
return; return;
time_t now;
::time(&now);
struct tm* tm = ::gmtime(&now);
// Default values aren't passed on // Default values aren't passed on
if (m_latitude == 0.0F && m_longitude == 0.0F) if (m_latitude == 0.0F && m_longitude == 0.0F)
return; return;
@ -162,7 +157,7 @@ void CAPRSWriter::sendIdFrames()
::strcpy(desc, "MMDVM Voice"); ::strcpy(desc, "MMDVM Voice");
} }
const char* band; const char* band = "4m";
if (m_txFrequency >= 1200000000U) if (m_txFrequency >= 1200000000U)
band = "1.2"; band = "1.2";
else if (m_txFrequency >= 420000000U) else if (m_txFrequency >= 420000000U)
@ -190,7 +185,7 @@ void CAPRSWriter::sendIdFrames()
::sprintf(lon, "%05.2lf", longitude); ::sprintf(lon, "%05.2lf", longitude);
std::string server = m_callsign; std::string server = m_callsign;
int pos = server.find_first_of('-'); size_t pos = server.find_first_of('-');
if (pos == std::string::npos) if (pos == std::string::npos)
server.append("-S"); server.append("-S");
else else

Loading…
Cancel
Save