summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
Diffstat (limited to 'monitor')
-rw-r--r--monitor/disp.c21
-rw-r--r--monitor/mon.c1
-rw-r--r--monitor/mon.h1
3 files changed, 17 insertions, 6 deletions
diff --git a/monitor/disp.c b/monitor/disp.c
index 992c712..84dd941 100644
--- a/monitor/disp.c
+++ b/monitor/disp.c
@@ -86,19 +86,18 @@ void disp_display(t_mon *mon) {
wprintw(wpstatus, "\nInputs:\n");
for (i = 0; i < mon->n_inputs; i++) {
- wprintw(wpstatus, " %d. %s%s\t%s (%d)\t%s\n",
+ wprintw(wpstatus, "%s %d. %s (%d)\t%s\n",
+ (i == mon->ticker_input ? "T" : (i == mon->ser_in_in ? ">" : " ")),
i,
- (i == mon->ticker_input ? "T" : ""),
- (i == mon->ser_in_in ? ">" : ""),
mon->inputs[i].name, mon->inputs[i].size, mon->inputs[i].value);
}
if (mon->n_inputs == 0) wprintw(wpstatus, "\t(none)\n");
wprintw(wpstatus, "\nOutputs:\n");
for (i = 0; i < mon->n_outputs; i++) {
- wprintw(wpstatus, " %d. %s%s\t%s\t%s\t%ld\n", i,
- (i == mon->ser_out ? "<" : ""),
- (i == mon->ser_in_busy_out ? "!" : ""),
+ wprintw(wpstatus, "%s %d. %s\t%s %ld\n",
+ (i == mon->ser_out ? "<" : (i == mon->ser_in_busy_out ? "!" : " ")),
+ i,
mon->outputs[i].name, mon->outputs[i].v_bin, mon->outputs[i].v_int);
}
if (mon->n_outputs == 0) wprintw(wpstatus, "\t(none)\n");
@@ -147,4 +146,14 @@ void disp_display(t_mon *mon) {
}
+void disp_display_ser(t_mon *mon) {
+ if (mon->ser_out_buf != 0) {
+ wprintw(wpoutput, "%c", mon->ser_out_buf);
+ wrefresh(wpoutput);
+ mon->ser_out_buf = 0;
+
+ wmove(wcmdline, 0, cmd_pos + 2);
+ wrefresh(wcmdline);
+ }
+}
diff --git a/monitor/mon.c b/monitor/mon.c
index 19055c7..baef98b 100644
--- a/monitor/mon.c
+++ b/monitor/mon.c
@@ -285,4 +285,5 @@ void mon_step(t_mon *mon) {
}
mon->step++;
+ disp_display_ser(mon);
}
diff --git a/monitor/mon.h b/monitor/mon.h
index 0040eda..32d60c4 100644
--- a/monitor/mon.h
+++ b/monitor/mon.h
@@ -61,6 +61,7 @@ typedef struct {
void disp_init();
void disp_display(t_mon *mon);
+void disp_display_ser(t_mon *mon);
void disp_finish();
void handle_kbd(t_mon *mon);