From d9af481896f9f57743aa3422a7cd515188a6291a Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Sat, 26 Apr 2025 16:39:02 -0700 Subject: Maybe more correct MAX_XFER_BUF_SIZE --- remote_plot.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/remote_plot.c b/remote_plot.c index cb2c1a2..42b560b 100644 --- a/remote_plot.c +++ b/remote_plot.c @@ -29,13 +29,14 @@ #include -// max wire number is 65535, *0.001=65.535, *0.1=6553.5 -// voltage max format 7 bytes ,65.535 -// temp max format 7 bytes ,6553.5 +// max wire unsigned number is 65535 +// max wire signed number maybe is -32768 to 32767 +// voltage max format 6 bytes ,5.999 +// temp max format 6 bytes ,-49.9 // timestamp max 8 bytes 86400000 // 1 timestamp, 96 voltage, 32 temp, 1 \n, 1 \0 -// 96*7+32*7+8+1+1=906 bytes -#define MAX_XFER_BUF_SIZE 906 +// 8+96*7+32*7+1+1=906 bytes +#define MAX_XFER_BUF_SIZE 778 #define LEN 10 #define VOLTLEN 96 -- cgit v1.2.3-70-g09d2