Skip to content

Commit

Permalink
Counter adjs
Browse files Browse the repository at this point in the history
  • Loading branch information
steadramon committed Dec 21, 2023
1 parent b543f8c commit 7b2e86a
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions ESPGeiger/src/Counter/Counter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void Counter::begin() {
#ifdef GEIGER_TEST_FAST
timer1_write(600);
#else
timer1_write(5000000);
timer1_write(8000000);
#endif
#else
#ifdef GEIGER_TEST_FAST
Expand Down Expand Up @@ -194,19 +194,27 @@ void Counter::handleSerial(char* input)
#endif
}

void Counter::loop() {
#ifndef DISABLE_BLIP
if (status.last_blip != _last_blip) {
status.last_blip = _last_blip;
#ifdef ESPGEIGER_HW
void Counter::blip_led() {
#ifndef DISABLE_INTERNAL_BLIP
status.led.Blink(20,20);
#endif
#ifdef GEIGER_BLIPLED
if (status.blip_led.IsRunning() == false) {
status.blip_led.Blink(2,1).Repeat(1);
}
#else
status.led.Blink(20,20);
#endif
}
#ifdef GEIGER_NEOPIXEL
neopixel.blip();
#endif
}

void Counter::loop() {
if (status.last_blip != _last_blip) {
status.last_blip = _last_blip;
#ifndef DISABLE_BLIP
this->blip_led();
#endif
}
#if GEIGER_TYPE == GEIGER_TYPE_TESTSERIAL
unsigned long int secidx = (millis() / 1000);
if (secidx != _last_secidx) {
Expand All @@ -223,6 +231,7 @@ void Counter::loop() {
if (geigerPort.overflow()) {
Log::console(PSTR("Counter: Serial Overflow %d"), geigerPort.available());
}
optimistic_yield(100 * 1000);
char input = geigerPort.read();
_serial_buffer[_serial_idx++] = input;
if (input == '\n') {
Expand Down

0 comments on commit 7b2e86a

Please sign in to comment.