Skip to content

Commit

Permalink
umwc: Add config option for max voltage
Browse files Browse the repository at this point in the history
Signed-off-by: Cornelius Claussen <[email protected]>
  • Loading branch information
corneliusclaussen committed Dec 5, 2023
1 parent 6b1778c commit 867f83e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/MicroMegaWattBSP/MicroMegaWattBSP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct Conf {
std::string serial_port;
int baud_rate;
int reset_gpio;
int dc_max_voltage;
};

class MicroMegaWattBSP : public Everest::ModuleBase {
Expand Down
4 changes: 2 additions & 2 deletions modules/MicroMegaWattBSP/dc_supply/power_supply_DCImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ types::power_supply_DC::Capabilities power_supply_DCImpl::handle_getCapabilities
caps.bidirectional = false;
caps.conversion_efficiency_export = 0.9;
caps.max_export_current_A = 25;
caps.max_export_voltage_V = 1000;
caps.max_export_voltage_V = mod->config.dc_max_voltage;
caps.min_export_current_A = 0;
caps.min_export_voltage_V = 180;
caps.min_export_voltage_V = 50;
caps.max_export_power_W = 10000;
caps.current_regulation_tolerance_A = 1;
caps.peak_current_ripple_A = 0;
Expand Down
6 changes: 6 additions & 0 deletions modules/MicroMegaWattBSP/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ config:
minimum: -1
maximum: 1000
default: -1
dc_max_voltage:
description: Maximum voltage to support
type: integer
minimum: 50
maximum: 1000
default: 1000
provides:
dc_supply:
interface: power_supply_DC
Expand Down

0 comments on commit 867f83e

Please sign in to comment.