Skip to content

Commit

Permalink
Remove 'INFO:' from logging and reduce lock status logging to 6 chars…
Browse files Browse the repository at this point in the history
…+CR/LF so it will fit in the 8 char mini uart transmit FIFO
  • Loading branch information
IanSB committed Mar 10, 2020
1 parent 717498b commit 28e0f5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ void log_debug(const char *fmt, ...) {
}
#endif

void log_info(const char *fmt, ...) {
void log_info(const char *fmt, ...) { //can print up to 6 chars very fast (8 char tx fifo buffer minus CR/LF) - assumes buffer is already empty
va_list ap;
printf("INFO: ");
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
Expand Down
7 changes: 5 additions & 2 deletions src/rgb_to_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,12 +1028,15 @@ int recalculate_hdmi_clock_line_locked_update(int force) {
target_difference = 2;
}
if (abs(difference) > thresholds[locked_threshold]) {
log_info("Lock lost probably due to mode change - resetting ReSync counter");
log_info("UnLock");
resync_count = 0;
target_difference = 0;
lock_fail = 1;
} else {
log_info("ReSync: %d", ++resync_count);
log_info("Sync%02d", ++resync_count);
if (resync_count >= 99) {
resync_count = 0;
}
}
}
if(framecount == 0) {
Expand Down

0 comments on commit 28e0f5f

Please sign in to comment.