@@ -51,7 +51,7 @@ void SolarChargerClass::loop()
51
51
}
52
52
}
53
53
54
- size_t SolarChargerClass::controllerAmount ()
54
+ size_t SolarChargerClass::controllerAmount () const
55
55
{
56
56
std::lock_guard<std::mutex> lock (_mutex);
57
57
@@ -62,7 +62,7 @@ size_t SolarChargerClass::controllerAmount()
62
62
return 0 ;
63
63
}
64
64
65
- bool SolarChargerClass::isDataValid ()
65
+ bool SolarChargerClass::isDataValid () const
66
66
{
67
67
std::lock_guard<std::mutex> lock (_mutex);
68
68
@@ -73,7 +73,7 @@ bool SolarChargerClass::isDataValid()
73
73
return false ;
74
74
}
75
75
76
- uint32_t SolarChargerClass::getDataAgeMillis ()
76
+ uint32_t SolarChargerClass::getDataAgeMillis () const
77
77
{
78
78
std::lock_guard<std::mutex> lock (_mutex);
79
79
@@ -84,7 +84,7 @@ uint32_t SolarChargerClass::getDataAgeMillis()
84
84
return 0 ;
85
85
}
86
86
87
- uint32_t SolarChargerClass::getDataAgeMillis (size_t idx)
87
+ uint32_t SolarChargerClass::getDataAgeMillis (size_t idx) const
88
88
{
89
89
std::lock_guard<std::mutex> lock (_mutex);
90
90
@@ -97,7 +97,7 @@ uint32_t SolarChargerClass::getDataAgeMillis(size_t idx)
97
97
98
98
99
99
// total output of all MPPT charge controllers in Watts
100
- int32_t SolarChargerClass::getOutputPowerWatts ()
100
+ int32_t SolarChargerClass::getOutputPowerWatts () const
101
101
{
102
102
std::lock_guard<std::mutex> lock (_mutex);
103
103
@@ -109,7 +109,7 @@ int32_t SolarChargerClass::getOutputPowerWatts()
109
109
}
110
110
111
111
// total panel input power of all MPPT charge controllers in Watts
112
- int32_t SolarChargerClass::getPanelPowerWatts ()
112
+ int32_t SolarChargerClass::getPanelPowerWatts () const
113
113
{
114
114
std::lock_guard<std::mutex> lock (_mutex);
115
115
@@ -121,7 +121,7 @@ int32_t SolarChargerClass::getPanelPowerWatts()
121
121
}
122
122
123
123
// sum of total yield of all MPPT charge controllers in kWh
124
- float SolarChargerClass::getYieldTotal ()
124
+ float SolarChargerClass::getYieldTotal () const
125
125
{
126
126
std::lock_guard<std::mutex> lock (_mutex);
127
127
@@ -133,7 +133,7 @@ float SolarChargerClass::getYieldTotal()
133
133
}
134
134
135
135
// sum of today's yield of all MPPT charge controllers in kWh
136
- float SolarChargerClass::getYieldDay ()
136
+ float SolarChargerClass::getYieldDay () const
137
137
{
138
138
std::lock_guard<std::mutex> lock (_mutex);
139
139
@@ -145,7 +145,7 @@ float SolarChargerClass::getYieldDay()
145
145
}
146
146
147
147
// minimum of all MPPT charge controllers' output voltages in V
148
- float SolarChargerClass::getOutputVoltage ()
148
+ float SolarChargerClass::getOutputVoltage () const
149
149
{
150
150
std::lock_guard<std::mutex> lock (_mutex);
151
151
@@ -156,7 +156,7 @@ float SolarChargerClass::getOutputVoltage()
156
156
return 0 ;
157
157
}
158
158
159
- std::optional<VeDirectMpptController::data_t > SolarChargerClass::getData (size_t idx)
159
+ std::optional<VeDirectMpptController::data_t > SolarChargerClass::getData (size_t idx) const
160
160
{
161
161
std::lock_guard<std::mutex> lock (_mutex);
162
162
0 commit comments