|
|
@ -1,13 +1,19 @@ |
|
|
|
#!/usr/bin/env python3 |
|
|
|
#!/usr/bin/env python3 |
|
|
|
|
|
|
|
import gc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cereal.messaging as messaging |
|
|
|
from cereal import car |
|
|
|
from cereal import car |
|
|
|
from common.params import Params |
|
|
|
from common.params import Params |
|
|
|
import cereal.messaging as messaging |
|
|
|
from common.realtime import set_realtime_priority |
|
|
|
from selfdrive.controls.lib.events import Events |
|
|
|
from selfdrive.controls.lib.events import Events |
|
|
|
from selfdrive.monitoring.driver_monitor import DriverStatus |
|
|
|
|
|
|
|
from selfdrive.locationd.calibrationd import Calibration |
|
|
|
from selfdrive.locationd.calibrationd import Calibration |
|
|
|
|
|
|
|
from selfdrive.monitoring.driver_monitor import DriverStatus |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def dmonitoringd_thread(sm=None, pm=None): |
|
|
|
def dmonitoringd_thread(sm=None, pm=None): |
|
|
|
|
|
|
|
gc.disable() |
|
|
|
|
|
|
|
set_realtime_priority(2) |
|
|
|
|
|
|
|
|
|
|
|
if pm is None: |
|
|
|
if pm is None: |
|
|
|
pm = messaging.PubMaster(['driverMonitoringState']) |
|
|
|
pm = messaging.PubMaster(['driverMonitoringState']) |
|
|
|
|
|
|
|
|
|
|
@ -77,8 +83,10 @@ def dmonitoringd_thread(sm=None, pm=None): |
|
|
|
} |
|
|
|
} |
|
|
|
pm.send('driverMonitoringState', dat) |
|
|
|
pm.send('driverMonitoringState', dat) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(sm=None, pm=None): |
|
|
|
def main(sm=None, pm=None): |
|
|
|
dmonitoringd_thread(sm, pm) |
|
|
|
dmonitoringd_thread(sm, pm) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
if __name__ == '__main__': |
|
|
|
main() |
|
|
|
main() |
|
|
|