FreeCalypso > hg > freecalypso-sw
changeset 856:d527ac304ad5
rvinterf & rvtdump: handle low level debug messages from FC firmwares
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 30 Apr 2015 07:40:30 +0000 |
parents | cbd91f807141 |
children | 2768b4339275 |
files | rvinterf/lowlevel/format.c rvinterf/lowlevel/rvifmain.c rvinterf/lowlevel/rvtdump.c |
diffstat | 3 files changed, 35 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rvinterf/lowlevel/format.c Thu Apr 30 02:57:45 2015 +0000 +++ b/rvinterf/lowlevel/format.c Thu Apr 30 07:40:30 2015 +0000 @@ -121,6 +121,35 @@ } void +print_fc_lld_msg() +{ + int i, c; + char *dp; + + dp = fmtbuf; + strcpy(dp, "LLD: "); + dp += 5; + for (i = 1; i < rxpkt_len; i++) { + c = rxpkt[i]; + if (c & 0x80) { + *dp++ = 'M'; + *dp++ = '-'; + c &= 0x7F; + } + if (c < 0x20) { + *dp++ = '^'; + *dp++ = c + '@'; + } else if (c == 0x7F) { + *dp++ = '^'; + *dp++ = '?'; + } else + *dp++ = c; + } + *dp = '\0'; + output_line(fmtbuf); +} + +void print_unknown_packet() { int i;