forked from M-Labs/thermostat
Remove ["value"] in pwm values
This commit is contained in:
parent
7f1223b1b9
commit
d092c6f9a8
@ -44,7 +44,7 @@ class AsyncioClient:
|
||||
pwm_report = await self.get_pwm()
|
||||
for pwm_channel in pwm_report:
|
||||
for limit in ["max_i_neg", "max_i_pos", "max_v"]:
|
||||
if pwm_channel[limit]["value"] == 0.0:
|
||||
if pwm_channel[limit] == 0.0:
|
||||
logging.warning(
|
||||
"`{}` limit is set to zero on channel {}".format(
|
||||
limit, pwm_channel["channel"]
|
||||
|
@ -208,13 +208,13 @@ class CtrlPanel(QObject):
|
||||
).set_value_with_lock(pwm_params["polarity"])
|
||||
self.params[channel].child(
|
||||
"output", "limits", "max_v"
|
||||
).set_value_with_lock(pwm_params["max_v"]["value"])
|
||||
).set_value_with_lock(pwm_params["max_v"])
|
||||
self.params[channel].child(
|
||||
"output", "limits", "max_i_pos"
|
||||
).set_value_with_lock(pwm_params["max_i_pos"]["value"])
|
||||
).set_value_with_lock(pwm_params["max_i_pos"])
|
||||
self.params[channel].child(
|
||||
"output", "limits", "max_i_neg"
|
||||
).set_value_with_lock(pwm_params["max_i_neg"]["value"])
|
||||
).set_value_with_lock(pwm_params["max_i_neg"])
|
||||
|
||||
@pyqtSlot(list)
|
||||
def update_postfilter(self, postfilter_data):
|
||||
|
@ -17,7 +17,7 @@ class ZeroLimitsWarningView(QObject):
|
||||
for pwm_params in pwm_data:
|
||||
channel = pwm_params["channel"]
|
||||
for limit in "max_i_pos", "max_i_neg", "max_v":
|
||||
if pwm_params[limit]["value"] == 0.0:
|
||||
if pwm_params[limit] == 0.0:
|
||||
channels_zeroed_limits[channel].add(limit)
|
||||
|
||||
channel_disabled = [False, False]
|
||||
|
Loading…
Reference in New Issue
Block a user