pcsensor-temper
pcsensor-temper copied to clipboard
Separate API and Program
This is a fairly dramatic change, as I also reformatted most of the code to be a bit more consistent.
In short, I separated the details of the USB functionality from the actual CLI program. I also hid all the details of the USB code into a simple API:
typedef struct usb_temper* usb_temper_t;
usb_temper_t usb_temper_init(int devicenum, int debug, int calibration);
float usb_temper_get_tempc(usb_temper_t usb_temper);
int usb_temper_finish(usb_temper_t* usb_temper);
The goal here is just to make everything more modular. This also sets the stage for my next PR, which adds SQLite logging capabilities...