Skip to content

Commit

Permalink
DCSupplySimulator: use this-> more consistently
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Barsnick <[email protected]>
  • Loading branch information
barsnick committed Jan 22, 2024
1 parent 3840931 commit 9b6c67e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions modules/simulation/DCSupplySimulator/main/power_supply_DCImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ void power_supply_DCImpl::ready() {

types::power_supply_DC::Capabilities power_supply_DCImpl::handle_getCapabilities() {
types::power_supply_DC::Capabilities Capabilities = {
.bidirectional = config.bidirectional,
.bidirectional = this->config.bidirectional,
.current_regulation_tolerance_A = 2.0,
.peak_current_ripple_A = 2.0,
.max_export_voltage_V = static_cast<float>(config.max_voltage),
.min_export_voltage_V = static_cast<float>(config.min_voltage),
.max_export_current_A = static_cast<float>(config.max_current),
.min_export_current_A = static_cast<float>(config.min_current),
.max_export_power_W = static_cast<float>(config.max_power),
.max_import_voltage_V = static_cast<float>(config.max_voltage),
.min_import_voltage_V = static_cast<float>(config.min_voltage),
.max_import_current_A = static_cast<float>(config.max_current),
.min_import_current_A = static_cast<float>(config.min_current),
.max_import_power_W = static_cast<float>(config.max_power),
.max_export_voltage_V = static_cast<float>(this->config.max_voltage),
.min_export_voltage_V = static_cast<float>(this->config.min_voltage),
.max_export_current_A = static_cast<float>(this->config.max_current),
.min_export_current_A = static_cast<float>(this->config.min_current),
.max_export_power_W = static_cast<float>(this->config.max_power),
.max_import_voltage_V = static_cast<float>(this->config.max_voltage),
.min_import_voltage_V = static_cast<float>(this->config.min_voltage),
.max_import_current_A = static_cast<float>(this->config.max_current),
.min_import_current_A = static_cast<float>(this->config.min_current),
.max_import_power_W = static_cast<float>(this->config.max_power),
.conversion_efficiency_import = 0.85,
.conversion_efficiency_export = 0.9,
};
Expand Down Expand Up @@ -105,7 +105,7 @@ void power_supply_DCImpl::power_supply_worker(void) {
types::power_supply_DC::VoltageCurrent voltage_current;

while (true) {
if (power_supply_thread_handle.shouldExit()) {
if (this->power_supply_thread_handle.shouldExit()) {
break;
}

Expand All @@ -116,7 +116,7 @@ void power_supply_DCImpl::power_supply_worker(void) {
voltage_current.voltage_V = static_cast<float>(this->connector_voltage);
voltage_current.current_A = static_cast<float>(this->connector_current);

mod->p_main->publish_voltage_current(voltage_current);
this->mod->p_main->publish_voltage_current(voltage_current);
}
}
} // namespace main
Expand Down

0 comments on commit 9b6c67e

Please sign in to comment.