Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBoehm committed Jan 12, 2025
1 parent ef68c79 commit 088c3e0
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion include/solarcharger/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <TaskSchedulerDeclarations.h>
#include <solarcharger/Provider.h>
#include <solarcharger/Stats.h>
#include <VeDirectMpptController.h>

namespace SolarChargers {

Expand Down
1 change: 0 additions & 1 deletion include/solarcharger/HassIntegration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#pragma once

#include <Arduino.h>
#include <ArduinoJson.h>

namespace SolarChargers {

Expand Down
2 changes: 0 additions & 2 deletions include/solarcharger/Provider.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

#include <VeDirectMpptController.h>

namespace SolarChargers {

class Stats;
Expand Down
3 changes: 0 additions & 3 deletions include/solarcharger/victron/Provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
#include <mutex>
#include <memory>
#include <TaskSchedulerDeclarations.h>

#include <Configuration.h>
#include <solarcharger/Provider.h>
#include <solarcharger/victron/HassIntegration.h>
#include <solarcharger/victron/Stats.h>
#include <VeDirectMpptController.h>

Expand Down
2 changes: 1 addition & 1 deletion include/solarcharger/victron/Stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Stats : public ::SolarChargers::Stats {

void populateJsonWithInstanceStats(const JsonObject &root, const VeDirectMpptController::data_t &mpptData) const;

void publish_mppt_data(const VeDirectMpptController::data_t &mpptData, const VeDirectMpptController::data_t &frame) const;
void publishMpptData(const VeDirectMpptController::data_t &mpptData, const VeDirectMpptController::data_t &frame) const;
};

} // namespace SolarChargers::Victron
1 change: 1 addition & 0 deletions src/solarcharger/victron/HassIntegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ void HassIntegration::publishSensor(const char *caption, const char *icon, const
publish(configTopic, buffer);

}

void HassIntegration::publishBinarySensor(const char *caption, const char *icon, const char *subTopic,
const char *payload_on, const char *payload_off,
const VeDirectMpptController::data_t &mpptData) const
Expand Down
4 changes: 2 additions & 2 deletions src/solarcharger/victron/Stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void Stats::mqttPublish() const
if (!currentData) { continue; }

auto const& previousData = _previousData[entry.first];
publish_mppt_data(*currentData, previousData);
publishMpptData(*currentData, previousData);

if (!_PublishFull) {
_previousData[entry.first] = *currentData;
Expand All @@ -288,7 +288,7 @@ void Stats::mqttPublish() const
}
}

void Stats::publish_mppt_data(const VeDirectMpptController::data_t &currentData, const VeDirectMpptController::data_t &previousData) const {
void Stats::publishMpptData(const VeDirectMpptController::data_t &currentData, const VeDirectMpptController::data_t &previousData) const {
String value;
String topic = "victron/";
topic.concat(currentData.serialNr_SER);
Expand Down

0 comments on commit 088c3e0

Please sign in to comment.