payload.cpp: sanitized
This commit is contained in:
parent
0de6d61e26
commit
07d5b18cc1
@ -335,17 +335,20 @@ void PayloadConvert::addSDS(sdsStatus_t sds) {
|
|||||||
#if (PAYLOAD_ENCODER == 3) // Cayenne LPP dynamic
|
#if (PAYLOAD_ENCODER == 3) // Cayenne LPP dynamic
|
||||||
buffer[cursor++] = LPP_PARTMATTER10_CHANNEL; // for PM10
|
buffer[cursor++] = LPP_PARTMATTER10_CHANNEL; // for PM10
|
||||||
#endif
|
#endif
|
||||||
buffer[cursor++] = LPP_LUMINOSITY; // workaround since cayenne has no data type meter
|
buffer[cursor++] =
|
||||||
|
LPP_LUMINOSITY; // workaround since cayenne has no data type meter
|
||||||
buffer[cursor++] = highByte((uint16_t)(sds.pm10 * 10));
|
buffer[cursor++] = highByte((uint16_t)(sds.pm10 * 10));
|
||||||
buffer[cursor++] = lowByte((uint16_t)(sds.pm10 * 10));
|
buffer[cursor++] = lowByte((uint16_t)(sds.pm10 * 10));
|
||||||
// value of PM2.5
|
// value of PM2.5
|
||||||
#if (PAYLOAD_ENCODER == 3) // Cayenne LPP dynamic
|
#if (PAYLOAD_ENCODER == 3) // Cayenne LPP dynamic
|
||||||
buffer[cursor++] = LPP_PARTMATTER25_CHANNEL; // for PM2.5
|
buffer[cursor++] = LPP_PARTMATTER25_CHANNEL; // for PM2.5
|
||||||
#endif
|
#endif
|
||||||
buffer[cursor++] = LPP_LUMINOSITY; // workaround since cayenne has no data type meter
|
buffer[cursor++] =
|
||||||
|
LPP_LUMINOSITY; // workaround since cayenne has no data type meter
|
||||||
buffer[cursor++] = highByte((uint16_t)(sds.pm25 * 10));
|
buffer[cursor++] = highByte((uint16_t)(sds.pm25 * 10));
|
||||||
buffer[cursor++] = lowByte((uint16_t)(sds.pm25 * 10));
|
buffer[cursor++] = lowByte((uint16_t)(sds.pm25 * 10));
|
||||||
#endif // HAS_SDS011
|
#endif // HAS_SDS011
|
||||||
|
}
|
||||||
|
|
||||||
void PayloadConvert::addCount(uint16_t value, uint8_t snifftype) {
|
void PayloadConvert::addCount(uint16_t value, uint8_t snifftype) {
|
||||||
switch (snifftype) {
|
switch (snifftype) {
|
||||||
|
Loading…
Reference in New Issue
Block a user