Skip to content

Commit

Permalink
Update bbn_m5atomS3_lite_JSN-SR04T.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored Dec 19, 2024
1 parent 38c91e0 commit e94e6f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bbn_m5atomS3_lite_JSN-SR04T/bbn_m5atomS3_lite_JSN-SR04T.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ void setup() {
void loop() {
delay(1000);
float distance_cm = (float)sonar.ping_median(5) * factor;
gen_nmea0183_xdr("$BBXDR,D,%.2f,M,Range_JSN_S04T", distance_cm / 100.0);
if (fabs(distance_cm) > 0.001) {
gen_nmea0183_xdr("$BBXDR,D,%.2f,M,Range_JSN_S04T", distance_cm / 100.0);
}
}

0 comments on commit e94e6f0

Please sign in to comment.