diff --git a/read_arduino.py b/read_arduino.py index e568ecf..1921f63 100644 --- a/read_arduino.py +++ b/read_arduino.py @@ -63,7 +63,7 @@ def read(): time.sleep(delay / 1000) exit(0) else: - controller = serial.Serial(port, baudrate=baud) + controller = serial.Serial(port, baudrate=baud) # TODO: sometimes serial port is in use, make it promt user when it happens # open the file and add a line of header to it, then close f = open(file_name, "a", newline="", encoding="utf-8") diff --git a/serial_plotter.py b/serial_plotter.py index cfe68f0..765d58f 100644 --- a/serial_plotter.py +++ b/serial_plotter.py @@ -78,6 +78,7 @@ class SerialPlotter: self.axs.plot(self.timeStamps[i], self.sensorsData[i], color=self.colors[i], label=f'sensor {i + 1}, latest: {np.format_float_scientific(self.sensorsData[i][-1], precision = 2)} $\Omega$') + # TODO: make the font size an UI option from the settings.json # Make the font size of values placed on x-axis and y-aixs equal to 16 (large enough) plt.xticks(fontsize = 16) plt.yticks(fontsize = 16) diff --git a/test.py b/test.py index d764216..42e56dc 100644 --- a/test.py +++ b/test.py @@ -70,6 +70,7 @@ def gen_settings(resistors, input_voltage, port, filename, window_size, delay): settings["winSize"] = window_size settings["file_name"] = filename settings["delay"] = delay + settings["font_size"] = frame.fontSize.GetValue() open(name, 'w').write(json.dumps(settings, indent=4)) open(filename, "a", newline="", encoding="utf-8")