Browse Source

Add TINYGSM_UNICODE_TO_HEX

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
2b233936b0
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      TinyGsmCommon.h

+ 7
- 2
TinyGsmCommon.h View File

@ -157,13 +157,18 @@ String TinyGsmDecodeHex16bit(String &instr) {
buf[1] = instr[i+1];
char b = strtol(buf, NULL, 16);
if (b) { // If high byte is non-zero, we can't handle it ;(
b = '?';
#if defined(TINY_GSM_UNICODE_TO_HEX)
result += "\\x";
result += instr.substring(i, i+4);
#else
result += "?";
#endif
} else {
buf[0] = instr[i+2];
buf[1] = instr[i+3];
b = strtol(buf, NULL, 16);
result += b;
}
result += b;
}
return result;
}


Loading…
Cancel
Save