Skip to content

Commit

Permalink
Update SwitchInternalPIDRegulation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Yagami-Jiang authored Aug 23, 2023
1 parent 7c82a89 commit 0b3ac1d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ def pid_control(self):
sw_temp = self.exception_data_handling()
if not sw_temp:
return DUTY_MAX
if sw_temp >= 124: # TO power off Switch board
self.syslog.critical("If the Switch Internal temperature exceeds 124°, "
"the Switch board will be powered off. If you want to restore, do AC operation")
os.popen("i2cset -y -f 100 0x0d 0x26 0xfd")
if len(T_LIST) < 2:
T_LIST.append(float(sw_temp))
self.syslog.debug("Init Switch Internal PID Control T_LIST:%s" % T_LIST)
Expand Down

0 comments on commit 0b3ac1d

Please sign in to comment.