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

Servo controller #85

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Servo controller #85

wants to merge 13 commits into from

Conversation

JYoung413
Copy link

Before Merging

  • PR to NU17-framework submitted which checks out that repository to your latest commit and fixes any breaking changes you have made
  • The checks listed in NU17-FRamework all pass

@@ -94,4 +94,12 @@ public static ControllerEvent setOutputVoltage(double min, double max) {
public static ControllerEvent resetPosition(double position) {
return new ResetPositionEvent(position);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Make a new class called ServoInstr

@@ -0,0 +1,26 @@
package com.nutrons.framework.controllers;
Copy link
Contributor

Choose a reason for hiding this comment

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

JavaDoc

@@ -0,0 +1,10 @@
package com.nutrons.framework.controllers;

public interface ServoEvent {
Copy link
Contributor

Choose a reason for hiding this comment

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

Change name to ServoInstr

private final double angle;

/**
* An event which sets the servo to turn to a certain angle.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this true for all servos, or just the ones we currently have?

@Override
public void actOn(RevServo servo) {
if (Math.abs(value) > 1.0) {
throw new EventUnimplementedException(
Copy link
Contributor

Choose a reason for hiding this comment

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

Throw IllegalArgumentException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants