Skip to content

Commit

Permalink
Update Buzz.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
connornishijima committed Aug 23, 2016
1 parent d0b96d1 commit b11e9de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Buzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ ISR(TIMER1_COMPA_vect) {
b_record[i] = b_record[i + 1];
}
b_record[63] = b_motionLevel;
b_buzzRead = b_motionLevel - b_record[0];
b_buzzRead = (b_motionLevel - b_record[0])*-1; // inverted so that movement towards antenna
// is a positive shift in the log

// If buzzRead is >= buzzThreshold, we're past the buzzWait, and
//we haven't had another alarm too recently, set the alarm flag to true.
Expand Down

0 comments on commit b11e9de

Please sign in to comment.