Skip to content

Commit cfe1b7c

Browse files
committed
Its most likely better to use st->audio_packets when printing
32 should probably be a labeled as a constant in the cli
1 parent f1d3d0f commit cfe1b7c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static void callback(const nrsc5_event_t *evt, void *opaque)
354354
if (st->audio_packets >= 32) {
355355
log_info("Audio bit rate: %.1f kbps", (float)st->audio_bytes * 8 * NRSC5_SAMPLE_RATE_AUDIO / NRSC5_AUDIO_FRAME_SAMPLES / st->audio_packets / 1000);
356356
if (st->audio_errors > 0)
357-
log_warn("CRC mismatch: %d/32", st->audio_errors);
357+
log_warn("CRC mismatch: %d/%d", st->audio_errors, st->audio_packets);
358358
st->audio_packets = 0;
359359
st->audio_bytes = 0;
360360
st->audio_errors = 0;

support/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def callback(self, evt_type, evt):
237237
logging.info("Audio bit rate: %.1f kbps", self.audio_bytes * 8 * nrsc5.SAMPLE_RATE_AUDIO
238238
/ nrsc5.AUDIO_FRAME_SAMPLES / self.audio_packets / 1000)
239239
if self.audio_errors > 0:
240-
logging.warning("CRC mismatch: %d/32", self.audio_errors)
240+
logging.warning("CRC mismatch: %d/%d", self.audio_errors, self.audio_packets)
241241
self.audio_packets = 0
242242
self.audio_bytes = 0
243243
self.audio_errors = 0

0 commit comments

Comments
 (0)