Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Distance Sensor Proof of Concept #56

Merged
merged 3 commits into from
Dec 6, 2023
Merged

Conversation

sadie-datoo
Copy link
Contributor

Distance Sensor Proof of Concept for Intake :)

Copy link
Contributor

@RZW-13 RZW-13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far!
Let's rewrite/add another file to use the hardware class, just to make sure it was implemented correctly. Awesome job for the most part though :)


@Autonomous(name="Distance Sensor Test")
public class DistanceSensorTest extends OpMode {
DistanceSensor distanceSensor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break between variable initialization and your methods

DistanceSensor distanceSensor;
@Override
public void init() {
telemetry.addData("Initializing Distance Sensor.", null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The telemetry.addData method will appear in the format
Initializing Distance Sensor.: null

I think what you're looking for is the telemetry.addLine method, but if you want to use the telemetry.addData method you could do smt like

 telemetry.addData("Distance Sensor", "Initializing");
 telemetry.addData("Distance Sensor", "Initialized"); 

which I think we've done a couple times as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're using the telemetry.addData though, get rid of the period


@Override
public void loop() {
distanceSensor = hardwareMap.get(DistanceSensor.class, "distanceSensor");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's write a version of this that uses the hardwareElement class, just to make sure that you implemented it correctly there

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be the same file, can be a different file, up to you

@@ -0,0 +1,24 @@
package org.firstinspires.ftc.teamcode.auton;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the 16748-CSRC/16748-CSRC repository to fix the javadoc check error

}

DistanceSensor deviceDistanceSensor = (DistanceSensor) hardwareElement.device;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary line break

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implement in the setDefaultInitializers() method
line 56

@sadie-datoo sadie-datoo requested a review from RZW-13 December 6, 2023 21:22
Copy link
Contributor

@RZW-13 RZW-13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@sadie-datoo sadie-datoo merged commit a1471ba into master Dec 6, 2023
@sadie-datoo sadie-datoo deleted the sadie-distancesensor-test branch December 6, 2023 23:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants