Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gamepad1 (or ExposureControl) in code won't compile in EOCV-Sim #108

Open
hexaflexa opened this issue Jan 21, 2024 · 3 comments
Open

gamepad1 (or ExposureControl) in code won't compile in EOCV-Sim #108

hexaflexa opened this issue Jan 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@hexaflexa
Copy link

Thanks for this nice program, it is very useful. I have a question about OpModes that contain gamepad1. When I place a java file containing gamepad1, it compiles in android studio, but EOCV-Sim (3.5.2) won't compile it.

The simplest way to reproduce is to add the following to runOpMode() in ConceptAprilTag.java:

if (gamepad1.x) {
    // do nothing
}

This compiles in Android Studio, but EOCV-Sim displays the error:

Build failed (took 0.18 seconds)

Using the JDK compiler

> robotcontroller\ConceptAprilTag.java
      (72:13): ERROR: cannot find symbol
        symbol:   variable gamepad1
        location: class org.firstinspires.ftc.teamcode.robotcontroller.ConceptAprilTag
      (72:12): ERROR: illegal parenthesized expression

Similar things happen if we try an opmode which references ExposureControl, for example, ConecptAprilTagOptimizeExposure (an official FTC sample) results in:

Build failed (took 0.12 seconds)

Using the JDK compiler

> robotcontroller\ConceptAprilTagOptimizeExposure.java
      (38:73): ERROR: cannot find symbol
        symbol:   class ExposureControl
        location: package org.firstinspires.ftc.robotcore.external.hardware.camera.controls
      (39:73): ERROR: cannot find symbol
        symbol:   class GainControl
        location: package org.firstinspires.ftc.robotcore.external.hardware.camera.controls
@hexaflexa hexaflexa added the bug Something isn't working label Jan 21, 2024
@serivesmejia
Copy link
Member

There's no current plan in implementing FTC Gamepad classes into EOCV-Sim - they're out of the scope of the software and I don't feel like there's an intuitive way to add them.

However, camera controls is another story, unfortunately the current webcam driver integrated into EOCV-Sim does not support fine grained camera control, it's really a fairly limited implementation. There's a plan of writing libuvc bindings for Java (the webcam driver that the FTC SDK uses), which should enable these features to work in the future, the implementation work is being done at deltacv/libuvc-java.

@qwertychouskie
Copy link
Contributor

There's no current plan in implementing FTC Gamepad classes into EOCV-Sim - they're out of the scope of the software and I don't feel like there's an intuitive way to add them.

It would be nice to at least stub it, so you don't get errors when running your pipeline that has optional gamepad stuff.

@serivesmejia
Copy link
Member

It would be nice to at least stub it, so you don't get errors when running your pipeline that has optional gamepad stuff.

Fixed in v3.7.1

ETA for ExposureControl support at most at the end of November.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants