View Single Post
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#19
Originally Posted by BrentDC View Post
Matan, could you please change the output of retu-adc to decimal instead of hex?

I would do it myself, but, again, my C skills are lacking
Change this:
Code:
	for(i=s;i<e;i++) {
		printf("%d: %08x  ", i, ioctl(f,RETU_IOCH_ADC_READ, i));
		if((i&3)==3)printf("\n");
	}
to this:
Code:
	for(i=s;i<e;i++) {
		printf("%d: %010d  ", i, ioctl(f,RETU_IOCH_ADC_READ, i));
		if((i&3)==3)printf("\n");
	}
Changes from hex (x) to decimal (d), and also increases the field width from 8 to 10 characters.
 

The Following User Says Thank You to Benson For This Useful Post: