mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-18 23:23:42 +08:00
0b2c431d3a
version: sunnypilot v2026.003.000 (dev)
date: 2026-09-14T15:43:39
master commit: a5f44653d7
15 lines
505 B
Python
15 lines
505 B
Python
from openpilot.cereal import messaging
|
|
|
|
|
|
def generate_deviceMotion():
|
|
msg = messaging.new_message('deviceMotion')
|
|
meas = {'x': 0.0, 'y': 0.0, 'z': 0.0, 'xStd': 0.0, 'yStd': 0.0, 'zStd': 0.0, 'valid': True}
|
|
msg.deviceMotion.orientationNED = meas
|
|
msg.deviceMotion.velocityDevice = meas
|
|
msg.deviceMotion.angularVelocityDevice = meas
|
|
msg.deviceMotion.accelerationDevice = meas
|
|
msg.deviceMotion.inputsOK = True
|
|
msg.deviceMotion.posenetOK = True
|
|
msg.deviceMotion.sensorsOK = True
|
|
return msg
|