- Timestamp:
- Mar 29, 2019, 9:22:59 AM (6 years ago)
- Location:
- branches/BNC_2.12/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/bncutils.cpp
r8616 r8645 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.toAscii().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].toAscii(); 312 308 } 313 309 gga = "$" + gga + QString("*%1").arg(XOR, 2, 16, QLatin1Char('0')); -
branches/BNC_2.12/src/pppRun.cpp
r8404 r8645 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.