Skip to content

Commit

Permalink
remove default declarations from the Stats.h base class
Browse files Browse the repository at this point in the history
  • Loading branch information
SW-Niko committed Feb 4, 2025
1 parent 475408b commit fd60dbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/solarcharger/Stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class Stats {

// state of operation from the first available controller
enum class StateOfOperation : uint8_t { Off = 0, Bulk = 1, Absorption = 2, Float = 3, Various = 255 };
virtual std::optional<Stats::StateOfOperation> getStateOfOperation() const { return std::nullopt; };
virtual std::optional<Stats::StateOfOperation> getStateOfOperation() const;

// float voltage from the first available charge controller
virtual std::optional<float> getFloatVoltage() const { return std::nullopt; };
virtual std::optional<float> getFloatVoltage() const;

// absorption voltage from the first available charge controller
virtual std::optional<float> getAbsorptionVoltage() const { return std::nullopt; };
virtual std::optional<float> getAbsorptionVoltage() const;

// convert stats to JSON for web application live view
virtual void getLiveViewData(JsonVariant& root, const boolean fullUpdate, const uint32_t lastPublish) const;
Expand Down
3 changes: 3 additions & 0 deletions include/solarcharger/mqtt/Stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ friend class Provider;
std::optional<uint16_t> getPanelPowerWatts() const final { return std::nullopt; }
std::optional<float> getYieldTotal() const final { return std::nullopt; }
std::optional<float> getYieldDay() const final { return std::nullopt; }
std::optional<StateOfOperation> getStateOfOperation() const final { return std::nullopt; }
std::optional<float> getFloatVoltage() const final { return std::nullopt; }
std::optional<float> getAbsorptionVoltage() const final { return std::nullopt; }

void getLiveViewData(JsonVariant& root, const boolean fullUpdate, const uint32_t lastPublish) const final;

Expand Down

0 comments on commit fd60dbc

Please sign in to comment.