From dd331b89ff7a5afedd0732622aed0e461f342c49 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Thu, 14 Sep 2023 15:19:49 -0700 Subject: [PATCH] Fixed an issue where currents were not recorded --- oresat_helmholtz/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oresat_helmholtz/__main__.py b/oresat_helmholtz/__main__.py index 1f59a37..ced31cb 100644 --- a/oresat_helmholtz/__main__.py +++ b/oresat_helmholtz/__main__.py @@ -321,7 +321,8 @@ def do_calibration(self, arg): #Iterating starting at -1 amps to 0 amps. for current_val in range(max_current, min_current - step, step): - current_val = self.psu.set_current_limit(i, current_val) + self.psu.set_current_limit(i, current_val) + current_val = self.psu.return_current(i) mag_x, mag_y, mag_z = self.arduino.get_magnetometer_reading().split(",") dict_to_write = {'Current (A)': current_val, 'Magnetic Field X (T)': mag_x, 'Magnetic Field Y (T)':mag_y,'Magnetic Field Z (T)':mag_z} csv_writer.writerow(dict_to_write)