Skip to content

Commit

Permalink
method to inti chrono readings now initDisplayChronoReadings
Browse files Browse the repository at this point in the history
  • Loading branch information
mochoy committed Jun 17, 2017
1 parent d734a12 commit 991c309
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions SmartBlaster/SmartBlaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void SmartBlaster::initDisplayAmmo (void) {
displayValues();
}

void SmartBlaster::initDisplayChrono (double fps) {
void SmartBlaster::initDisplayChronoReadings (double fps) {
if (fps == -1) {
_chronoToPrint = ("ERR");
} else if (fps == -2) {
Expand Down Expand Up @@ -189,14 +189,14 @@ void SmartBlaster::chrono(void) {
//when tripped and expecting second value
} else if ( (_tripTime != -10) && (_exitTime == -10) && (map(analogRead(_AMMO_COUNTING_INPUT_PIN), 0, 1023, 0, 100) < IR_MAP_TRIP_VAL) ) {
exitTime = micros();
initDisplayChronoValues(calculateChronoReadings(_tripTime, _exitTime));
initDisplayChronoReadings(calculateChronoReadings(_tripTime, _exitTime));

countAmmo();

//when no second value within 1 second
} else if ( (_tripTime != -10) && (_tripTime + 2000000) < micros() ) {
resetChronoVals();
initDisplayChronoValues(-1);
initDisplayChronoReadings(-1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion SmartBlaster/SmartBlaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class SmartBlaster {
//display stuff
void displayValues();
void initDisplayAmmo();
void initDisplayChrono(double);
void initDisplayChronoReadings(double);
void initDisplayFireMode();
void initDisplayVoltage(double);

Expand Down

0 comments on commit 991c309

Please sign in to comment.