|
@@ -193,6 +193,7 @@ void hcp2::threadrecv()
|
|
len = read(fd, strbuf, 999);
|
|
len = read(fd, strbuf, 999);
|
|
if(len > 0)
|
|
if(len > 0)
|
|
{
|
|
{
|
|
|
|
+ // std::cout<<" recve data. len: "<<len<<std::endl;
|
|
strbuf[len] = 0;
|
|
strbuf[len] = 0;
|
|
mstrgpsdata = mstrgpsdata + strbuf;
|
|
mstrgpsdata = mstrgpsdata + strbuf;
|
|
SerialGPSDecode();
|
|
SerialGPSDecode();
|
|
@@ -222,10 +223,12 @@ void hcp2::SerialGPSDecode()
|
|
void hcp2::SerialGPSDecodeSen(std::string strsen)
|
|
void hcp2::SerialGPSDecodeSen(std::string strsen)
|
|
{
|
|
{
|
|
std::vector<std::string> strlistrmc;
|
|
std::vector<std::string> strlistrmc;
|
|
- strlistrmc = splitByCommaManual(strsen,'\n');
|
|
|
|
|
|
+ strlistrmc = splitByCommaManual(strsen,',');
|
|
|
|
|
|
if(strlistrmc.size() < 23)return;
|
|
if(strlistrmc.size() < 23)return;
|
|
if(strlistrmc.at(0) != "$GPCHC")return;
|
|
if(strlistrmc.at(0) != "$GPCHC")return;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
if(!checknmeasen(strsen.data(),strsen.length()))
|
|
if(!checknmeasen(strsen.data(),strsen.length()))
|
|
{
|
|
{
|