Skip to content

Commit

Permalink
Update load current and power, as it must be negative
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoAldea committed Feb 5, 2024
1 parent 5fd90c9 commit 96f7959
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ def update(self, gen_meas: CyclerDataGenMeasC, ext_meas: CyclerDataExtMeasC,#pyl
status.pwr_mode = CyclerDataPwrModeE(res_source.mode.value)
else:
gen_meas.voltage = res_load.voltage
gen_meas.current = res_load.current
gen_meas.power = res_load.power
# The current is negative because the load is consuming power
gen_meas.current = res_load.current*-1
gen_meas.power = res_load.power*-1
status.pwr_mode = CyclerDataPwrModeE(res_load.mode.value)
if self.mapping_load is not None:
for key in self.mapping_load.keys():
Expand Down

0 comments on commit 96f7959

Please sign in to comment.