You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
535 B
Go
40 lines
535 B
Go
package device
|
|
|
|
// do sensor and methods
|
|
|
|
import (
|
|
"sync"
|
|
)
|
|
|
|
type PHManager struct {
|
|
// do sensor manager
|
|
*SensorManager
|
|
*Atlas
|
|
|
|
sync.RWMutex
|
|
}
|
|
|
|
func NewPHManager() (*PHManager, error) {
|
|
// atlas delays
|
|
a := &Atlas{
|
|
CalDelay: 900,
|
|
ReadDelay: 900,
|
|
}
|
|
|
|
sm := NewSensorManager()
|
|
return &PHManager{
|
|
Atlas: a,
|
|
SensorManager: sm,
|
|
}, nil
|
|
}
|
|
|
|
func (m *PHManager) Start() error {
|
|
// start sensor manager
|
|
return m.SensorManager.Start(m.Atlas.TakeReading)
|
|
}
|
|
|
|
func (m PHManager) String() string {
|
|
// TODO
|
|
return ""
|
|
}
|