Skip to content

Commit

Permalink
remove GetType from controllable
Browse files Browse the repository at this point in the history
  • Loading branch information
martha-johnston committed Sep 30, 2024
1 parent 311b94e commit de3a685
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
5 changes: 0 additions & 5 deletions components/base/sensorcontrolled/velocities.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,3 @@ func (sb *sensorBase) State(ctx context.Context) ([]float64, error) {
}
return []float64{linvel.Y, angvel.Z}, nil
}

// GetType returns that the controllable type is base
func (cm *sensorBase) GetType() string {
return "base"
}
5 changes: 0 additions & 5 deletions components/motor/gpio/controlled.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ func (cm *controlledMotor) State(ctx context.Context) ([]float64, error) {
return []float64{pos}, err
}

// GetType returns that the controllable type is motor
func (cm *controlledMotor) GetType() string {
return "motor"
}

// updateControlBlockPosVel updates the trap profile and the constant set point for position and velocity control.
func (cm *controlledMotor) updateControlBlock(ctx context.Context, setPoint, maxVel float64) error {
// Update the Trapezoidal Velocity Profile block with the given maxVel for velocity control
Expand Down
2 changes: 0 additions & 2 deletions control/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ type Controllable interface {
SetState(ctx context.Context, state []*Signal) error
// Position returns the current encoder count value
State(ctx context.Context) ([]float64, error)
// Type returns if the controllable is a base or a motor
GetType() string
}

// Config configuration of the control loop.
Expand Down
1 change: 0 additions & 1 deletion control/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func (e *endpoint) Next(ctx context.Context, x []*Signal, dt time.Duration) ([]*
e.mu.Lock()
defer e.mu.Unlock()
e.logger.CDebugf(ctx, "z length %v", len(x))
e.logger.CDebugf(ctx, "controllable type is %v", e.ctr.GetType())
switch len(x) {
case 1, 2:
if e.ctr != nil {
Expand Down

0 comments on commit de3a685

Please sign in to comment.