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.
39 lines
510 B
Go
39 lines
510 B
Go
2 years ago
|
package device
|
||
|
|
||
|
// do sensor and methods
|
||
|
|
||
|
import (
|
||
|
"sync"
|
||
|
)
|
||
|
|
||
|
type RTDManager struct {
|
||
|
// do sensor manager
|
||
|
*Atlas
|
||
|
*SensorManager
|
||
|
sync.RWMutex
|
||
|
}
|
||
|
|
||
|
func NewRTDManager() *RTDManager {
|
||
|
// atlas delays
|
||
|
a := &Atlas{
|
||
|
CalDelay: 600,
|
||
|
ReadDelay: 600,
|
||
|
}
|
||
|
|
||
|
sm := NewSensorManager()
|
||
|
m := &RTDManager{
|
||
|
Atlas: a,
|
||
|
SensorManager: sm,
|
||
|
}
|
||
|
return m
|
||
|
}
|
||
|
|
||
|
func (m *RTDManager) Start() error {
|
||
|
return m.SensorManager.Start(m.Atlas.TakeReading)
|
||
|
}
|
||
|
|
||
|
func (m *RTDManager) String() string {
|
||
|
// TODO
|
||
|
return ""
|
||
|
}
|