From d15215c56e77d8501ce98eb270e73e163f6e4172 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 20 Jan 2008 18:39:00 +0000 Subject: [PATCH] better message suppression --- hostside/realtime.c | 3 ++- hostside/startup.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hostside/realtime.c b/hostside/realtime.c index 9972240..4aad568 100644 --- a/hostside/realtime.c +++ b/hostside/realtime.c @@ -323,7 +323,7 @@ void serial_transmit(const PicInsn *pi) { oupicio("out",pii,objnum); } - if (!suppress) + if (!suppress && picio_send_noise >= 2) ouhex("picioh out", pi->d, pi->l); /* note that the serial port is still in nonblocking mode. if @@ -353,6 +353,7 @@ int main(int argc, const char **argv) { arg++; switch (*arg++) { case 's': device= arg; break; + case 'v': picio_send_noise= atoi(arg); break; default: badusage("unknown option"); } } diff --git a/hostside/startup.c b/hostside/startup.c index 458cb8e..955a443 100644 --- a/hostside/startup.c +++ b/hostside/startup.c @@ -147,7 +147,7 @@ void serial_moredata(PicInsn *buf) { buf->l= ep - buf->d + 1; picinsn_decode(buf, pic_reply_infos, &pii, &objnum); suppress= pii && pii->noiselevel > picio_send_noise; - if (!suppress) + if (!suppress && picio_send_noise >= 2) ouhex("picioh in msg", buf->d, buf->l); if (!pii) { oprintf(UPO, "picio in unknown\n"); return; } if (!suppress) -- 2.30.2