From ae20f2f5a7bb50dd592bc65c1033143afb615069 Mon Sep 17 00:00:00 2001 From: Thea Flowers Date: Mon, 20 Sep 2021 18:33:18 -0400 Subject: [PATCH] factory: only output the serial number and firmware version once --- factory/libgemini/adc_calibration.py | 1 - factory/libgemini/gemini.py | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/factory/libgemini/adc_calibration.py b/factory/libgemini/adc_calibration.py index a78f6ccb..d2e5799d 100644 --- a/factory/libgemini/adc_calibration.py +++ b/factory/libgemini/adc_calibration.py @@ -238,7 +238,6 @@ def run( log.info(f"Saved measurement data to {measurement_file}") log.success("Done") - gem.close() if __name__ == "__main__": diff --git a/factory/libgemini/gemini.py b/factory/libgemini/gemini.py index aed1ac3c..b1d12788 100644 --- a/factory/libgemini/gemini.py +++ b/factory/libgemini/gemini.py @@ -61,10 +61,11 @@ def get_serial_number(self): return self.serial_number def enter_calibration_mode(self): - self.get_firmware_version() - log.info(f"Gemini version: {self.version}") - self.get_serial_number() - log.info(f"Serial number: {self.serial_number}") + if self.version is None: + self.get_firmware_version() + log.info(f"Gemini version: {self.version}") + self.get_serial_number() + log.info(f"Serial number: {self.serial_number}") self.sysex(SysExCommands.ENTER_CALIBRATION)