diff --git a/internal/pkg/server/reactormanager.go b/internal/pkg/server/reactormanager.go index 16a77e3..cabbc1f 100644 --- a/internal/pkg/server/reactormanager.go +++ b/internal/pkg/server/reactormanager.go @@ -57,10 +57,10 @@ func (r *ReactorManager) ReactorStatusHandler(ctx context.Context, req *pb.React //go r.PingReset() fmt.Printf("Recieved ping from %v!\n", req.GetId()) for _, dev := range req.GetDevices() { - d := &DeviceInfo{Id: int(dev.GetAddr()), Type: dev.GetType(), Status: dev.GetStatus(), Data: dev.GetData()} + d := &DeviceInfo{Id: int(dev.GetAddr()), Type: dev.GetName(), Status: dev.GetStatus(), Data: dev.GetData()} go r.UpdateDevice(d) } - return &pb.ReactorStatusResponse{Id: uint32(r.Id)}, nil + return &pb.ReactorStatusResponse{Id: int32(r.Id)}, nil } func (r *ReactorManager) UpdateDevice(d *DeviceInfo) {