new option WIFICOUNTER fixed
This commit is contained in:
parent
77e795dbf8
commit
38118cae6c
@ -9,7 +9,9 @@ static const char TAG[] = __FILE__;
|
||||
|
||||
Ticker housekeeper;
|
||||
|
||||
void housekeeping() { xTaskNotifyFromISR(irqHandlerTask, CYCLIC_IRQ, eSetBits, NULL); }
|
||||
void housekeeping() {
|
||||
xTaskNotifyFromISR(irqHandlerTask, CYCLIC_IRQ, eSetBits, NULL);
|
||||
}
|
||||
|
||||
// do all housekeeping
|
||||
void doHousekeeping() {
|
||||
@ -115,8 +117,10 @@ uint32_t getFreeRAM() {
|
||||
}
|
||||
|
||||
void reset_counters() {
|
||||
#if ((WIFICOUNTER) || (BLECOUNTER))
|
||||
macs.clear(); // clear all macs container
|
||||
macs_total = 0; // reset all counters
|
||||
macs_wifi = 0;
|
||||
macs_ble = 0;
|
||||
#endif
|
||||
}
|
@ -409,9 +409,7 @@ void setup() {
|
||||
#endif
|
||||
|
||||
// cyclic function interrupts
|
||||
#if (WIFICOUNTER) || (BLECOUNTER)
|
||||
sendcycler.attach(SENDCYCLE * 2, sendcycle);
|
||||
#endif
|
||||
housekeeper.attach(HOMECYCLE, housekeeping);
|
||||
|
||||
// button interrupt
|
||||
|
@ -3,7 +3,9 @@
|
||||
|
||||
Ticker sendcycler;
|
||||
|
||||
void sendcycle() { xTaskNotifyFromISR(irqHandlerTask, SENDCYCLE_IRQ, eSetBits, NULL); }
|
||||
void sendcycle() {
|
||||
xTaskNotifyFromISR(irqHandlerTask, SENDCYCLE_IRQ, eSetBits, NULL);
|
||||
}
|
||||
|
||||
// put data to send in RTos Queues used for transmit over channels Lora and SPI
|
||||
void SendPayload(uint8_t port, sendprio_t prio) {
|
||||
@ -57,6 +59,7 @@ void sendCounter() {
|
||||
while (bitmask) {
|
||||
switch (bitmask & mask) {
|
||||
|
||||
#if ((WIFICOUNTER) || (BLECOUNTER))
|
||||
case COUNT_DATA:
|
||||
payload.reset();
|
||||
payload.addCount(macs_wifi, MAC_SNIFF_WIFI);
|
||||
@ -70,6 +73,7 @@ void sendCounter() {
|
||||
ESP_LOGI(TAG, "Counter cleared");
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if (HAS_BME)
|
||||
case MEMS_DATA:
|
||||
|
Loading…
Reference in New Issue
Block a user