Skip to content

Commit

Permalink
Handle counter for ESP32
Browse files Browse the repository at this point in the history
  • Loading branch information
steadramon committed Apr 30, 2023
1 parent 5fa66ea commit f019d49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ESPGeiger/src/Counter/Counter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,16 @@ void Counter::handleSerial(char* input)
if (n == 1) {
#endif
Log::debug(PSTR("Counter loop - %d"), _scpm);
#ifdef ESP32
portENTER_CRITICAL(&timerMux);
#endif
#if GEIGER_SERIAL_TYPE == GEIGER_SERIAL_CPM
eventCounter = (float)_scpm/(float)60;
#else
eventCounter = (float)_scpm;
#endif
#ifdef ESP32
portEXIT_CRITICAL(&timerMux);
#endif
}
}
Expand Down

0 comments on commit f019d49

Please sign in to comment.