From:
"address@hidden" <address@hidden>
To: address@hidden
Sent: Wed, 28 October, 2009 8:44:36 PM
Subject: Re: [Paparazzi-devel] Tracking antenna
On Tue, 27 Oct 2009 16:41:23 -0700 (PDT), Todd Sandercock
> The big issue with the java api was trying to send the "0x00". you think
> its sent it properly but nothing worked with the servo controller. so i
> plugged 2 ftdi cables into each other and worked out that every time that
i
> sent a "0x00" it turned everything after it to garbage. If you have a fix
> that would be great!
You DO know that 0x00 is a signed integer?
Byte.MIN_VALUE in Java is -128 . That would be your unsigned 0x00 .
> The other thing with java is that there is no such unsigned
variables. so
> when you are trying to send anything higher than 127 you have to use an
> int. DUMB!
Actually you do something like send((byte)((value + Byte.MIN_VALUE) &
0xFF))
Marcus
_______________________________________________
Paparazzi-devel mailing list
address@hiddenhttp://lists.nongnu.org/mailman/listinfo/paparazzi-devel