Skip to content

Commit 67cbeeb

Browse files
committed
sensord: magnetometer is only for tizi
1 parent 16abf93 commit 67cbeeb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

system/sensord/sensord.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from openpilot.common.realtime import config_realtime_process, Ratekeeper
1212
from openpilot.common.swaglog import cloudlog
1313
from openpilot.common.gpio import gpiochip_get_ro_value_fd, gpioevent_data
14+
from openpilot.system.hardware import HARDWARE
1415

1516
from openpilot.system.sensord.sensors.i2c_sensor import Sensor
1617
from openpilot.system.sensord.sensors.lsm6ds3_accel import LSM6DS3_Accel
@@ -95,8 +96,11 @@ def main() -> None:
9596
(LSM6DS3_Accel(I2C_BUS_IMU), "accelerometer", True),
9697
(LSM6DS3_Gyro(I2C_BUS_IMU), "gyroscope", True),
9798
(LSM6DS3_Temp(I2C_BUS_IMU), "temperatureSensor", False),
98-
(MMC5603NJ_Magn(I2C_BUS_IMU), "magnetometer", False),
9999
]
100+
if HARDWARE.get_device_type() == "tizi":
101+
sensors_cfg.append(
102+
(MMC5603NJ_Magn(I2C_BUS_IMU), "magnetometer", False),
103+
)
100104

101105
# Reset sensors
102106
for sensor, _, _ in sensors_cfg:

0 commit comments

Comments
 (0)