wjasper / Linux_Drivers

Open source Linux device drivers
GNU General Public License v3.0
110 stars 64 forks source link

Writing text file out for usb-2001-tc creates the file but does not write out and save the data #24

Closed stillpointx closed 5 years ago

stillpointx commented 5 years ago

Greetings,

I can get the usb-2001-tc working which is great!!! Thanks!

But I'm having trouble writing the data out to a text file and changing what gets written out to a text file. Using the menu creates the file but does not write out and save the data to the text file.

1) So the 1st question is how can I fix it so the data gets written and saved to the text file using your menu options.

2) Which file do I need to change to alter what gets written out to the text file? I'm trying to create a comma delimited csv file with the format date,time,Temperature in F, Temperature in C

2001-tc-menu

Also there might be a typo or it could be using the wrong driver see red arrows one says 2001 which is the one I'm using but it says 2100

screenshot-April-05-2019-18:02:21

I'm using Ubuntu 18.04 64bit Linux

wjasper commented 5 years ago

The test-usb2001tc.c is "throwaway" code. If you hit ^C (Control-C) before 1000 samples, the file will not properly close and you won't see the data in the file. Look at the "T" option in the code and change the 1000 to something smaller. I fixed the typo at the top.