diff options
author | Xiao Pan <xyz@flylightning.xyz> | 2025-05-04 15:51:50 -0700 |
---|---|---|
committer | Xiao Pan <xyz@flylightning.xyz> | 2025-05-04 15:51:50 -0700 |
commit | de56a83c3cd8689bc2e192df007be9beb60f3731 (patch) | |
tree | 348d8a4608f4d771dffe413ecfd9fdd331b458f8 | |
parent | 241b129ed050a0445fc05f076eaf929c26a87dc4 (diff) |
USe new SR16-CustomBMS repo .dbc. Consider changed ssh destination support sftp_expand_path()
https://github.com/spartanracingelectric/SR16-CustomBMS/blob/main/SR-16%20Custom%20BMS.dbc
-rw-r--r-- | list.h | 4 | ||||
-rw-r--r-- | remote_plot.c | 175 |
2 files changed, 115 insertions, 64 deletions
@@ -8,13 +8,13 @@ /*特定与程序的声明*/ #define VOLTLEN 96 -#define TEMPLEN 48 +#define TEMPLEN 96 typedef struct can { uint32_t t; double volt[VOLTLEN]; - uint16_t temp[TEMPLEN]; + uint8_t temp[TEMPLEN]; }; /*一般类型定义*/ diff --git a/remote_plot.c b/remote_plot.c index cd3ead3..b5db6d8 100644 --- a/remote_plot.c +++ b/remote_plot.c @@ -36,12 +36,12 @@ // max wire unsigned number is 65535 // max wire signed number maybe is -32768 to 32767 -// voltage max format 7 bytes ,4.9999 -// temp max format 4 bytes ,100 +// voltage max format 7 bytes ,6.5535 +// temp max format 4 bytes ,255 // timestamp max 10 bytes 1745742182 // 1 timestamp, 96 voltage, 48 temp, 1 \n -// 10+96*7+48*4+1=875 bytes -#define ENTRY_SIZE 875 +// 10+96*7+96*4+1=1067 bytes +#define ENTRY_SIZE 1067 // 16 KiB == 16384 bytes // https://api.libssh.org/stable/libssh_tutor_sftp.html #define MAX_XFER_BUF_SIZE 16384/ENTRY_SIZE*ENTRY_SIZE @@ -92,8 +92,8 @@ const char *checkbutton_names[]={ "0x63a_BMS_M4_Cell_7_Voltage", "0x63a_BMS_M4_Cell_8_Voltage", "0x63b_BMS_M4_Cell_9_Voltage", - "0x63b_BMS_M4_Cell_11_Voltage", "0x63b_BMS_M4_Cell_10_Voltage", + "0x63b_BMS_M4_Cell_11_Voltage", "0x63b_BMS_M4_Cell_12_Voltage", "0x63c_BMS_M5_Cell_1_Voltage", "0x63c_BMS_M5_Cell_2_Voltage", @@ -143,54 +143,102 @@ const char *checkbutton_names[]={ "0x647_BMS_M8_Cell_10_Voltage", "0x647_BMS_M8_Cell_11_Voltage", "0x647_BMS_M8_Cell_12_Voltage", - "0x680_BMS_M1_Cell_1_Temperature", - "0x680_BMS_M1_Cell_2_Temperature", - "0x680_BMS_M1_Cell_3_Temperature", - "0x680_BMS_M1_Cell_4_Temperature", - "0x681_BMS_M1_Cell_5_Temperature", - "0x681_BMS_M1_Cell_6_Temperature", - "0x681_BMS_M1_Cell_7_Temperature", - "0x681_BMS_M1_Cell_8_Temperature", - "0x682_BMS_M1_Cell_9_Temperature", - "0x682_BMS_M1_Cell_10_Temperature", - "0x682_BMS_M1_Cell_11_Temperature", - "0x682_BMS_M1_Cell_12_Temperature", - "0x683_BMS_M2_Cell_1_Temperature", - "0x683_BMS_M2_Cell_2_Temperature", - "0x683_BMS_M2_Cell_3_Temperature", - "0x683_BMS_M2_Cell_4_Temperature", - "0x684_BMS_M2_Cell_5_Temperature", - "0x684_BMS_M2_Cell_6_Temperature", - "0x684_BMS_M2_Cell_7_Temperature", - "0x684_BMS_M2_Cell_8_Temperature", - "0x685_BMS_M2_Cell_9_Temperature", - "0x685_BMS_M2_Cell_10_Temperature", - "0x685_BMS_M2_Cell_11_Temperature", - "0x685_BMS_M2_Cell_12_Temperature", - "0x686_BMS_M3_Cell_1_Temperature", - "0x686_BMS_M3_Cell_2_Temperature", - "0x686_BMS_M3_Cell_3_Temperature", - "0x686_BMS_M3_Cell_4_Temperature", - "0x687_BMS_M3_Cell_5_Temperature", - "0x687_BMS_M3_Cell_6_Temperature", - "0x687_BMS_M3_Cell_7_Temperature", - "0x687_BMS_M3_Cell_8_Temperature", - "0x688_BMS_M3_Cell_9_Temperature", - "0x688_BMS_M3_Cell_10_Temperature", - "0x688_BMS_M3_Cell_11_Temperature", - "0x688_BMS_M3_Cell_12_Temperature", - "0x689_BMS_M4_Cell_1_Temperature", - "0x689_BMS_M4_Cell_2_Temperature", - "0x689_BMS_M4_Cell_3_Temperature", - "0x689_BMS_M4_Cell_4_Temperature", - "0x68a_BMS_M4_Cell_5_Temperature", - "0x68a_BMS_M4_Cell_6_Temperature", - "0x68a_BMS_M4_Cell_7_Temperature", - "0x68a_BMS_M4_Cell_8_Temperature", - "0x68b_BMS_M4_Cell_9_Temperature", - "0x68b_BMS_M4_Cell_10_Temperature", - "0x68b_BMS_M4_Cell_11_Temperature", - "0x68b_BMS_M4_Cell_12_Temperature" + "0x680_BMS_M1_Cell_1_Thermistor", + "0x680_BMS_M1_Cell_2_Thermistor", + "0x680_BMS_M1_Cell_3_Thermistor", + "0x680_BMS_M1_Cell_4_Thermistor", + "0x680_BMS_M1_Cell_5_Thermistor", + "0x680_BMS_M1_Cell_6_Thermistor", + "0x680_BMS_M1_Cell_7_Thermistor", + "0x680_BMS_M1_Cell_8_Thermistor", + "0x681_BMS_M1_Cell_9_Thermistor", + "0x681_BMS_M1_Cell_10_Thermistor", + "0x681_BMS_M1_Cell_11_Thermistor", + "0x681_BMS_M1_Cell_12_Thermistor", + "0x682_BMS_M2_Cell_1_Thermistor", + "0x682_BMS_M2_Cell_2_Thermistor", + "0x682_BMS_M2_Cell_3_Thermistor", + "0x682_BMS_M2_Cell_4_Thermistor", + "0x682_BMS_M2_Cell_5_Thermistor", + "0x682_BMS_M2_Cell_6_Thermistor", + "0x682_BMS_M2_Cell_7_Thermistor", + "0x682_BMS_M2_Cell_8_Thermistor", + "0x683_BMS_M2_Cell_9_Thermistor", + "0x683_BMS_M2_Cell_10_Thermistor", + "0x683_BMS_M2_Cell_11_Thermistor", + "0x683_BMS_M2_Cell_12_Thermistor", + "0x684_BMS_M3_Cell_1_Thermistor", + "0x684_BMS_M3_Cell_2_Thermistor", + "0x684_BMS_M3_Cell_3_Thermistor", + "0x684_BMS_M3_Cell_4_Thermistor", + "0x684_BMS_M3_Cell_5_Thermistor", + "0x684_BMS_M3_Cell_6_Thermistor", + "0x684_BMS_M3_Cell_7_Thermistor", + "0x684_BMS_M3_Cell_8_Thermistor", + "0x685_BMS_M3_Cell_9_Thermistor", + "0x685_BMS_M3_Cell_10_Thermistor", + "0x685_BMS_M3_Cell_11_Thermistor", + "0x685_BMS_M3_Cell_12_Thermistor", + "0x686_BMS_M4_Cell_1_Thermistor", + "0x686_BMS_M4_Cell_2_Thermistor", + "0x686_BMS_M4_Cell_3_Thermistor", + "0x686_BMS_M4_Cell_4_Thermistor", + "0x686_BMS_M4_Cell_5_Thermistor", + "0x686_BMS_M4_Cell_6_Thermistor", + "0x686_BMS_M4_Cell_7_Thermistor", + "0x686_BMS_M4_Cell_8_Thermistor", + "0x687_BMS_M4_Cell_9_Thermistor", + "0x687_BMS_M4_Cell_10_Thermistor", + "0x687_BMS_M4_Cell_11_Thermistor", + "0x687_BMS_M4_Cell_12_Thermistor", + "0x688_BMS_M5_Cell_1_Thermistor", + "0x688_BMS_M5_Cell_2_Thermistor", + "0x688_BMS_M5_Cell_3_Thermistor", + "0x688_BMS_M5_Cell_4_Thermistor", + "0x688_BMS_M5_Cell_5_Thermistor", + "0x688_BMS_M5_Cell_6_Thermistor", + "0x688_BMS_M5_Cell_7_Thermistor", + "0x688_BMS_M5_Cell_8_Thermistor", + "0x689_BMS_M5_Cell_9_Thermistor", + "0x689_BMS_M5_Cell_10_Thermistor", + "0x689_BMS_M5_Cell_11_Thermistor", + "0x689_BMS_M5_Cell_12_Thermistor", + "0x68a_BMS_M6_Cell_1_Thermistor", + "0x68a_BMS_M6_Cell_2_Thermistor", + "0x68a_BMS_M6_Cell_3_Thermistor", + "0x68a_BMS_M6_Cell_4_Thermistor", + "0x68a_BMS_M6_Cell_5_Thermistor", + "0x68a_BMS_M6_Cell_6_Thermistor", + "0x68a_BMS_M6_Cell_7_Thermistor", + "0x68a_BMS_M6_Cell_8_Thermistor", + "0x68b_BMS_M6_Cell_9_Thermistor", + "0x68b_BMS_M6_Cell_10_Thermistor", + "0x68b_BMS_M6_Cell_11_Thermistor", + "0x68b_BMS_M6_Cell_12_Thermistor", + "0x68c_BMS_M7_Cell_1_Thermistor", + "0x68c_BMS_M7_Cell_2_Thermistor", + "0x68c_BMS_M7_Cell_3_Thermistor", + "0x68c_BMS_M7_Cell_4_Thermistor", + "0x68c_BMS_M7_Cell_5_Thermistor", + "0x68c_BMS_M7_Cell_6_Thermistor", + "0x68c_BMS_M7_Cell_7_Thermistor", + "0x68c_BMS_M7_Cell_8_Thermistor", + "0x68d_BMS_M7_Cell_9_Thermistor", + "0x68d_BMS_M7_Cell_10_Thermistor", + "0x68d_BMS_M7_Cell_11_Thermistor", + "0x68d_BMS_M7_Cell_12_Thermistor", + "0x68e_BMS_M8_Cell_1_Thermistor", + "0x68e_BMS_M8_Cell_2_Thermistor", + "0x68e_BMS_M8_Cell_3_Thermistor", + "0x68e_BMS_M8_Cell_4_Thermistor", + "0x68e_BMS_M8_Cell_5_Thermistor", + "0x68e_BMS_M8_Cell_6_Thermistor", + "0x68e_BMS_M8_Cell_7_Thermistor", + "0x68e_BMS_M8_Cell_8_Thermistor", + "0x68f_BMS_M8_Cell_9_Thermistor", + "0x68f_BMS_M8_Cell_10_Thermistor", + "0x68f_BMS_M8_Cell_11_Thermistor", + "0x68f_BMS_M8_Cell_12_Thermistor" }; typedef struct { @@ -213,6 +261,7 @@ typedef struct { char *filename; // only read from local .csv file or not bool local; + bool dest_changed; }DATA; static gboolean read_data(gpointer user_data) @@ -236,7 +285,7 @@ static gboolean read_data(gpointer user_data) { //printf("start read_data local for loop\n"); Item temp; - int ct=fscanf(fp,"%u,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu",&temp.t,&temp.volt[0],&temp.volt[1],&temp.volt[2],&temp.volt[3],&temp.volt[4],&temp.volt[5],&temp.volt[6],&temp.volt[7],&temp.volt[8],&temp.volt[9],&temp.volt[10],&temp.volt[11],&temp.volt[12],&temp.volt[13],&temp.volt[14],&temp.volt[15],&temp.volt[16],&temp.volt[17],&temp.volt[18],&temp.volt[19],&temp.volt[20],&temp.volt[21],&temp.volt[22],&temp.volt[23],&temp.volt[24],&temp.volt[25],&temp.volt[26],&temp.volt[27],&temp.volt[28],&temp.volt[29],&temp.volt[30],&temp.volt[31],&temp.volt[32],&temp.volt[33],&temp.volt[34],&temp.volt[35],&temp.volt[36],&temp.volt[37],&temp.volt[38],&temp.volt[39],&temp.volt[40],&temp.volt[41],&temp.volt[42],&temp.volt[43],&temp.volt[44],&temp.volt[45],&temp.volt[46],&temp.volt[47],&temp.volt[48],&temp.volt[49],&temp.volt[50],&temp.volt[51],&temp.volt[52],&temp.volt[53],&temp.volt[54],&temp.volt[55],&temp.volt[56],&temp.volt[57],&temp.volt[58],&temp.volt[59],&temp.volt[60],&temp.volt[61],&temp.volt[62],&temp.volt[63],&temp.volt[64],&temp.volt[65],&temp.volt[66],&temp.volt[67],&temp.volt[68],&temp.volt[69],&temp.volt[70],&temp.volt[71],&temp.volt[72],&temp.volt[73],&temp.volt[74],&temp.volt[75],&temp.volt[76],&temp.volt[77],&temp.volt[78],&temp.volt[79],&temp.volt[80],&temp.volt[81],&temp.volt[82],&temp.volt[83],&temp.volt[84],&temp.volt[85],&temp.volt[86],&temp.volt[87],&temp.volt[88],&temp.volt[89],&temp.volt[90],&temp.volt[91],&temp.volt[92],&temp.volt[93],&temp.volt[94],&temp.volt[95],&temp.temp[0],&temp.temp[1],&temp.temp[2],&temp.temp[3],&temp.temp[4],&temp.temp[5],&temp.temp[6],&temp.temp[7],&temp.temp[8],&temp.temp[9],&temp.temp[10],&temp.temp[11],&temp.temp[12],&temp.temp[13],&temp.temp[14],&temp.temp[15],&temp.temp[16],&temp.temp[17],&temp.temp[18],&temp.temp[19],&temp.temp[20],&temp.temp[21],&temp.temp[22],&temp.temp[23],&temp.temp[24],&temp.temp[25],&temp.temp[26],&temp.temp[27],&temp.temp[28],&temp.temp[29],&temp.temp[30],&temp.temp[31],&temp.temp[32],&temp.temp[33],&temp.temp[34],&temp.temp[35],&temp.temp[36],&temp.temp[37],&temp.temp[38],&temp.temp[39],&temp.temp[40],&temp.temp[41],&temp.temp[42],&temp.temp[43],&temp.temp[44],&temp.temp[45],&temp.temp[46],&temp.temp[47]); + int ct=fscanf(fp,"%u,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu,%hhu",&temp.t,&temp.volt[0],&temp.volt[1],&temp.volt[2],&temp.volt[3],&temp.volt[4],&temp.volt[5],&temp.volt[6],&temp.volt[7],&temp.volt[8],&temp.volt[9],&temp.volt[10],&temp.volt[11],&temp.volt[12],&temp.volt[13],&temp.volt[14],&temp.volt[15],&temp.volt[16],&temp.volt[17],&temp.volt[18],&temp.volt[19],&temp.volt[20],&temp.volt[21],&temp.volt[22],&temp.volt[23],&temp.volt[24],&temp.volt[25],&temp.volt[26],&temp.volt[27],&temp.volt[28],&temp.volt[29],&temp.volt[30],&temp.volt[31],&temp.volt[32],&temp.volt[33],&temp.volt[34],&temp.volt[35],&temp.volt[36],&temp.volt[37],&temp.volt[38],&temp.volt[39],&temp.volt[40],&temp.volt[41],&temp.volt[42],&temp.volt[43],&temp.volt[44],&temp.volt[45],&temp.volt[46],&temp.volt[47],&temp.volt[48],&temp.volt[49],&temp.volt[50],&temp.volt[51],&temp.volt[52],&temp.volt[53],&temp.volt[54],&temp.volt[55],&temp.volt[56],&temp.volt[57],&temp.volt[58],&temp.volt[59],&temp.volt[60],&temp.volt[61],&temp.volt[62],&temp.volt[63],&temp.volt[64],&temp.volt[65],&temp.volt[66],&temp.volt[67],&temp.volt[68],&temp.volt[69],&temp.volt[70],&temp.volt[71],&temp.volt[72],&temp.volt[73],&temp.volt[74],&temp.volt[75],&temp.volt[76],&temp.volt[77],&temp.volt[78],&temp.volt[79],&temp.volt[80],&temp.volt[81],&temp.volt[82],&temp.volt[83],&temp.volt[84],&temp.volt[85],&temp.volt[86],&temp.volt[87],&temp.volt[88],&temp.volt[89],&temp.volt[90],&temp.volt[91],&temp.volt[92],&temp.volt[93],&temp.volt[94],&temp.volt[95],&temp.temp[0],&temp.temp[1],&temp.temp[2],&temp.temp[3],&temp.temp[4],&temp.temp[5],&temp.temp[6],&temp.temp[7],&temp.temp[8],&temp.temp[9],&temp.temp[10],&temp.temp[11],&temp.temp[12],&temp.temp[13],&temp.temp[14],&temp.temp[15],&temp.temp[16],&temp.temp[17],&temp.temp[18],&temp.temp[19],&temp.temp[20],&temp.temp[21],&temp.temp[22],&temp.temp[23],&temp.temp[24],&temp.temp[25],&temp.temp[26],&temp.temp[27],&temp.temp[28],&temp.temp[29],&temp.temp[30],&temp.temp[31],&temp.temp[32],&temp.temp[33],&temp.temp[34],&temp.temp[35],&temp.temp[36],&temp.temp[37],&temp.temp[38],&temp.temp[39],&temp.temp[40],&temp.temp[41],&temp.temp[42],&temp.temp[43],&temp.temp[44],&temp.temp[45],&temp.temp[46],&temp.temp[47],&temp.temp[48],&temp.temp[49],&temp.temp[50],&temp.temp[51],&temp.temp[52],&temp.temp[53],&temp.temp[54],&temp.temp[55],&temp.temp[56],&temp.temp[57],&temp.temp[58],&temp.temp[59],&temp.temp[60],&temp.temp[61],&temp.temp[62],&temp.temp[63],&temp.temp[64],&temp.temp[65],&temp.temp[66],&temp.temp[67],&temp.temp[68],&temp.temp[69],&temp.temp[70],&temp.temp[71],&temp.temp[72],&temp.temp[73],&temp.temp[74],&temp.temp[75],&temp.temp[76],&temp.temp[77],&temp.temp[78],&temp.temp[79],&temp.temp[80],&temp.temp[81],&temp.temp[82],&temp.temp[83],&temp.temp[84],&temp.temp[85],&temp.temp[86],&temp.temp[87],&temp.temp[88],&temp.temp[89],&temp.temp[90],&temp.temp[91],&temp.temp[92],&temp.temp[93],&temp.temp[94],&temp.temp[95]); if(ct == EOF) break; else if(ct<(VOLTLEN+TEMPLEN+1)) @@ -276,8 +325,10 @@ static gboolean read_data(gpointer user_data) // Let's try a random walk process // old libssh seems does not have sftp_expand_path - //file = sftp_open(data->sftp, sftp_expand_path(data->sftp,"~/.local/share/mycan.csv"), access_type, 0); - file = sftp_open(data->sftp, "/home/Spartan_Racing_Charger/.local/share/mycan.csv", access_type, 0); + if(data->dest_changed) + file = sftp_open(data->sftp, sftp_expand_path(data->sftp,"~/.local/share/mycan.csv"), access_type, 0); + else + file = sftp_open(data->sftp, "/home/Spartan_Racing_Charger/.local/share/mycan.csv", access_type, 0); if (file == NULL) { fprintf(stderr, "Can't open file for reading: %s\n", ssh_get_error(data->session)); @@ -343,7 +394,7 @@ static gboolean read_data(gpointer user_data) for(int j=0;j<VOLTLEN;j++) fprintf(fp,",%6.4f",temp.volt[j]); for(int j=0;j<TEMPLEN;j++) - fprintf(fp,",%3hu",temp.temp[j]); + fprintf(fp,",%3hhu",temp.temp[j]); fprintf(fp,"\n"); fclose(fp); } @@ -553,13 +604,13 @@ static void draw_function (GtkDrawingArea *area, { // according to .dbc file ymin=0; - ymax=6.; + ymax=6.5535; } else { // according to .dbc file - ymin=-50; - ymax=100; + ymin=0; + ymax=255; } // Create a labelled box to hold the plot. @@ -600,7 +651,7 @@ static void print_data (GtkWidget *widget, gpointer user_data) for(int i=0;i<VOLTLEN;i++) printf(",%6.4f",data->cans.end->item.volt[i]); for(int i=0;i<TEMPLEN;i++) - printf(",%3hu",data->cans.end->item.temp[i]); + printf(",%3hhu",data->cans.end->item.temp[i]); putchar('\n'); } @@ -732,7 +783,7 @@ static int command_line (GApplication *app, GApplicationCommandLine *cmdline, gp char *dest="Spartan_Racing_Charger@10.0.0.9"; // https://docs.gtk.org/glib/gvariant-format-strings.html#pointers // &s copy the pointer - g_variant_dict_lookup (options, "destination", "&s", &dest); + data->dest_changed = g_variant_dict_lookup (options, "destination", "&s", &dest); g_variant_dict_lookup (options, "local", "b", &data->local); if(!(data->local)) |