Skip to content

Commit 148ebf3

Browse files
committed
_sensorValue private and update all members
-moved _sensorValue to private variable in Class -updates all members of _sensorValue struct (except "internal use only" members)
1 parent 2fcf226 commit 148ebf3

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/sfeBmv080.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,10 @@ bool sfeBmv080::getIsObstructed()
113113
void sfeBmv080::setSensorValue(bmv080_output_t bmv080_output)
114114
{
115115
_dataAvailable = true;
116-
// Serial.println("setSensorValue");
117-
// Serial.println(pm25);
118-
119-
//_sensorValue.pm2_5 = pm25;
120-
121116
_sensorValue.pm2_5 = bmv080_output.pm2_5;
122-
123-
// _sensorValue.runtime_in_sec = bmv080_output.runtime_in_sec;
117+
_sensorValue.runtime_in_sec = bmv080_output.runtime_in_sec;
124118
_sensorValue.is_obstructed = bmv080_output.is_obstructed;
125-
// _sensorValue.is_outside_detection_limits = bmv080_output.is_outside_detection_limits;
126-
127-
// Serial.println("setSensorValue.pm2_5");
128-
// Serial.println(_sensorValue.pm2_5);
119+
_sensorValue.is_outside_detection_limits = bmv080_output.is_outside_detection_limits;
129120
}
130121

131122
// void print_to_serial(const char *format, ...)

src/sfeBmv080.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ class sfeBmv080
6161
void setSensorValue(bmv080_output_t bmv080_output);
6262
//void setSensorValue(float pm25);
6363
//void bmv080_service_routine(void);
64-
bmv080_output_t _sensorValue;
64+
6565
bool dataAvailable();
6666

6767
bmv080_handle_t bmv080_handle_class = NULL;
6868

6969
private:
7070
bool _dataAvailable = false;
71+
bmv080_output_t _sensorValue;
7172

7273
// protected:
7374
// sfeTkII2C *_theBus;

0 commit comments

Comments
 (0)