Update senddata.cpp
added: CWA-handling
This commit is contained in:
parent
c15d8cb893
commit
b8fc516a01
@ -55,8 +55,14 @@ void SendPayload(uint8_t port, sendprio_t prio) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// write data to sdcard, if present
|
// write data to sdcard, if present
|
||||||
#ifdef HAS_SDCARD
|
#if (HAS_SDCARD)
|
||||||
sdcardWriteData(macs_wifi, macs_ble);
|
if ( port == COUNTERPORT ) {
|
||||||
|
sdcardWriteData(macs_wifi, macs_ble
|
||||||
|
#if (COUNT_CWA)
|
||||||
|
, cwa_report()
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // SendPayload
|
} // SendPayload
|
||||||
@ -143,22 +149,31 @@ void sendData() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (HAS_SENSORS)
|
#if (HAS_SENSORS)
|
||||||
|
#if (HAS_SENSOR_1)
|
||||||
case SENSOR1_DATA:
|
case SENSOR1_DATA:
|
||||||
payload.reset();
|
payload.reset();
|
||||||
payload.addSensor(sensor_read(1));
|
payload.addSensor(sensor_read(1));
|
||||||
SendPayload(SENSOR1PORT, prio_normal);
|
SendPayload(SENSOR1PORT, prio_normal);
|
||||||
|
#if (COUNT_CWA)
|
||||||
|
cwa_clear();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if (HAS_SENSOR_2)
|
||||||
case SENSOR2_DATA:
|
case SENSOR2_DATA:
|
||||||
payload.reset();
|
payload.reset();
|
||||||
payload.addSensor(sensor_read(2));
|
payload.addSensor(sensor_read(2));
|
||||||
SendPayload(SENSOR2PORT, prio_normal);
|
SendPayload(SENSOR2PORT, prio_normal);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if (HAS_SENSOR_3)
|
||||||
case SENSOR3_DATA:
|
case SENSOR3_DATA:
|
||||||
payload.reset();
|
payload.reset();
|
||||||
payload.addSensor(sensor_read(3));
|
payload.addSensor(sensor_read(3));
|
||||||
SendPayload(SENSOR3PORT, prio_normal);
|
SendPayload(SENSOR3PORT, prio_normal);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined BAT_MEASURE_ADC || defined HAS_PMU)
|
#if (defined BAT_MEASURE_ADC || defined HAS_PMU)
|
||||||
case BATT_DATA:
|
case BATT_DATA:
|
||||||
|
Loading…
Reference in New Issue
Block a user