The constructor of mainwindow was reading the data.csv which
can fail. Unfortunately, a constructor cannot return an error
code and it is unwise to exit the program from within a constructor.
Therefore, move the reading of the data.csv file into the main
function of main.cpp.
Also reading and writing the calibration file can fail so move
that as well.
In addion move the serial port initialisation into main() to
make it clearer.
The constructor of mainwindow was reading the data.csv which can fail. Unfortunately, a constructor cannot return an error code and it is unwise to exit the program from within a constructor. Therefore, move the reading of the data.csv file into the main function of main.cpp.
Also reading and writing the calibration file can fail so move that as well.
In addion move the serial port initialisation into main() to make it clearer.
Signed-off-by: Dean Jenkins skullandbones99@gmail.com