Skip to content

Commit 1da45a3

Browse files
authored
Merge pull request #941 from FIRST-Tech-Challenge/20240215-115542-release-candidate
FtcRobotController v9.1
2 parents f326c0d + c303962 commit 1da45a3

File tree

6 files changed

+130
-11
lines changed

6 files changed

+130
-11
lines changed

FtcRobotController/src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
4-
android:versionCode="52"
5-
android:versionName="9.0.1">
4+
android:versionCode="53"
5+
android:versionName="9.1">
66

77
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
88

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptAprilTag.java

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
package org.firstinspires.ftc.robotcontroller.external.samples;
3131

32+
import android.util.Size;
3233
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
3334
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
3435
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetection.java

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
package org.firstinspires.ftc.robotcontroller.external.samples;
3131

32+
import android.util.Size;
3233
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
3334
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
3435
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/* Copyright (c) 2024 FIRST. All rights reserved.
2+
*
3+
* Redistribution and use in source and binary forms, with or without modification,
4+
* are permitted (subject to the limitations in the disclaimer below) provided that
5+
* the following conditions are met:
6+
*
7+
* Redistributions of source code must retain the above copyright notice, this list
8+
* of conditions and the following disclaimer.
9+
*
10+
* Redistributions in binary form must reproduce the above copyright notice, this
11+
* list of conditions and the following disclaimer in the documentation and/or
12+
* other materials provided with the distribution.
13+
*
14+
* Neither the name of FIRST nor the names of its contributors may be used to endorse or
15+
* promote products derived from this software without specific prior written permission.
16+
*
17+
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS
18+
* LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
*/
29+
30+
package org.firstinspires.ftc.robotcontroller.external.samples;
31+
32+
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
33+
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
34+
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
35+
import com.qualcomm.robotcore.hardware.DigitalChannel;
36+
37+
/*
38+
* This OpMode demonstrates how to use a digital channel.
39+
*
40+
* The OpMode assumes that the digital channel is configured with a name of "digitalTouch".
41+
*
42+
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
43+
* Remove or comment out the @Disabled line to add this OpMode to the Driver Station OpMode list.
44+
*/
45+
@TeleOp(name = "Sensor: digital channel", group = "Sensor")
46+
@Disabled
47+
public class SensorDigitalTouch extends LinearOpMode {
48+
DigitalChannel digitalTouch; // Digital channel Object
49+
50+
@Override
51+
public void runOpMode() {
52+
53+
// get a reference to our touchSensor object.
54+
digitalTouch = hardwareMap.get(DigitalChannel.class, "digitalTouch");
55+
56+
digitalTouch.setMode(DigitalChannel.Mode.INPUT);
57+
telemetry.addData("DigitalTouchSensorExample", "Press start to continue...");
58+
telemetry.update();
59+
60+
// wait for the start button to be pressed.
61+
waitForStart();
62+
63+
// while the OpMode is active, loop and read the digital channel.
64+
// Note we use opModeIsActive() as our loop condition because it is an interruptible method.
65+
while (opModeIsActive()) {
66+
67+
// button is pressed if value returned is LOW or false.
68+
// send the info back to driver station using telemetry function.
69+
if (digitalTouch.getState() == false) {
70+
telemetry.addData("Button", "PRESSED");
71+
} else {
72+
telemetry.addData("Button", "NOT PRESSED");
73+
}
74+
75+
telemetry.update();
76+
}
77+
}
78+
}

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,45 @@ The readme.md file located in the [/TeamCode/src/main/java/org/firstinspires/ftc
5959

6060
# Release Information
6161

62+
## Version 9.1 (20240215-115542)
63+
64+
### Enhancements
65+
* Fixes a problem with Blocks: if the user closes a Block's warning balloon, it will still be closed next time the project is opened in the Blocks editor.
66+
* In the Blocks editor, an alert concerning missing hardware devices is not shown if all the Blocks that use the missing hardware devices are disabled.
67+
* Adds Blocks to support comparing property values CRServo.Direction, DCMotor.Direction, DCMotor.Mode, DCMotor.ZeroPowerBehavior, DigitalChannel.Mode, GyroSensor.HeadingMode, IrSeekerSensor.Mode, and Servo.Direction, to the corresponding enum Block.
68+
* Improves OnBotJava auto-import to correctly import classes when used in certain situations.
69+
* Improves OnBotJava autocomplete to provide better completion options in most cases.
70+
* This fixes an issue where autocomplete would fail if a method with two or more formal parameters was defined.
71+
* In OnBotJava, code folding support was added to expand and collapse code sections
72+
* In OnBotJava, the copyright header is now automatically collapsed loading new files
73+
* For all Blocks OpMode samples, intro comments have been moved to the RunOpMode comment balloon.
74+
* The Clean up Blocks command in the Blocks editor now positions function Blocks so their comment balloons don't overlap other function Blocks.
75+
* Added Blocks OpMode sample SensorTouch.
76+
* Added Java OpMode sample SensorDigitalTouch.
77+
* Several improvements to VisionPortal
78+
* Adds option to control whether the stream is automatically started following a `.build()` call on a VisionPortal Builder
79+
* Adds option to control whether the vision processing statistics overlay is rendered or not
80+
* VisionPortals now implement the `CameraStreamSource` interface, allowing multiportal users to select which portal is routed to the DS in INIT by calling CameraStreamServer.getInstance().setSource(visionPortal). Can be selected via gamepad, between Camera Stream sessions.
81+
* Add option to `AprilTagProcessor` to suppress calibration warnings
82+
* Improves camera calibration warnings
83+
* If a calibration is scaled, the resolution it was scaled from will be listed
84+
* If calibrations exist with the wrong aspect ratio, the calibrated resolutions will be listed
85+
* Fixes race condition which caused app crash when calling `stopStreaming()` immediately followed by `close()` on a VisionPortal
86+
* Fixes IllegalStateException when calling `stopStreaming()` immediately after building a VisionPortal
87+
* Added FTC Blocks counterparts to new Java methods:
88+
* VisionPortal.Builder.setAutoStartStreamOnBuild
89+
* VisionPortal.Builder.setShowStatsOverlay
90+
* AprilTagProcessor.Builder.setSuppressCalibrationWarnings
91+
* CameraStreamServer.setSource​
92+
93+
### Bug Fixes
94+
* Fixes a problem where OnBotJava does not apply font size settings to the editor.
95+
* Updates EasyOpenCV dependency to v1.7.1
96+
* Fixes inability to use EasyOpenCV CameraFactory in OnBotJava
97+
* Fixes entire RC app crash when user pipeline throws an exception
98+
* Fixes entire RC app crash when user user canvas annotator throws an exception
99+
* Use the modern stacktrace display when handling user exceptions instead of the legacy ESTOP telemetry message
100+
62101
## Version 9.0.1 (20230929-083754)
63102

64103
### Enhancements

build.dependencies.gradle

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ repositories {
44
}
55

66
dependencies {
7-
implementation 'org.firstinspires.ftc:Inspection:9.0.1'
8-
implementation 'org.firstinspires.ftc:Blocks:9.0.1'
9-
implementation 'org.firstinspires.ftc:Tfod:9.0.1'
10-
implementation 'org.firstinspires.ftc:RobotCore:9.0.1'
11-
implementation 'org.firstinspires.ftc:RobotServer:9.0.1'
12-
implementation 'org.firstinspires.ftc:OnBotJava:9.0.1'
13-
implementation 'org.firstinspires.ftc:Hardware:9.0.1'
14-
implementation 'org.firstinspires.ftc:FtcCommon:9.0.1'
15-
implementation 'org.firstinspires.ftc:Vision:9.0.1'
7+
implementation 'org.firstinspires.ftc:Inspection:9.1.0'
8+
implementation 'org.firstinspires.ftc:Blocks:9.1.0'
9+
implementation 'org.firstinspires.ftc:Tfod:9.1.0'
10+
implementation 'org.firstinspires.ftc:RobotCore:9.1.0'
11+
implementation 'org.firstinspires.ftc:RobotServer:9.1.0'
12+
implementation 'org.firstinspires.ftc:OnBotJava:9.1.0'
13+
implementation 'org.firstinspires.ftc:Hardware:9.1.0'
14+
implementation 'org.firstinspires.ftc:FtcCommon:9.1.0'
15+
implementation 'org.firstinspires.ftc:Vision:9.1.0'
1616
implementation 'org.firstinspires.ftc:gameAssets-CenterStage:1.0.0'
1717
implementation 'org.tensorflow:tensorflow-lite-task-vision:0.4.3'
1818
runtimeOnly 'org.tensorflow:tensorflow-lite:2.12.0'

0 commit comments

Comments
 (0)