ftctechnh / ftc_app

FTC Android Studio project to create FTC Robot Controller app.
761 stars 3.16k forks source link

Two sensors returning identical values with 3.1 #345

Open slylockfox opened 7 years ago

slylockfox commented 7 years ago

We have an opmode that reads two IR sensors. One IR sensor has its address changed to 0x42. The opmode worked fine, until we upgraded from 2.x to 3.1. Now both sensors report exactly the same value, now matter where the beacon is. It appears that this line is no longer working: irSeekerV.setI2cAddress(I2cAddr.create8bit(0x42));

The opmode is here: https://github.com/slylockfox/ftc_app/blob/master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/UselessTestMRIrSeeker.java

JacobAMason commented 7 years ago

This could be a duplicate of #325. It might be worth checking to see if the solution there works for you.

slylockfox commented 7 years ago

It's not a duplicate of #325, as we have this working with release 2.4. In fact I downloaded a fresh copy of 2.4 and added the opmode in, installed DS and RC on the same phones, and the opmode works as expected, showing different values from each sensor.

slylockfox commented 7 years ago

@JacobAMason Turns out my issue did overlap with #325 , apologies. The fix for #325 fixed my issue too, as did the more thorough fix in #360