Skip to content
Snippets Groups Projects
Commit bfb440fa authored by Rex Lin's avatar Rex Lin
Browse files

uwb: include init.uwb.calib.sh


Bug: 233619860
Bug: 237485063
Test: build pass on both cheetah and aosp_cheetah
Signed-off-by: default avatarRex Lin <rexcylin@google.com>
Change-Id: Ic759b1efc206a3c1e68526098d258f2c142c6799
parent 7631287d
No related branches found
No related tags found
No related merge requests found
#!/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 += \ ...@@ -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.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-unknown.conf \
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/uwb/UWB-calibration-default.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 += \ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment