Open ftc-team-astro-bruins opened 5 years ago
I hate to say this, but this issue will probably get resolved if you completely reset OnBotJava. Because it is returning everything as 0 in your example, some artifacts of the libraries being ultra-compressed seem to be leaking through.
Per @gearsincorg nice instructions:
One effective way to correct this problem is to let the new App completely reset the OnBotJava subsystem on the phone. There is an "Advanced" setting to permit this on the OnBotJava web interface.
Before making any changes though, I'd download any OnBotJava Opmodes you have on your RC to your computer as a backup. Simply right click on them (in the tree) and select download...
To reset the OBJ system, follow these directions:
Start up the RC app and use your browser to connect to your phone just like you would if you were doing OnBotJava programming.
Select OnBotJava, and click on the Settings (GEAR) icon.
Scroll down to, and expand the "Advanced Settings" option
Click on the RED "RESET" button.
!!!!! MAKE sure you have downloaded any OpModes you want to keep BEFORE doing this...!!!!!
You will be prompted if you really want to do this: Click OK
And you will be prompted AGAIN... and actually have to type "Yes I want to". Do it!
Now, if you return to the OnBotJava page, all the opmodes will be gone and you should be able to either re-create them, or restore your saved opmodes by using the Upload Files icon.
Also remember that if you are using Vuforia, you need to replace the dummy Vuforia key with your own key. See the code comments.
Below is a simple opmode and this works fine when deployed using Android Studio but prints all zero's when deployed using OnBotJava.
Below is the output with Android Studio 01-14 19:40:36.157 23589-24299/com.qualcomm.ftcrobotcontroller V/AstroBot: SettingPwRangeTo: pulseLower = 1000.00 us, pulseUpper = 1520.00 us, framesize 20000.00 us
Below is the output with OnBotJava 01-14 20:13:06.090 23589-25582/com.qualcomm.ftcrobotcontroller V/AstroBot: SettingPwRangeTo: pulseLower = 0.00 us, pulseUpper = 0.00 us, framesize 0.00 us
package org.firstinspires.ftc.teamcode;
import android.util.Log;
import com.qualcomm.robotcore.eventloop.opmode.Disabled; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; import com.qualcomm.robotcore.hardware.PwmControl; import com.qualcomm.robotcore.hardware.Servo; import com.qualcomm.robotcore.hardware.ServoControllerEx; import com.qualcomm.robotcore.util.RobotLog;
@TeleOp(name = "OnBot-Test: Servo Ex", group = "AstroBot-Test") //@Disabled public class Test_ServoEx extends LinearOpMode {
}