FIRST-Tech-Challenge / FIRST-Tech-Challenge/FtcRobotController

Battery voltage isn't sent to the Driver Station when telemetry is blank

Open Beginner friendly
#2,078 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.3k
Forks
9.9k
Avg merge
18m
Merged PRs (30d)
1

Description

If there are no data or lines present in telemetry then the robot's battery voltage is never sent to the Driver Station. Adding anything to telemetry fixes the issue. The issue stems from [line 750 of TelemetryImpl.java](https://github.com/OpenFTC/Extracted-RC/blob/11.0/RobotCore/src/main/java/org/firstinspires/ftc/robotcore/internal/opmode/TelemetryImpl.java#L750) where the telemetry is only updated if there are some data or lines present to send. A minimal example is provided below that demonstrates the issue.
```java
import com.qualcomm.robotcore.eventloop.opmode.*;

public class BatteryTelemetryTest {
@TeleOp
public static class BatteryVoltageWorks extends OpMode {
@Override
public void init() {}

@Override
public void loop() {
telemetry.addLine("Telemetry to make battery voltage send");
}
}

@TeleOp
public static class BatteryVoltageBroken extends OpMode {
@Override
public void init() {}

@Override
public void loop() {}
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start in RobotCore/src/main/java/org/firstinspires/ftc/robotcore/internal/opmode/TelemetryImpl.java at line 750, then run the minimal BatteryVoltageBroken and BatteryVoltageWorks examples from the issue. Done means the Driver Station receives battery voltage when telemetry has no data or lines, while the existing behavior with telemetry content still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
robotics
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.