Skip to content

Commit

Permalink
remove servo status
Browse files Browse the repository at this point in the history
  • Loading branch information
randhid committed Nov 22, 2024
1 parent 05aa4ce commit 83050a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 73 deletions.
14 changes: 0 additions & 14 deletions components/servo/servo.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

func init() {
resource.RegisterAPI(API, resource.APIRegistration[Servo]{
Status: resource.StatusFunc(CreateStatus),
RPCServiceServerConstructor: NewRPCServiceServer,
RPCServiceHandler: pb.RegisterServoServiceHandlerFromEndpoint,
RPCServiceDesc: &pb.ServoService_ServiceDesc,
Expand Down Expand Up @@ -83,16 +82,3 @@ func FromRobot(r robot.Robot, name string) (Servo, error) {
func NamesFromRobot(r robot.Robot) []string {
return robot.NamesByAPI(r, API)
}

// CreateStatus creates a status from the servo.
func CreateStatus(ctx context.Context, s Servo) (*pb.Status, error) {
position, err := s.Position(ctx, nil)
if err != nil {
return nil, err
}
isMoving, err := s.IsMoving(ctx)
if err != nil {
return nil, err
}
return &pb.Status{PositionDeg: position, IsMoving: isMoving}, nil
}
59 changes: 0 additions & 59 deletions components/servo/servo_test.go

This file was deleted.

0 comments on commit 83050a5

Please sign in to comment.