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 8681c53..9d17483 100644 --- a/serial_plotter.py +++ b/serial_plotter.py @@ -79,6 +79,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 = max(self.fontSize, 10)) plt.yticks(fontsize = max(self.fontSize, 10)) diff --git a/test.py b/test.py index 63bbc7b..2cb8f42 100644 --- a/test.py +++ b/test.py @@ -72,6 +72,7 @@ def gen_settings(resistors, input_voltage, port, filename, window_size, font_siz settings["fontSize"] = font_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")