Merge pull request #5652 from goodprogrammist/bugfix/P056_ReadAverage_by_reference

[P056] Fix SDS011 always reporting 0 (ReadAverage by reference)
This commit is contained in:
TD-er authored and GitHub committed 2026-10-16 11:12:35 +02:00
commit ed56769e43
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ float P056_data_struct::GetPM10_() {
}
}
bool P056_data_struct::ReadAverage(float pm25, float pm10) {
bool P056_data_struct::ReadAverage(float& pm25, float& pm10) {
if (isInitialized()) {
return this->SDS->ReadAverage(pm25, pm10);
} else {
+2 -2
View File
@@ -17,8 +17,8 @@ struct P056_data_struct : public PluginTaskData_base {
bool available();
float GetPM2_5();
float GetPM10_();
bool ReadAverage(float pm25,
float pm10);
bool ReadAverage(float& pm25,
float& pm10);
void SetWorkingPeriod(int minutes);
private: