Update sensor.cpp

added: CWA-handling
This commit is contained in:
August Quint 2020-09-01 12:02:21 +02:00 committed by GitHub
parent 98302a9530
commit 9c1d03d886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,14 @@
#include "globals.h"
#include "sensor.h"
#if (COUNT_CWA)
#include "payload.h"
#include "corona.h"
#include "macsniff.h"
extern PayloadConvert payload;
#endif
// Local logging tag
static const char TAG[] = __FILE__;
@ -47,10 +55,14 @@ uint8_t *sensor_read(uint8_t sensor) {
case 1:
// insert user specific sensor data frames here */
#if (COUNT_CWA)
payload.addCount( cwa_report(), MAC_SNIFF_BLE_CWA);
#else
buf[0] = length;
buf[1] = 0x01;
buf[2] = 0x02;
buf[3] = 0x03;
#endif
break;
case 2:
@ -71,4 +83,4 @@ uint8_t *sensor_read(uint8_t sensor) {
}
return buf;
}
}