1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-06-29 10:35:24 +02:00

Sniffer timeout 100msec

This commit is contained in:
Harald Barth 2025-04-17 23:31:12 +02:00
parent 8fcc2b0083
commit 08b8e43cd0

View File

@ -103,9 +103,10 @@ Sniffer::Sniffer(byte snifferpin) {
ESP_ERROR_CHECK(mcpwm_capture_enable_channel(MCPWM_UNIT_0, MCPWM_SELECT_CAP0, &MCPWM_cap_config));
}
#define SNIFFER_TIMEOUT 100L // 100 Milliseconds
bool Sniffer::inputActive(){
unsigned long now = millis();
return ((now - lastendofpacket) < 1000);
return ((now - lastendofpacket) < SNIFFER_TIMEOUT);
}
#define DCC_TOO_SHORT 4000L // 4000 ticks are 50usec