forked from Blendman974/faceclaw
Refactor: g2flash protocol doesn't have so many magic numbers
This commit is contained in:
1 parent
306accf06d
commit
ea9bfae6af
22 files changed
+231
-99
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { concat, crc16, SID } from './ble-protocol'
|
||||
|
||||
declare const require: (name: string) => any
|
||||
/** Mirrors CFW_MESSAGE_MAX in g2flash/patches/message_transport.h. */
|
||||
export const CFW_MAX_MESSAGE = 65535
|
||||
export type CfwAck = { nack: boolean; streamId: number; messageId: number; lens: number; size: number; checksum: number }
|
||||
const u16 = (data: Uint8Array, offset: number) => data[offset] | (data[offset + 1] << 8)
|
||||
|
||||
Reference in new issue
Block a user