mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-16 01:52:04 +00:00
Change to unishox library
This commit is contained in:
parent
e51b7c3c32
commit
8124ecbfd8
@ -129,9 +129,11 @@ void init_coder() {
|
|||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
for (int j = 0; j < 28; j++) {
|
for (int j = 0; j < 28; j++) {
|
||||||
byte c = usx_sets[i][j];
|
byte c = usx_sets[i][j];
|
||||||
usx_code_94[c - USX_OFFSET_94] = (i << 5) + j;
|
if (c > 32) {
|
||||||
if (c >= 'a' && c <= 'z')
|
usx_code_94[c - USX_OFFSET_94] = (i << 5) + j;
|
||||||
usx_code_94[c - USX_OFFSET_94 - ('a' - 'A')] = (i << 5) + j;
|
if (c >= 'a' && c <= 'z')
|
||||||
|
usx_code_94[c - USX_OFFSET_94 - ('a' - 'A')] = (i << 5) + j;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is_inited = 1;
|
is_inited = 1;
|
||||||
@ -168,8 +170,8 @@ int append_bits(char *out, int olen, int ol, byte code, int clen) {
|
|||||||
code <<= blen;
|
code <<= blen;
|
||||||
ol += blen;
|
ol += blen;
|
||||||
clen -= blen;
|
clen -= blen;
|
||||||
}
|
}
|
||||||
return ol;
|
return ol;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This is a safe call to append_bits() making sure it does not write past olen
|
/// This is a safe call to append_bits() making sure it does not write past olen
|
||||||
|
Loading…
Reference in New Issue
Block a user