switch to 16 bit packet number

This commit is contained in:
Thomas Göttgens 2023-01-09 20:23:32 +01:00
parent 971565aed3
commit c63536d948
3 changed files with 4 additions and 3 deletions

View File

@ -696,6 +696,7 @@ typedef struct _ToRadio {
This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link.
(Sending this message is optional for clients) */
bool disconnect;
/* File Transfer Chunk */
XModem xmodemPacket;
};
} ToRadio;

View File

@ -25,7 +25,7 @@ typedef enum _XModem_Control {
typedef PB_BYTES_ARRAY_T(128) XModem_buffer_t;
typedef struct _XModem {
XModem_Control control;
uint8_t seq;
uint16_t seq;
uint16_t crc16;
XModem_buffer_t buffer;
} XModem;
@ -68,7 +68,7 @@ extern const pb_msgdesc_t XModem_msg;
#define XModem_fields &XModem_msg
/* Maximum encoded size of messages (where known) */
#define XModem_size 140
#define XModem_size 141
#ifdef __cplusplus
} /* extern "C" */

View File

@ -56,7 +56,7 @@ class XModemAdapter
int retrans = MAXRETRANS;
unsigned char packetno = 0;
uint16_t packetno = 0;
#ifdef ARCH_NRF52
File file = File(FSCom);