1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-31 07:13:03 +00:00
This commit is contained in:
Carles Fernandez
2018-12-03 18:03:25 +01:00
parent b5c0cc04e5
commit b994f466a7
22 changed files with 105 additions and 108 deletions

View File

@@ -248,9 +248,9 @@ char Nmea_Printer::checkSum(std::string sentence)
{
char check = 0;
// iterate over the string, XOR each byte with the total sum:
for (unsigned int c = 0; c < sentence.length(); c++)
for (char c : sentence)
{
check = char(check ^ sentence.at(c));
check = char(check ^ c);
}
// return the result
return check;