From: ian Date: Wed, 5 Jan 2005 18:19:31 +0000 (+0000) Subject: yes, remove the debugging printfs X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=faf389c3da3679c08db7c9c891c75f7b6d49814d;p=trains.git yes, remove the debugging printfs --- diff --git a/hostside/nmra.c b/hostside/nmra.c index dc9faa4..e6697da 100644 --- a/hostside/nmra.c +++ b/hostside/nmra.c @@ -1,7 +1,6 @@ /**/ #include -#include #include "hostside.h" @@ -17,11 +16,9 @@ void xmit_nmra_raw(const Byte *nmra_packet, int length) { working_qty= 15; /* are some data bits to encode, rest are clear. */ /* we start with the 14-bit preamble and the packet start bit */ for (;;) { -fprintf(stderr,"l=%d w=%08x q=%-2d",length,working,working_qty); assert(working_qty >= 0); if (working_qty < 7) { if (length > 0) { -fprintf(stderr," nmra=%02x",*nmra_packet); /* plonk new data bits just to right of old data bits */ length--; newbits= *nmra_packet++; @@ -29,22 +26,17 @@ fprintf(stderr," nmra=%02x",*nmra_packet); newbits |= !length; /* 9 bits, bottom one is `end of packet' */ working |= (newbits << (7-working_qty)); working_qty += 9; -fprintf(stderr," nmra\n"); -continue; } else if (!working_qty) { /* all done */ -fprintf(stderr," alldone\n"); break; } else { /* pad with exactly enough 1 bits to make up the encoded byte */ working |= 0xffU << (8-working_qty); working_qty= 7; -fprintf(stderr," pad\n"); } } assert(encp < encoded + COMMAND_ENCODED_MAX); *encp++= (working >> 9) & 0x7f; /* top 7 bits, right-justified */ -fprintf(stderr," enc=%02x\n", encp[-1]); working <<= 7; working_qty -= 7; }