NullPointer in CompassNavigator

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

NullPointer in CompassNavigator

Postby vladra » Sat Jan 26, 2008 9:35 am

This fragment throws NullPointerException:
Code: Select all
CompassNavigator navigator = new CompassNavigator(new CompassPilot(SensorPort.S2, 5.6f, 10.7f, Motor.C, Motor.B));
navigator.rotateTo(180);

Exception occurs in rotateTo.

But the following fragment work fine:
Code: Select all
CompassNavigator navigator = new CompassNavigator(SensorPort.S2, 5.6f, 10.7f, Motor.C, Motor.B)
navigator.rotateTo(180);
vladra
New User
 
Posts: 24
Joined: Fri Nov 16, 2007 6:18 pm
Location: Russia

Postby bbagnall » Fri Feb 01, 2008 3:54 am

Thanks for spotting that Vladra. I've made a change to the source code that should fix that.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

cron
more stuff