grpc bug fixes

main
KeeganForelight 2 years ago
parent fb14c9c368
commit 196b5578de

@ -22,7 +22,8 @@ type DeviceStatus struct {
func (c *Coordinator) DevStatus(ch chan *DeviceStatus, a int, dm DeviceManager) { func (c *Coordinator) DevStatus(ch chan *DeviceStatus, a int, dm DeviceManager) {
d := &DeviceStatus{Addr: a} d := &DeviceStatus{Addr: a}
d.Type = dm.GetType() d.Type = dm.GetType()
d.Status = dm.GetStatus() //d.Status = dm.GetStatus()
d.Status = 0
d.Data = dm.GetData() d.Data = dm.GetData()
ch <- d ch <- d
} }

@ -1,6 +1,7 @@
package server package server
import ( import (
pb "FRMS/internal/pkg/grpc"
_ "fmt" _ "fmt"
) )
@ -8,7 +9,7 @@ import (
type DeviceInfo struct { type DeviceInfo struct {
Id int Id int
Type string Type string
Status string Status pb.Status
Data string Data string
Index int Index int
TransactionId uint32 TransactionId uint32

Loading…
Cancel
Save