uwb: support per device calibration for F10
Bug: 239674697 Test: Verified with local build Signed-off-by: Rex Lin <rexcylin@google.com> Change-Id: Ieb9651c231ec9901eae6993fc4ccee35eecccfb4
This commit is contained in:
parent
573f754531
commit
cbe8b25c1d
3 changed files with 36 additions and 4 deletions
|
@ -32,7 +32,6 @@ $(call soong_config_set,fp_hal_feature,pixel_product, product_a)
|
|||
include hardware/google/pixel/vibrator/cs40l26/device-stereo.mk
|
||||
include device/google/gs101/bluetooth/bluetooth.mk
|
||||
ifeq ($(filter factory_felix, $(TARGET_PRODUCT)),)
|
||||
include device/google/gs101/uwb/uwb.mk
|
||||
include device/google/felix/uwb/uwb_calibration.mk
|
||||
endif
|
||||
|
||||
|
|
26
uwb/init.uwb.calib.xtal.sh
Normal file
26
uwb/init.uwb.calib.xtal.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/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
|
||||
|
|
@ -13,9 +13,16 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# UWB - ultra wide band
|
||||
$(call inherit-product-if-exists, vendor/qorvo/uwb/uwb.mk)
|
||||
|
||||
LOCAL_UWB_CAL_DIR=device/google/felix/uwb
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration.conf \
|
||||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration-unknown.conf \
|
||||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration-default.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-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