Skip to content

Commit

Permalink
Remove cfg from encoded motor structure (#2252)
Browse files Browse the repository at this point in the history
  • Loading branch information
randhid authored May 4, 2023
1 parent 632f9e2 commit a17098b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions components/motor/gpio/motor_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func newEncodedMotor(
cancelCtx, cancel := context.WithCancel(context.Background())
em := &EncodedMotor{
Named: name.AsNamed(),
cfg: motorConfig,
ticksPerRotation: int64(motorConfig.TicksPerRotation),
real: localReal,
cancelCtx: cancelCtx,
Expand Down Expand Up @@ -175,7 +174,6 @@ type EncodedMotor struct {
resource.AlwaysRebuild

activeBackgroundWorkers sync.WaitGroup
cfg Config
real motor.LocalMotor
encoder encoder.Encoder

Expand Down
5 changes: 1 addition & 4 deletions components/motor/gpio/motor_encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
"go.viam.com/rdk/resource"
)

// setupMotorWithEncoder(encType string) {}

func nowNanosTest() uint64 {
return uint64(time.Now().UnixNano())
}
Expand Down Expand Up @@ -93,7 +91,6 @@ func TestMotorEncoder1(t *testing.T) {
})

t.Run("encoded motor testing SetPower interrupt GoFor", func(t *testing.T) {
t.Skip()
test.That(t, motorDep.goForInternal(context.Background(), 1000, 1000), test.ShouldBeNil)
test.That(t, fakeMotor.Direction(), test.ShouldEqual, 1)
test.That(t, fakeMotor.PowerPct(), test.ShouldBeGreaterThan, float32(0))
Expand Down Expand Up @@ -277,7 +274,7 @@ func TestMotorEncoder1(t *testing.T) {
}

func TestMotorEncoderIncremental(t *testing.T) {
// t.Skip()
t.Skip()
logger := golog.NewTestLogger(t)
undo := SetRPMSleepDebug(1, false)
defer undo()
Expand Down

0 comments on commit a17098b

Please sign in to comment.