package sensor import ( "sync" "FRMS/internal/pkg/I2C" ) type Manager struct { Addr int Type string Status bool Kill chan<- bool mu sync.Mutex } func (m *Manager) GetStatus() bool{ m.mu.Lock() defer m.mu.Unlock() return m.Status } func (m *Manager) GetType() string{ m.mu.Lock() defer m.mu.Unlock() return m.Type } func NewSensorManager(addr int) *Manager { return &Manager{Addr:addr} } func (m *Manager) Start() { types := map[int]string{97:"DO Sensor",99:"pH Sensor",102:"RTD Sensor"} m.Type = types[m.Addr] m.Status = true }