uwb: include init.uwb.calib.sh
Bug: 233619860 Bug: 237485063 Test: build pass on both cheetah and aosp_cheetah Signed-off-by: Rex Lin <rexcylin@google.com> Change-Id: Ic759b1efc206a3c1e68526098d258f2c142c6799
This commit is contained in:
parent
7631287df4
commit
bfb440fa08
2 changed files with 26 additions and 0 deletions
25
uwb/init.uwb.calib.xtal.sh
Normal file
25
uwb/init.uwb.calib.xtal.sh
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/vendor/bin/sh
|
||||
# only use xtal_trim from factory calibration
|
||||
if [ -z "$2" ]
|
||||
then
|
||||
echo "usage is $0 input-calibration output_calibration"
|
||||
exit 0
|
||||
fi
|
||||
OUTPUT_CALIB="$2"
|
||||
if [ ! -f "$OUTPUT_CALIB" ]; then
|
||||
touch $OUTPUT_CALIB
|
||||
chmod 0644 $OUTPUT_CALIB
|
||||
file="$1"
|
||||
while IFS=, read -r f1 f2
|
||||
do
|
||||
case $f1 in
|
||||
"UWB_cal_tx_xtal_reg_final_value")
|
||||
if [ $((0x$f2)) -gt 63 ]; then
|
||||
f2=63
|
||||
fi
|
||||
echo 'xtal_trim=0x'$f2 >> $OUTPUT_CALIB
|
||||
;;
|
||||
esac
|
||||
done <"$file"
|
||||
exit 0
|
||||
fi
|
|
@ -22,6 +22,7 @@ PRODUCT_COPY_FILES += \
|
|||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/uwb/UWB-calibration.conf \
|
||||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/uwb/UWB-calibration-unknown.conf \
|
||||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/uwb/UWB-calibration-default.conf \
|
||||
$(LOCAL_UWB_CAL_DIR)/init.uwb.calib.xtal.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.uwb.calib.sh \
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue