diff options
author | Xiao Pan <xyz@flylightning.xyz> | 2025-04-26 16:39:02 -0700 |
---|---|---|
committer | Xiao Pan <xyz@flylightning.xyz> | 2025-04-26 16:39:02 -0700 |
commit | d9af481896f9f57743aa3422a7cd515188a6291a (patch) | |
tree | b1b07a249a48c432bdb163bf74fb3e6020931777 /remote_plot.c | |
parent | f3d0fb2a307a16f3ab86bf8640e5db07e1588c34 (diff) |
Maybe more correct MAX_XFER_BUF_SIZE
Diffstat (limited to 'remote_plot.c')
-rw-r--r-- | remote_plot.c | 11 |
1 files 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 <gtk/gtk.h> -// 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 |