Skip to content

Commit baf3a48

Browse files
committed
Generate new definitions
1 parent 5282bb0 commit baf3a48

File tree

6 files changed

+347
-119
lines changed

6 files changed

+347
-119
lines changed

gen/go/proto/approach/v1/approach.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/go/proto/mastermind/v1/mastermind.pb.go

Lines changed: 260 additions & 115 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/go/proto/mastermind/v1/mastermind_grpc.pb.go

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/go/proto/proxy/v1/proxy.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/mastermind/v1/mastermind.proto

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ message GotoWaypointRequest {
103103
float lon = 2;
104104
float alt = 3;
105105
}
106-
106+
// SetAttitude sends the desired attitude of the plane in degrees. Mastermind changes mode to FBWB before giving commands
107+
message SetAttitudeRequest {
108+
float pitch = 1; // degree
109+
float roll = 2; // degree
110+
Target target = 3; // positions of the target plane on the live stream
111+
}
112+
message SetAttitudeResponse {}
107113
message GotoWaypointResponse { bool command_succeeded = 1; }
108114

109115
service MastermindService {
@@ -132,4 +138,7 @@ service MastermindService {
132138

133139
// GotoWaypoint commands the plane to go to specified waypoint
134140
rpc GotoWaypoint(GotoWaypointRequest) returns (GotoWaypointResponse);
141+
142+
// SetAttitude comannds the plane to change its attitude
143+
rpc SetAttitude(stream SetAttitudeRequest) returns (SetAttitudeResponse);
135144
}

server/server.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package server
22

33
import (
44
"fmt"
5-
"google.golang.org/grpc/reflection"
65
"net"
76
"sync"
87

8+
"google.golang.org/grpc/reflection"
9+
910
"github.com/aler9/gomavlib"
1011
"github.com/google/uuid"
1112
evbus "github.com/ispringtech/eventbus"
@@ -48,6 +49,7 @@ type mastermindServiceServer struct {
4849
node *gomavlib.Node // node connected to the plane
4950
sysId uint8 // MAVLink system ID of the plane
5051
compId uint8 // MAVLink component ID of the autopilot
52+
target pb.Target // Target being followed by tracking service
5153
}
5254

5355
func NewMastermindServiceServer(node *gomavlib.Node, sysId uint8, compId uint8) *mastermindServiceServer {

0 commit comments

Comments
 (0)