View Single Post
  #4   Spotlight this post!  
Unread 07-31-2016, 06:39 PM
bdaroz's Avatar
bdaroz bdaroz is offline
Programming Mentor
AKA: Brian Rozmierski
FRC #5881 (TVHS Dragons)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Albany, NY
Posts: 372
bdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud of
Re: FTC NullPointerException

Large disclaimer - I know *nothing* about FTC APIs but, according to this JavaDoc: http://ftckey.com/apis/ftc/com/qualc...rdwareMap.html

You should be able to initialize an empty Hardware Map like this:

Code:
private HardwareMap rd_hardwareMap = new HardwareMap();
What I *don't* know is if the hardware map is supposed to be created a different way to be pre-populated or something.

I found this GitHub repo that looks promising (https://github.com/ftctechnh/ftc_app), however the example code never creates the HardwareMap class variable. It looks inherited from OpMode....

Sorry I can't help more.....
Reply With Quote