runs but does not give correct numbers. MSB = 4 and LSB -46 are what I get.
pretrigger_value is defined as INT16.
MSB and LSB are INT8.
It's all in your interpretation. You like to use signed decimal printouts,
but you're really dealing with the hexadecimal world. If you stay in hex,
most of your problems will go bye-bye.
1234 is 0x4D2 (using Windows 7 Prof. calculator in Programmer mode).
So 0x0D2 is the lsb. So select Hex and Byte (two different radio buttons
in Windows 7 calculator). Then type in D2. Then select Decimal and it now displays: -46
So -46 is correct.
beaker404
Joined: 24 Jul 2012 Posts: 163
Posted: Mon Apr 29, 2019 9:12 pm
Thanks, I knew I was just missing the obvious. I should not code during hay fever season.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum