unsigned char c;
// Get Header
if(s[0] != 'S') return TERM_NONSREC;
- if(s[1] == '2') { // Data coire
+ if(s[1] == '2') { // Data core
for(i = 2; i < 8; i += 2) if(migrate_hex(&s[i]) == 0) return TERM_SRECERR;
bytes = hex2byte(&s[2]);
if(bytes <= 4) return TERM_SRECERR;
unsigned char pp;
unsigned char sum;
s[0] = 'S';
- s[1] = '9';
+ s[1] = '8';
s[2] = '0';
- s[3] = '3';
- sum = 3;
- for(pp = 4; pp < 8; pp++) s[pp] = '0';
+ s[3] = '4';
+ sum = 4;
+ for(pp = 4; pp < 10; pp++) s[pp] = '0';
sum = ~sum;
bin2hex(&s[pp], sum);