Skip to content

Commit

Permalink
rename 'getPowerOutputWatts' to 'getOutputPowerWatts'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBoehm committed Dec 4, 2024
1 parent ba4083b commit a7615d1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/SolarCharger.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SolarChargerClass {
uint32_t getDataAgeMillis(size_t idx);

// total output of all MPPT charge controllers in Watts
int32_t getPowerOutputWatts();
int32_t getOutputPowerWatts();

// total panel input power of all MPPT charge controllers in Watts
int32_t getPanelPowerWatts();
Expand Down
2 changes: 1 addition & 1 deletion include/SolarChargerProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SolarChargerProvider {
virtual uint32_t getDataAgeMillis() const = 0;
virtual uint32_t getDataAgeMillis(size_t idx) const = 0;
// total output of all MPPT charge controllers in Watts
virtual int32_t getPowerOutputWatts() const = 0;
virtual int32_t getOutputPowerWatts() const = 0;

// total panel input power of all MPPT charge controllers in Watts
virtual int32_t getPanelPowerWatts() const = 0;
Expand Down
6 changes: 3 additions & 3 deletions include/VictronMppt.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

#include <mutex>
#include <memory>
#include <TaskSchedulerDeclarations.h>

#include "VeDirectMpptController.h"
#include "SolarChargerProvider.h"
#include "VeDirectMpptController.h"
#include "Configuration.h"
#include <TaskSchedulerDeclarations.h>

class VictronMppt : public SolarChargerProvider {
public:
Expand All @@ -29,7 +29,7 @@ class VictronMppt : public SolarChargerProvider {
std::optional<VeDirectMpptController::data_t> getData(size_t idx = 0) const final;

// total output of all MPPT charge controllers in Watts
int32_t getPowerOutputWatts() const final;
int32_t getOutputPowerWatts() const final;

// total panel input power of all MPPT charge controllers in Watts
int32_t getPanelPowerWatts() const final;
Expand Down
4 changes: 2 additions & 2 deletions src/PowerLimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void PowerLimiterClass::fullSolarPassthrough(PowerLimiterClass::Status reason)
uint16_t targetOutput = 0;

if (SolarCharger.isDataValid()) {
targetOutput = static_cast<uint16_t>(std::max<int32_t>(0, SolarCharger.getPowerOutputWatts()));
targetOutput = static_cast<uint16_t>(std::max<int32_t>(0, SolarCharger.getOutputPowerWatts()));
targetOutput = dcPowerBusToInverterAc(targetOutput);
}

Expand Down Expand Up @@ -682,7 +682,7 @@ uint16_t PowerLimiterClass::getSolarPassthroughPower()
return 0;
}

return SolarCharger.getPowerOutputWatts();
return SolarCharger.getOutputPowerWatts();
}

float PowerLimiterClass::getBatteryInvertersOutputAcWatts()
Expand Down
4 changes: 2 additions & 2 deletions src/SolarCharger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ uint32_t SolarChargerClass::getDataAgeMillis(size_t idx)


// total output of all MPPT charge controllers in Watts
int32_t SolarChargerClass::getPowerOutputWatts()
int32_t SolarChargerClass::getOutputPowerWatts()
{
std::lock_guard<std::mutex> lock(_mutex);

if (_upProvider) {
return _upProvider->getPowerOutputWatts();
return _upProvider->getOutputPowerWatts();
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/VictronMppt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ std::optional<VeDirectMpptController::data_t> VictronMppt::getData(size_t idx) c
return _controllers[idx]->getData();
}

int32_t VictronMppt::getPowerOutputWatts() const
int32_t VictronMppt::getOutputPowerWatts() const
{
int32_t sum = 0;

Expand Down

0 comments on commit a7615d1

Please sign in to comment.