Fix gyro orientation offset for EONs with OP3T mainboards (#1738)
* One-time zap of OP3T sensor registry * Bash, I wish I knew how to quit you * Better comment wording * Slight increase for sensor reset settle-time Co-authored-by: Comma Device <device@comma.ai>albatross
parent
c4b5322b7f
commit
c2c00f65a7
|
@ -99,6 +99,18 @@ function launch {
|
|||
fi
|
||||
fi
|
||||
|
||||
# One-time fix for a subset of OP3T with gyro orientation offsets.
|
||||
# Remove and regenerate qcom sensor registry. Only done on OP3T mainboards.
|
||||
# Performed exactly once. The old registry is preserved just-in-case, and
|
||||
# doubles as a flag denoting we've already done the reset.
|
||||
# TODO: we should really grow per-platform detect and setup routines
|
||||
if ! $(grep -q "letv" /proc/cmdline) && [ ! -f "/persist/comma/op3t-sns-reg-backup" ]; then
|
||||
echo "Performing OP3T sensor registry reset"
|
||||
mv /persist/sensors/sns.reg /persist/comma/op3t-sns-reg-backup &&
|
||||
rm -f /persist/sensors/sensors_settings /persist/sensors/error_log /persist/sensors/gyro_sensitity_cal &&
|
||||
echo "restart" > /sys/kernel/debug/msm_subsys/slpi &&
|
||||
sleep 5 # Give Android sensor subsystem a moment to recover
|
||||
fi
|
||||
|
||||
# handle pythonpath
|
||||
ln -sfn $(pwd) /data/pythonpath
|
||||
|
|
Loading…
Reference in New Issue