Changeset 8646 in ntrip
- Timestamp:
- Mar 29, 2019, 9:23:34 AM (6 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncutils.cpp
r8617 r8646 302 302 gga += QString(",%1,").arg(hei, 2, 'f', 1); 303 303 gga += QString("M,10.000,M,,"); 304 int xori; 305 306 char XOR = 0; 307 char Buff[gga.size()]; 308 strncpy(Buff, gga.toLatin1().data(), gga.size()); 309 int iLen = strlen(Buff); 310 for (xori = 0; xori < iLen; xori++) { 311 XOR ^= (char)Buff[xori]; 304 305 unsigned char XOR = 0; 306 for (int ii = 0; ii < gga.length(); ii++) { 307 XOR ^= (unsigned char) gga[ii].toLatin1(); 312 308 } 313 309 gga = "$" + gga + QString("*%1").arg(XOR, 2, 16, QLatin1Char('0')); -
trunk/BNC/src/pppRun.cpp
r8403 r8646 692 692 } 693 693 694 return '$' + nmStr + QString("*%1 \n").arg(int(XOR), 0, 16).toUpper();694 return '$' + nmStr + QString("*%1").arg(XOR, 2, 16, QLatin1Char('0')); 695 695 } 696 696
Note:
See TracChangeset
for help on using the changeset viewer.