Skip to content

Commit

Permalink
Define test mode for test serial
Browse files Browse the repository at this point in the history
  • Loading branch information
steadramon committed Apr 19, 2023
1 parent e6a3248 commit 0c55279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ESPGeiger/src/Counter/Counter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ void Counter::begin() {
void Counter::handleSerial(char* input)
{
int _scpm;
#if GEIGER_SERIALTYPE == GEIGER_STYPE_MIGHTYOHM
#if GEIGER_SERIALTYPE == GEIGER_STYPE_MIGHTYOHM
int _scps;
int n = sscanf(input, "CPS, %d, CPM, %d", &_scps, &_scpm);
if (n == 2) {
#else
#else
int n = sscanf(input, "%d\n", &_scpm);
if (n == 1) {
#endif
#endif
Log::debug(PSTR("Counter loop - %d"), _scpm);
#if GEIGER_SERIAL_TYPE == GEIGER_SERIAL_CPM
eventCounter = (float)_scpm/(float)60;
Expand Down
1 change: 1 addition & 0 deletions ESPGeiger/src/Counter/Counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static EspSoftwareSerial::UART geigerPort;
static int _geiger_txpin = GEIGER_TXPIN;
#define GEIGERTESTMODE
#elif GEIGER_TYPE == GEIGER_TYPE_TESTSERIAL
#define GEIGERTESTMODE
#ifndef GEIGER_BAUDRATE
#define GEIGER_BAUDRATE 115200
#endif
Expand Down

0 comments on commit 0c55279

Please sign in to comment.