Documentation
¶
Index ¶
- Constants
- Variables
- func CurrentHeading(M1 float64, M2 float64) (heading float64, headingLabel string, err error)
- func InitFilters()
- func InitMowerState()
- func SetIMUValues(data *drivers.MPUData)
- func StartController()
- func StopController()
- func UpdateSystemState()
- func WebSocketConnection(c echo.Context) error
- type CommandMessage
- type MowerControllerStruct
- type MowerStateStruct
- type StateMessage
Constants ¶
View Source
const (
RAD_TO_DEG = math.Pi / 180
)
Variables ¶
View Source
var (
IMUDeltaTime time.Time
)
Functions ¶
func CurrentHeading ¶
func InitFilters ¶
func InitFilters()
func InitMowerState ¶
func InitMowerState()
func SetIMUValues ¶
func StartController ¶
func StartController()
func StopController ¶
func StopController()
func UpdateSystemState ¶
func UpdateSystemState()
func WebSocketConnection ¶
Types ¶
type CommandMessage ¶
type MowerControllerStruct ¶
type MowerControllerStruct struct {
// contains filtered or unexported fields
}
var (
MowerController *MowerControllerStruct
)
type MowerStateStruct ¶
type MowerStateStruct struct {
Platform struct {
Hostname string `json:"hostname"`
OperatingSystem string `json:"operating_system"`
Platform string `json:"platform"`
LoadAverage struct {
Load1 float64 `json:"load1"`
Load5 float64 `json:"load5"`
Load15 float64 `json:"load15"`
} `json:"load_average"`
CPULoad struct {
Count int `json:"count"`
Total float64 `json:"total"`
Core1 float64 `json:"core_1"`
Core2 float64 `json:"core_2"`
Core3 float64 `json:"core_3"`
Core4 float64 `json:"core_4"`
Core5 float64 `json:"core_5"`
Core6 float64 `json:"core_6"`
Core7 float64 `json:"core_7"`
Core8 float64 `json:"core_8"`
} `json:"cpu"`
MemoryUsage struct {
Total uint64 `json:"total"`
Available uint64 `json:"available"`
} `json:"memory"`
DiskUsage struct {
Total uint64 `json:"total"`
Free uint64 `json:"free"`
} `json:"disk"`
} `json:"platform"`
Battery struct {
Status string `json:"status"`
VoltageNominal float64 `json:"voltage_nominal"`
VoltageWarn float64 `json:"voltage_warn"`
Voltage float64 `json:"voltage"`
Current float64 `json:"current"`
} `json:"battery"`
Compass struct {
Status string `json:"status"`
Bearing string `json:"bearing"`
} `json:"compass"`
GPS struct {
Status string `json:"status"`
Coordinates string `json:"coordinates"`
} `json:"gps"`
Drive struct {
Speed int `json:"speed"`
Direction string `json:"direction"`
} `json:"drive"`
Cutter struct {
Speed int `json:"speed"`
} `json:"cutter"`
}
var (
MowerState *MowerStateStruct
)
type StateMessage ¶
type StateMessage struct {
*MowerStateStruct
Namespace string `json:"namespace"`
Mutation string `json:"mutation"`
}
Click to show internal directories.
Click to hide internal directories.