From: Ian Jackson Date: Sat, 19 Feb 2011 12:15:03 +0000 (+0000) Subject: safety: movpos: better debug output for "actual" (no longer show unkmap bitmask in... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=e15b611b1bb54f97ef84663dfe077d844a84784b;p=trains.git safety: movpos: better debug output for "actual" (no longer show unkmap bitmask in hex) --- diff --git a/hostside/movpos.c b/hostside/movpos.c index a31e507..4222103 100644 --- a/hostside/movpos.c +++ b/hostside/movpos.c @@ -829,8 +829,17 @@ static ErrorCode indep_prepare(Segment *move, MovPosComb target, startpointpos= 0; startpointunk= unkallfeatbits(move->i->n_movfeats); } - DPRINTF2(" actual <-%s&%"PRunkx, movpos_pname(move,startpointpos), - startpointunk); + if (DP) { + DPRINTF2(" actual <-%s/", move->i->pname); + for (feat=0; featn_movfeats; feat++) { + const MovFeatInfo *feati= &movei->movfeats[feat]; + if (startpointunk & unkfeatbit(feat)) + DPRINTF2("%s?", feati->pname); + else + DPRINTF2("%s%d", feati->pname, + startpointpos / feati->weight % feati->posns); + } + } } n_meths= 0;