Commit Graph

706 Commits

Author SHA1 Message Date
samuelbles07
d850d27dc1 Clear slr when not avail 2024-11-02 17:31:05 +07:00
samuelbles07
f49e4a4b37 Fix casting enum issue
Previously if algo is slr, it's always consider new update
2024-11-02 17:23:15 +07:00
samuelbles07
75f88b0009 Remove slr correction for pms5003t 2024-11-02 16:15:46 +07:00
samuelbles07
c6961b3ca8 Validate raw pm before correction 2024-11-02 16:11:47 +07:00
samuelbles07
ade72ff3b8 Apply correction to transmission payload
Only for indoor
2024-11-02 16:11:00 +07:00
samuelbles07
9fbbea22ff Fix typo 2024-11-02 14:52:58 +07:00
samuelbles07
7b0381dea3 Apply pm correction to display and led bar 2024-11-02 14:44:32 +07:00
samuelbles07
5867d0f1d5 Fix pmcorrection member datatype
Log using printlog
Function to check if correction is not none
2024-11-02 14:40:35 +07:00
samuelbles07
a98d77e0c3 slr pm2.5 correction implementation 2024-11-02 11:02:36 +07:00
samuelbles07
641003f9d1 Get pm config function 2024-11-02 10:41:01 +07:00
samuelbles07
0275aee370 Copy correction object to jconfig 2024-11-02 10:34:35 +07:00
samuelbles07
ea46b812c1 Handle saving back to eeprom
rename the function
2024-11-02 00:53:33 +07:00
samuelbles07
16c932962a Handle pm correction algorithm from ag server config 2024-11-02 00:10:08 +07:00
Samuel Siburian
f90b2e1a07 Merge pull request #258 from airgradienthq/feat/particle-count
Include PMS particle count 0.5 and 5.0
2024-11-01 18:46:19 +07:00
samuelbles07
3a9bb16c09 Change json key name for particle count 2.5 and 5.0 2024-11-01 17:46:58 +07:00
samuelbles07
bb754edc51 Add other sensor json key field as const 2024-11-01 17:44:11 +07:00
samuelbles07
1d991b1004 json key field from constants 2024-11-01 17:26:18 +07:00
samuelbles07
3ebcc584a4 Update localserver docs 2024-10-31 21:19:46 +07:00
samuelbles07
4d40ae421c Comment data to post
Payload already print out on toString() measurement
2024-10-31 21:17:28 +07:00
samuelbles07
3004a82e7e pms disconnected log 2024-10-31 21:16:29 +07:00
samuelbles07
4af5ca2665 Update local server docs 2024-10-31 21:12:29 +07:00
samuelbles07
e6696f3d41 New particle count 0.5 and 5.0 2024-10-29 23:51:19 +07:00
Samuel Siburian
2b33823162 Merge pull request #257 from airgradienthq/feat/pms-data
Send all particle counts and standard particle values provided by the PMS sensor
2024-10-23 20:57:58 +07:00
samuelbles07
bf0768c7da Comment description to invalidValue variable 2024-10-23 20:55:45 +07:00
samuelbles07
33e2977eb4 Fix comments 2024-10-23 11:18:18 +07:00
samuelbles07
85e779cfc2 Use camel case for transmission payload 2024-10-23 11:05:16 +07:00
samuelbles07
4783684443 Update local server payloads 2024-10-22 18:37:56 +07:00
samuelbles07
3b0c77ca4d New measurements add to transmission payload 2024-10-22 18:28:56 +07:00
samuelbles07
eeba41f497 Include other PMS data to measurements 2024-10-22 17:13:15 +07:00
samuelbles07
fd1f35f6d8 Getter to get other PMS sensor data 2024-10-22 15:28:58 +07:00
Samuel Siburian
eb76eff403 Merge pull request #256 from airgradienthq/restructure-agvalue
Restructure Measurements class
2024-10-22 13:40:50 +07:00
samuelbles07
4673999dda Fix var type 2024-10-22 12:50:43 +07:00
samuelbles07
83aa6a4502 Apply for other monitor series 2024-10-22 00:11:58 +07:00
samuelbles07
8a87b865e6 Handle consecutive invalid value update
Set measurements type average value to invalid when invalidCounter reached max period
2024-10-21 22:37:44 +07:00
samuelbles07
c3068be6e9 Fix calculation PPT compensated PM2.5 2024-10-21 22:00:47 +07:00
samuelbles07
63bb5f8ddb Compensate function use float data type 2024-10-21 01:49:01 +07:00
samuelbles07
8548d3e9f4 Optional to debug every measurement update value 2024-10-21 00:43:04 +07:00
samuelbles07
f7e1363da9 Rename function 2024-10-21 00:22:50 +07:00
samuelbles07
2ffe0a62aa Reduce update interval for max period to 50% 2024-10-21 00:15:59 +07:00
samuelbles07
2cda36ed0d set measurement max period as function 2024-10-20 23:27:27 +07:00
samuelbles07
7de2d0cc30 Set proper max period for moving average based on update interval
SHT read set to 6s
2024-10-20 23:20:16 +07:00
samuelbles07
f478dd16c8 get value function consume 2024-10-20 22:30:49 +07:00
samuelbles07
43ca0a2c2e get and getFloat function specific for latest value
Update functions comments
2024-10-20 20:04:07 +07:00
samuelbles07
84884d0c15 Move average member value to update struct 2024-10-20 19:20:17 +07:00
samuelbles07
f36f860c2e Switch to moving average for sensor data
average value to floating points
2024-10-20 19:01:41 +07:00
MallocArray
e47a9057ea Update AQI breakpoints to 2024 values (#208)
* Update breakpoints to 2024 standard

* Update formula to match Wikipedia
https://en.wikipedia.org/wiki/Air_quality_index#Computing_the_AQI

---------

Co-authored-by: Samuel Siburian <samuelbles07@gmail.com>
2024-10-19 14:55:08 +07:00
samuelbles07
399b4ca1dc Other related class use new AgValue structure 2024-10-19 01:35:36 +07:00
samuelbles07
2e4f4643fa maxUpdate 2024-10-19 01:33:00 +07:00
samuelbles07
0ccf46c219 Rename AgValueType to MeasurementType
Just use plain enum instead of enum class
Remove unecessary legacy variables and function
2024-10-19 01:32:41 +07:00
samuelbles07
76a2f332d7 Fix rhum precission on buildIndoor measurements 2024-10-17 12:08:00 +07:00