sensord: add new config (#34442)

* sensord: add new config

* fix mypy
pull/34443/head
Adeeb Shihadeh 3 months ago committed by GitHub
parent 2a9e5ed7f8
commit 8f8f185a95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      system/hardware/tici/hardware.py
  2. 18
      system/sensord/tests/test_sensord.py

@ -205,6 +205,8 @@ class Tici(HardwareBase):
return str(self.get_modem().Get(MM_MODEM, 'EquipmentIdentifier', dbus_interface=DBUS_PROPS, timeout=TIMEOUT))
def get_network_info(self):
if self.get_device_type() == "mici":
return None
try:
modem = self.get_modem()
info = modem.Command("AT+QNWINFO", math.ceil(TIMEOUT), dbus_interface=MM_MODEM, timeout=TIMEOUT)
@ -295,6 +297,8 @@ class Tici(HardwareBase):
return None
def get_modem_temperatures(self):
if self.get_device_type() == "mici":
return []
timeout = 0.2 # Default timeout is too short
try:
modem = self.get_modem()

@ -9,6 +9,7 @@ from cereal import log
from cereal.services import SERVICE_LIST
from openpilot.common.gpio import get_irqs_for_action
from openpilot.common.timeout import Timeout
from openpilot.system.hardware import HARDWARE
from openpilot.system.manager.process_config import managed_processes
BMX = {
@ -29,12 +30,17 @@ MMC = {
('mmc5603nj', 'magneticUncalibrated'),
}
SENSOR_CONFIGURATIONS = (
(BMX | LSM),
(MMC | LSM),
(BMX | LSM_C),
(MMC| LSM_C),
)
SENSOR_CONFIGURATIONS: list[set] = [
BMX | LSM,
MMC | LSM,
BMX | LSM_C,
MMC| LSM_C,
]
if HARDWARE.get_device_type() == "mici":
SENSOR_CONFIGURATIONS = [
LSM,
LSM_C,
]
Sensor = log.SensorEventData.SensorSource
SensorConfig = namedtuple('SensorConfig', ['type', 'sanity_min', 'sanity_max'])

Loading…
Cancel
Save