Go to Post ...Of course, all the scales in the world won't help you if your robot is 135lb two nights before the ship date... - J Flex 188 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-08-2016, 14:04
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 666
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: FTC NullPointerException

Please try this instead. I think the initialization of rd is too early. Moving it to the init() method should work. BTW, this is primarily an FRC forum, you may get better response from the FTC forums http://ftcforum.usfirst.org/forumdis...Android-Studio
Code:
public class Brain extends OpMode {
    private int statusDriveInteger = 76;
    private RobotDrive rd;

    public void init () {
        rd = new RobotDrive(hardwareMap);
        statusDriveInteger = rd.statusRobotDrive();

        telemetry.addData("here ",statusDriveInteger);
    }

    public void loop (){
        telemetry.addData("here pre",statusDriveInteger);
        rd.setPowerLeftRearDrive(1.0);
        telemetry.addData("here post",statusDriveInteger);

    }

}
__________________
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi