📄 checksum.cpp
字号:
#include "nmea0183.h"
BYTE ComputeChecksum( const CString &line_to_parse )
{
BYTE checksum_value = 0;
int string_length = line_to_parse.GetLength();
int index = 1; // Skip over the $ at the begining of the sentence
while( index < string_length && line_to_parse[ index ] != '*' )
{
checksum_value ^= line_to_parse[ index ];
index++;
}
return( checksum_value );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -