Changeset 12145 for fact/tools


Ignore:
Timestamp:
09/21/11 12:13:07 (13 years ago)
Author:
neise
Message:
arduino text output is scanned for '\0' which are excahnged by '0', otherwise output is truncated...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/hvMCUtest/HV.cc

    r12139 r12145  
    111111        // I put an '\0' at the end of the received bytes
    112112        rbuf[ret]='\0';
     113        // in case the sender has put an '\0' in the first ret bytes, the output with printf is
     114        // truncated ... so I go and exchange '\0' for '0'
     115        for ( int dom=0; dom<ret ; dom++){
     116                if (rbuf[dom]=='\0')
     117                        rbuf[dom]='0';
     118        }
    113119        printf("%s\n",rbuf);
    114120  }
Note: See TracChangeset for help on using the changeset viewer.