#9 fix function naming

pull/32/head
Geoffrey Merck 4 years ago
parent bd3b8650c4
commit bdb4c638b1

@ -22,6 +22,8 @@
#include <cassert>
#include <boost/algorithm/string.hpp>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include "RSMS1AMessageCollector.h"
#include "StringUtils.h"
@ -29,6 +31,7 @@
#include "Utils.h"
#include "APRSUtils.h"
const unsigned int APRS_CSUM_LENGTH = 4U;
CRSMS1AMessageCollector::CRSMS1AMessageCollector() :
@ -39,10 +42,10 @@ CSentenceCollector(SLOW_DATA_TYPE_GPS, "$$Msg", '\x0D')
bool CRSMS1AMessageCollector::isValidSentence(const std::string& sentence)
{
return isValidGPSA(sentence);
return isValidMsg(sentence);
}
bool CRSMS1AMessageCollector::isValidGPSA(const std::string& msg)
bool CRSMS1AMessageCollector::isValidMsg(const std::string& msg)
{
if(msg.empty() || !boost::starts_with(msg, "$$Msg"))
return false;
@ -56,6 +59,8 @@ bool CRSMS1AMessageCollector::isValidGPSA(const std::string& msg)
&& splits[3].length() > 6U;
return ret;
//TODO 2022-01-01 figure out what the heck it is about thic strange CRCs
// CUtils::dump("RS-MS1A:", (unsigned char *)gpsa.c_str(), gpsa.length() + 1U);
// CLog::logDebug("RS-MS1A: %s", gpsa.c_str());

@ -34,9 +34,8 @@ protected:
private:
static unsigned int calcCRC(const std::string& gpsa, unsigned int start, unsigned int length);
static bool isValidGPSA(const std::string& gpsa);
static bool isValidMsg(const std::string& gpsa);
std::string m_sentence;
std::string m_collector;
};
Loading…
Cancel
Save

Powered by TurnKey Linux.