summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/host/layer23/src/ui/ui.c11
-rw-r--r--src/target/firmware/layer1/l23_api.c9
2 files changed, 16 insertions, 4 deletions
diff --git a/src/host/layer23/src/ui/ui.c b/src/host/layer23/src/ui/ui.c
index 3e025805..fbed986c 100644
--- a/src/host/layer23/src/ui/ui.c
+++ b/src/host/layer23/src/ui/ui.c
@@ -106,8 +106,7 @@ int ui_flush(struct ui_inst *ui)
// HACK
struct gsm_ui *gui = container_of(ui, struct gsm_ui, ui);
struct osmocom_ms *ms = container_of(gui, struct osmocom_ms, gui);
- l1ctl_tx_display_req(ms, 0, 8 + i * 8, 0, 0, 0, i == 0, i == UI_ROWS - 1, ui->buffer + (UI_COLS + 1) * i);
- printf("%s\n", ui->buffer + (UI_COLS + 1) * i);
+ l1ctl_tx_display_req(ms, 1, 8 + i * 8, 0, 1, 0, i == 0, i == UI_ROWS - 1 && !ui->cursor_on, ui->buffer + (UI_COLS + 1) * i);
}
ui_telnet_puts(ui, line);
}
@@ -123,6 +122,14 @@ int ui_flush(struct ui_inst *ui)
if (ui->cursor_on) {
sprintf(cursor, "\033[%d;%dH", ui->cursor_y + 2,
ui->cursor_x + 2);
+ {
+ char c[] = "x";
+ // HACK
+ struct gsm_ui *gui = container_of(ui, struct gsm_ui, ui);
+ struct osmocom_ms *ms = container_of(gui, struct osmocom_ms, gui);
+ c[0] = ui->buffer[(UI_COLS + 1) * ui->cursor_y + ui->cursor_x];
+ l1ctl_tx_display_req(ms, 1 + 8 * ui->cursor_x, 8 + 8 * ui->cursor_y, 1, 0, 0, 0, 1, c);
+ }
ui_telnet_puts(ui, cursor);
}
diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c
index 40d0e584..17026212 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -676,8 +676,13 @@ static void l1ctl_display_req(struct msgb *msg)
printf("DISPLAY (%d) %s\n", dr->y, dr->text);
if (dr->clear)
fb_clear();
- fb_setfg(FB_COLOR_GREEN);
- fb_setbg(FB_COLOR_WHITE);
+ if (dr->fg) {
+ fb_setfg(FB_COLOR_WHITE);
+ fb_setbg(FB_COLOR_BLUE);
+ } else {
+ fb_setfg(FB_COLOR_GREEN);
+ fb_setbg(FB_COLOR_WHITE);
+ }
fb_setfont(FB_FONT_C64);
fb_gotoxy(dr->x, dr->y);
fb_putstr(dr->text, 100);