spillerrec wrote: 1.8 km + 6 cm works fine with single precision float (considering the base as cm). Do you have a real example where you experienced that floats where too imprecise?
you're completely right - my mistake. but try this one:
Code: Select all
task main(){
float a= 180000000, b=6, c;
NumOut(0,56,a);
NumOut(0,48,b);
NumOut(0,40,c=a+b);
while(true);
}
Using long vs. int it works;
using float vs. double it doesn't.
but anyway - nxtOSEK got it, LeJos got it, there must be any sence in it.
@Xander:
aah, ok, thanks, I assumed there were already BT direct commands for motor control and sensor reading from 1 NXT to 1-3 slave nxts.
But that leads me back to Ford's old wish:
NXT-to-NXT BT commands like
BTonFwd(slaveNumber, portNumer, speed)
BTRotatemotorEx(slaveNumber, portNumber, .....)
BToff(slavenumber, portNumber)
BTcoast(slavenumber, portNumber)
BTsetSensor(slavenumber, portNumber, SensorType_or_I²Ctype)
BTsensorValue(slavenumber, portNumber, &sensorarray[])
and all that, as Ford wrote, "without any decyphering program running on any slave NXT"
and YES, I'd like to have all that for RS485, too:
RSonFwd(slaveNumber, portNumer, speed)
RSRotatemotorEx(slaveNumber, portNumber, .....)
RSoff(slavenumber, portNumber)
RScoast(slavenumber, portNumber)
RSsetSensor(slavenumber, portNumber, SensorType_or_I²Ctype)
RSsensorValue(slavenumber, portNumber, &sensorarray[])