aboutsummaryrefslogtreecommitdiff
path: root/mycan.c
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-04-28 20:29:48 -0700
committerXiao Pan <xyz@flylightning.xyz>2025-04-28 20:30:16 -0700
commit687884eccca32235b5fb2a3b0c96b455aa728271 (patch)
tree4cff959aab498a3865aca12ae1075dff57f1adc4 /mycan.c
parent2adfbd69b37ff56f429fb1898ebaba9988166acb (diff)
feat: store past data
I also copied old code that can only do live data to old/mycan_live.c
Diffstat (limited to 'mycan.c')
-rw-r--r--mycan.c549
1 files changed, 280 insertions, 269 deletions
diff --git a/mycan.c b/mycan.c
index 355dd24..8c6910b 100644
--- a/mycan.c
+++ b/mycan.c
@@ -29,6 +29,9 @@ cansend vcan0 680#00.FF.02.00.02.00.02.00
#include <linux/can.h>
#include <linux/can/raw.h>
+// time()
+#include <time.h>
+
#include "all_SRE_edited.h"
// https://github.com/howerj/dbcc MIT
@@ -44,9 +47,14 @@ int main(int argc, char **argv)
struct sockaddr_can addr;
struct ifreq ifr;
struct can_frame frame;
+ // usually ~/.local/share
+ const char *dir=getenv("XDG_DATA_HOME");
+ // /mycan.csv 10 + \0 1 = 11
+ char filename[strlen(dir)+11];
+ sprintf(filename,"%s/mycan.csv",dir);
can_obj_all_sre_edited_h_t obj;
- dbcc_time_stamp_t t = 0;
+ dbcc_time_stamp_t t, t_before;
uint64_t can_message_u64;
//memset(&obj, 0, sizeof(can_obj_all_sretest_h_t));
@@ -104,7 +112,7 @@ int main(int argc, char **argv)
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, &rfilter, sizeof(rfilter));
//5.Receive data and exit
- for(;;)
+ for(t_before=time(NULL);;)
{
nbytes = read(s, &frame, sizeof(frame));
if(nbytes > 0) {
@@ -112,9 +120,9 @@ int main(int argc, char **argv)
FILE * fp;
// try FIFO, socket and other file types maybe better, not sure
- if((fp=fopen("/tmp/mycan","w"))==NULL)
+ if((fp=fopen(filename,"a"))==NULL)
{
- fprintf(stderr,"Can't open file \"%s\".\n","/tmp/mycan");
+ fprintf(stderr,"Can't open file \"%s\".\n",filename);
exit(1);
}
@@ -122,276 +130,279 @@ int main(int argc, char **argv)
for(int i = 0; i < 8; i++)
printf("data[%d] = %d\r\n", i, frame.data[i]);
can_message_u64 = u64_from_can_msg(frame.data);
+ t=time(NULL);
unpack_message(&obj,frame.can_id,can_message_u64,frame.can_dlc,t);
printf("my prints:\n");
print_message(&obj, frame.can_id, stdout);
- printf("my timestamp: %d\n", t);
- //decode_can_0x630_BMS_Cell_4_Voltage(&obj,&out);
- //printf("my can_0x630_BMS_Cell_4_Voltage: %g\n", out);
- //decode_can_0x680_BMS_Section_4_Temp(&obj,&out);
- //printf("my decode_can_0x680_BMS_Section_4_Temp: %g\n", out);
- // Better if concat strings and print all at once
- fprintf(fp,"%d",t);
- decode_can_0x630_BMS_Cell_4_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x630_BMS_Cell_3_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x630_BMS_Cell_2_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x630_BMS_Cell_1_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x631_BMS_Cell_8_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x631_BMS_Cell_7_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x631_BMS_Cell_6_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x631_BMS_Cell_5_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x632_BMS_Cell_12_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x632_BMS_Cell_11_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x632_BMS_Cell_10_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x632_BMS_Cell_9_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x633_BMS_Cell_4_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x633_BMS_Cell_3_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x633_BMS_Cell_2_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x633_BMS_Cell_1_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x634_BMS_Cell_8_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x634_BMS_Cell_7_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x634_BMS_Cell_6_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x634_BMS_Cell_5_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x635_BMS_Cell_12_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x635_BMS_Cell_11_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x635_BMS_Cell_10_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x635_BMS_Cell_9_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x636_BMS_Cell_4_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x636_BMS_Cell_3_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x636_BMS_Cell_2_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x636_BMS_Cell_1_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x637_BMS_Cell_8_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x637_BMS_Cell_7_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x637_BMS_Cell_6_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x637_BMS_Cell_5_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x638_BMS_Cell_12_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x638_BMS_Cell_11_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x638_BMS_Cell_10_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x638_BMS_Cell_9_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x639_BMS_Cell_4_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x639_BMS_Cell_3_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x639_BMS_Cell_2_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x639_BMS_Cell_1_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63a_BMS_Cell_8_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63a_BMS_Cell_7_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63a_BMS_Cell_6_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63a_BMS_Cell_5_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63b_BMS_Cell_12_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63b_BMS_Cell_11_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63b_BMS_Cell_10_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63b_BMS_Cell_9_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63c_BMS_Cell_4_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63c_BMS_Cell_3_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63c_BMS_Cell_2_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63c_BMS_Cell_1_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63d_BMS_Cell_8_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63d_BMS_Cell_7_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63d_BMS_Cell_6_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63d_BMS_Cell_5_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63e_BMS_Cell_12_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63e_BMS_Cell_11_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63e_BMS_Cell_10_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63e_BMS_Cell_9_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63f_BMS_Cell_4_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63f_BMS_Cell_3_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63f_BMS_Cell_2_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x63f_BMS_Cell_1_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x640_BMS_Cell_8_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x640_BMS_Cell_7_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x640_BMS_Cell_6_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x640_BMS_Cell_5_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x641_BMS_Cell_12_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x641_BMS_Cell_11_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x641_BMS_Cell_10_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x641_BMS_Cell_9_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x642_BMS_Cell_4_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x642_BMS_Cell_3_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x642_BMS_Cell_2_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x642_BMS_Cell_1_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x643_BMS_Cell_8_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x643_BMS_Cell_7_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x643_BMS_Cell_6_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x643_BMS_Cell_5_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x644_BMS_Cell_12_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x644_BMS_Cell_11_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x644_BMS_Cell_10_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x644_BMS_Cell_9_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x645_BMS_Cell_4_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x645_BMS_Cell_3_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x645_BMS_Cell_2_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x645_BMS_Cell_1_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x646_BMS_Cell_8_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x646_BMS_Cell_7_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x646_BMS_Cell_6_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x646_BMS_Cell_5_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x647_BMS_Cell_12_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x647_BMS_Cell_11_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x647_BMS_Cell_10_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x647_BMS_Cell_9_Voltage(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x680_BMS_Section_4_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x680_BMS_Section_3_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x680_BMS_Section_2_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x680_BMS_Section_1_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x683_BMS_Section_4_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x683_BMS_Section_3_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x683_BMS_Section_2_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x683_BMS_Section_1_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x686_BMS_Section_4_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x686_BMS_Section_3_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x686_BMS_Section_2_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x686_BMS_Section_1_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x689_BMS_Section_4_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x689_BMS_Section_3_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x689_BMS_Section_2_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x689_BMS_Section_1_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x68c_BMS_Section_4_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x68c_BMS_Section_3_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x68c_BMS_Section_2_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x68c_BMS_Section_1_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x68f_BMS_Section_4_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x68f_BMS_Section_3_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x68f_BMS_Section_2_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x68f_BMS_Section_1_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x692_BMS_Section_4_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x692_BMS_Section_3_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x692_BMS_Section_2_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x692_BMS_Section_1_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x695_BMS_Section_4_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x695_BMS_Section_3_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x695_BMS_Section_2_Temp(&obj,&out);
- fprintf(fp,",%g",out);
- decode_can_0x695_BMS_Section_1_Temp(&obj,&out);
- fprintf(fp,",%g\n",out);
+ printf("my timestamp: %u\n", t);
+ if(t>t_before)
+ {
+ t_before=t;
+ //decode_can_0x630_BMS_Cell_4_Voltage(&obj,&out);
+ //printf("my can_0x630_BMS_Cell_4_Voltage: %g\n", out);
+ //decode_can_0x680_BMS_Section_4_Temp(&obj,&out);
+ //printf("my decode_can_0x680_BMS_Section_4_Temp: %g\n", out);
+ // Maybe better if concat strings and print all at once
+ fprintf(fp,"%u",t);
+ decode_can_0x630_BMS_Cell_4_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x630_BMS_Cell_3_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x630_BMS_Cell_2_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x630_BMS_Cell_1_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x631_BMS_Cell_8_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x631_BMS_Cell_7_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x631_BMS_Cell_6_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x631_BMS_Cell_5_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x632_BMS_Cell_12_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x632_BMS_Cell_11_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x632_BMS_Cell_10_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x632_BMS_Cell_9_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x633_BMS_Cell_4_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x633_BMS_Cell_3_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x633_BMS_Cell_2_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x633_BMS_Cell_1_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x634_BMS_Cell_8_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x634_BMS_Cell_7_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x634_BMS_Cell_6_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x634_BMS_Cell_5_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x635_BMS_Cell_12_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x635_BMS_Cell_11_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x635_BMS_Cell_10_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x635_BMS_Cell_9_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x636_BMS_Cell_4_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x636_BMS_Cell_3_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x636_BMS_Cell_2_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x636_BMS_Cell_1_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x637_BMS_Cell_8_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x637_BMS_Cell_7_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x637_BMS_Cell_6_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x637_BMS_Cell_5_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x638_BMS_Cell_12_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x638_BMS_Cell_11_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x638_BMS_Cell_10_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x638_BMS_Cell_9_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x639_BMS_Cell_4_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x639_BMS_Cell_3_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x639_BMS_Cell_2_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x639_BMS_Cell_1_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63a_BMS_Cell_8_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63a_BMS_Cell_7_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63a_BMS_Cell_6_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63a_BMS_Cell_5_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63b_BMS_Cell_12_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63b_BMS_Cell_11_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63b_BMS_Cell_10_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63b_BMS_Cell_9_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63c_BMS_Cell_4_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63c_BMS_Cell_3_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63c_BMS_Cell_2_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63c_BMS_Cell_1_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63d_BMS_Cell_8_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63d_BMS_Cell_7_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63d_BMS_Cell_6_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63d_BMS_Cell_5_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63e_BMS_Cell_12_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63e_BMS_Cell_11_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63e_BMS_Cell_10_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63e_BMS_Cell_9_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63f_BMS_Cell_4_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63f_BMS_Cell_3_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63f_BMS_Cell_2_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x63f_BMS_Cell_1_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x640_BMS_Cell_8_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x640_BMS_Cell_7_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x640_BMS_Cell_6_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x640_BMS_Cell_5_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x641_BMS_Cell_12_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x641_BMS_Cell_11_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x641_BMS_Cell_10_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x641_BMS_Cell_9_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x642_BMS_Cell_4_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x642_BMS_Cell_3_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x642_BMS_Cell_2_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x642_BMS_Cell_1_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x643_BMS_Cell_8_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x643_BMS_Cell_7_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x643_BMS_Cell_6_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x643_BMS_Cell_5_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x644_BMS_Cell_12_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x644_BMS_Cell_11_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x644_BMS_Cell_10_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x644_BMS_Cell_9_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x645_BMS_Cell_4_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x645_BMS_Cell_3_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x645_BMS_Cell_2_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x645_BMS_Cell_1_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x646_BMS_Cell_8_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x646_BMS_Cell_7_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x646_BMS_Cell_6_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x646_BMS_Cell_5_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x647_BMS_Cell_12_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x647_BMS_Cell_11_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x647_BMS_Cell_10_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x647_BMS_Cell_9_Voltage(&obj,&out);
+ fprintf(fp,",%5.3f",out);
+ decode_can_0x680_BMS_Section_4_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x680_BMS_Section_3_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x680_BMS_Section_2_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x680_BMS_Section_1_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x683_BMS_Section_4_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x683_BMS_Section_3_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x683_BMS_Section_2_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x683_BMS_Section_1_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x686_BMS_Section_4_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x686_BMS_Section_3_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x686_BMS_Section_2_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x686_BMS_Section_1_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x689_BMS_Section_4_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x689_BMS_Section_3_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x689_BMS_Section_2_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x689_BMS_Section_1_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x68c_BMS_Section_4_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x68c_BMS_Section_3_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x68c_BMS_Section_2_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x68c_BMS_Section_1_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x68f_BMS_Section_4_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x68f_BMS_Section_3_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x68f_BMS_Section_2_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x68f_BMS_Section_1_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x692_BMS_Section_4_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x692_BMS_Section_3_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x692_BMS_Section_2_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x692_BMS_Section_1_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x695_BMS_Section_4_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x695_BMS_Section_3_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x695_BMS_Section_2_Temp(&obj,&out);
+ fprintf(fp,",%5.1f",out);
+ decode_can_0x695_BMS_Section_1_Temp(&obj,&out);
+ fprintf(fp,",%5.1f\n",out);
+ }
fclose(fp);
- t++;
- //break;
}
}