Skip to content

Commit

Permalink
Dont attempt to collect counter during testmode
Browse files Browse the repository at this point in the history
  • Loading branch information
steadramon authored and steadramon committed Apr 11, 2023
1 parent e9331c7 commit 710f5a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ESPGeiger/src/Counter/Counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ static void ICACHE_RAM_ATTR count() {

static void ICACHE_RAM_ATTR handleSecondTick() {
#ifdef USE_PCNT
#ifndef GEIGERTESTMODE
int16_t pulseCount;
pcnt_get_counter_value(PCNT_UNIT, &pulseCount);
pcnt_counter_clear(PCNT_UNIT);
eventCounter = pulseCount;
#endif
#endif
status.geigerTicks.add(eventCounter);
eventCounter = 0;
Expand Down
12 changes: 12 additions & 0 deletions environments.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ board_build.flash_mode = qio
board_build.filesystem = littlefs
upload_speed = 921600

[env:lolin_s2_pico]
platform = ${com.esp32_platform}
board = lolin_s2_pico
lib_deps =
${com-esp32.lib_deps}
build_flags =
${com-esp.build_flags}
-DESP32
board_build.flash_mode = qio
board_build.filesystem = littlefs
upload_speed = 921600

[env:esp8266_main]
platform = ${com.esp8266_platform}
board = nodemcuv2
Expand Down

0 comments on commit 710f5a3

Please sign in to comment.