30 lines
688 B
Go
30 lines
688 B
Go
|
package pages
|
||
|
|
||
|
import (
|
||
|
"sync"
|
||
|
|
||
|
"gitea.unprism.ru/KRBL/mpu/mpu"
|
||
|
"gitea.unprism.ru/KRBL/sim-modem/api/modem/gps"
|
||
|
)
|
||
|
|
||
|
// Some supplement types and constants
|
||
|
|
||
|
// This struct contains status of the system that will be on the display
|
||
|
type systemStatus struct {
|
||
|
mutex sync.Mutex
|
||
|
|
||
|
// Status data
|
||
|
gpsData gps.Data
|
||
|
mpuData mpu.Data
|
||
|
|
||
|
rssi int // Received signal strength indicator (check gitea.unprism.ru/KRBL/sim-modem/api/modem/utils/signal.go)
|
||
|
service string // Internet service name, could be: "NO SERVICE", "GSM", "WCDMA", "LTE", "TDS"
|
||
|
}
|
||
|
|
||
|
type SystemStatusSetter interface {
|
||
|
SetGps(newData gps.Data)
|
||
|
SetMpu(newData mpu.Data)
|
||
|
SetRssi(newData int)
|
||
|
SetService(newData string)
|
||
|
}
|