Skip to content

Commit

Permalink
Fix: object types for the vbatt and pwr_out in the PMOS Charger prote…
Browse files Browse the repository at this point in the history
…ction

Fix: Object type in the current drawe in test_protected_charger
  • Loading branch information
Suke0811 committed Apr 1, 2024
1 parent 3d3992c commit c11398c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions electronics_lib/PowerConditioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,10 @@ def contents(self):
self.file_path("resources", f"{self.__class__.__name__}.kicad_sch"),
conversions={
'vbatt': VoltageSink(
current_draw=max_vbatt_current
current_draw=self.chg.link().current_drawn
),
'pwr_out': VoltageSource(
voltage_out=max_vcharge_voltage),
voltage_out=self.chg.link().voltage),
'gnd': Ground(),
})

2 changes: 1 addition & 1 deletion examples/test_protected_charger.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def contents(self) -> None:
self.pwr_pins = self.Block(PassiveConnector(length=2))
self.connect(self.pwr_pins.pins.request('1').adapt_to(Ground()), self.gnd)
self.connect(self.pmos.pwr_out, self.pmos_load.pwr_in)
self.connect(self.pmos_load.pwr_out, self.pwr_pins.pins.request('2').adapt_to(VoltageSink(current_draw=2.0*Amp)))
self.connect(self.pmos_load.pwr_out, self.pwr_pins.pins.request('2').adapt_to(VoltageSink(current_draw=(0, 2.0)*Amp)))



Expand Down

0 comments on commit c11398c

Please sign in to comment.