Skip to content

Commit

Permalink
Fix for case where undervoltage error would not trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
ZodiusInfuser committed Dec 4, 2023
1 parent 5096ae4 commit 3d5fa0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pimoroni_yukon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def monitor(self, under_voltage_counter=UNDERVOLTAGE_COUNT_LIMIT):
# Under Voltage
if voltage_in < self.VOLTAGE_LOWER_LIMIT:
self.__undervoltage_count += 1
if self.__undervoltage_count > under_voltage_counter:
if self.__undervoltage_count > under_voltage_counter or voltage_in < self.VOLTAGE_SHORT_LEVEL:
self.disable_main_output()
raise UnderVoltageError(f"[Yukon] Input voltage of {voltage_in}V below minimum operating level of {self.VOLTAGE_LOWER_LIMIT}V. Turning off output")
else:
Expand Down

0 comments on commit 3d5fa0d

Please sign in to comment.