fix: pad status labels and replace em dashes
Add trailing spaces to shorter status labels so they don't leave residue when overwritten by longer ones. Replace em dashes with regular dashes per project style.
This commit is contained in:
+8
-8
@@ -57,7 +57,7 @@ static void sleep_ms(int ms) {
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------- */
|
||||
/* ANSI helpers — all go to stdout so dashboard owns it */
|
||||
/* ANSI helpers - all go to stdout so dashboard owns it */
|
||||
/* --------------------------------------------------------------------------- */
|
||||
|
||||
static void ansi_reset(void) { printf("\033[0m"); }
|
||||
@@ -98,9 +98,9 @@ static status_t compute_status(double now, double link_t, double fc_t) {
|
||||
|
||||
static void print_status_label(status_t s) {
|
||||
switch (s) {
|
||||
case STATUS_LIVE: ansi_green(); printf("LIVE"); break;
|
||||
case STATUS_STALE: ansi_yellow(); printf("STALE"); break;
|
||||
case STATUS_NO_LINK: ansi_red(); printf("NO LINK"); break;
|
||||
case STATUS_LIVE: ansi_green(); printf("LIVE "); break;
|
||||
case STATUS_STALE: ansi_yellow(); printf("STALE "); break;
|
||||
case STATUS_NO_LINK: ansi_red(); printf("NO LINK "); break;
|
||||
case STATUS_NO_SIGNAL: ansi_red(); printf("NO SIGNAL"); break;
|
||||
}
|
||||
ansi_reset();
|
||||
@@ -228,7 +228,7 @@ static void rssi_color(double dbm) {
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------- */
|
||||
/* Dashboard render — tracks line count for in-place redraw */
|
||||
/* Dashboard render - tracks line count for in-place redraw */
|
||||
/* --------------------------------------------------------------------------- */
|
||||
|
||||
static void render_dashboard(dashboard_t const* d,
|
||||
@@ -362,7 +362,7 @@ static int list_ports(void) {
|
||||
/* Send a ping and wait for DEVICE_INFO to verify the module responds. */
|
||||
static int verify_connection(cel_serial_port* port) {
|
||||
if (cel_crsf_param_ping(port, 2.0f) != 0) {
|
||||
cel_log_warn("No DEVICE_INFO response — module may not be connected");
|
||||
cel_log_warn("No DEVICE_INFO response - module may not be connected");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -418,7 +418,7 @@ int main(int argc, char const* argv[]) {
|
||||
|
||||
/* Verify module responds to CRSF ping */
|
||||
if (verify_connection(port) != 0) {
|
||||
cel_log_warn("Continuing anyway — telemetry may not arrive");
|
||||
cel_log_warn("Continuing anyway - telemetry may not arrive");
|
||||
}
|
||||
|
||||
/* Create CRSF stream for incremental parsing */
|
||||
@@ -436,7 +436,7 @@ int main(int argc, char const* argv[]) {
|
||||
size_t rc_len = cel_crsf_build_rc_frame(rc_buf, channels);
|
||||
cel_serial_write(port, rc_buf, rc_len);
|
||||
|
||||
/* Telemetry read loop — 20 ms = 50 Hz RC send rate */
|
||||
/* Telemetry read loop - 20 ms = 50 Hz RC send rate */
|
||||
dashboard_t dash;
|
||||
dashboard_init(&dash);
|
||||
uint8_t read_buf[256];
|
||||
|
||||
Reference in New Issue
Block a user