Skip to content

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

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