From 61f1a573171066b6aa0d0e32d4db37baabbef246 Mon Sep 17 00:00:00 2001 From: lewisxhe Date: Tue, 8 Oct 2024 10:19:17 +0800 Subject: [PATCH] Update BHI260 examples --- examples/BHI260AP_aux_BMM150/BHI260AP_aux_BMM150.ino | 5 ++++- .../BHI260AP_aux_BMM150_euler/BHI260AP_aux_BMM150_euler.ino | 5 ++++- .../BHI260AP_aux_BMM150_quaternion.ino | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/BHI260AP_aux_BMM150/BHI260AP_aux_BMM150.ino b/examples/BHI260AP_aux_BMM150/BHI260AP_aux_BMM150.ino index 85f0404..5641fe8 100644 --- a/examples/BHI260AP_aux_BMM150/BHI260AP_aux_BMM150.ino +++ b/examples/BHI260AP_aux_BMM150/BHI260AP_aux_BMM150.ino @@ -94,8 +94,11 @@ void setup() // Set the reset pin and interrupt pin, if any bhy.setPins(BHI260AP_RST, BHI260AP_IRQ); + // Force update of the current firmware, regardless of whether it exists. + // After uploading the firmware once, you can change it to false to speed up the startup time. + bool force_update = true; // Set the firmware array address and firmware size - bhy.setFirmware(firmware, fw_size, WRITE_TO_FLASH); + bhy.setFirmware(firmware, fw_size, WRITE_TO_FLASH, force_update); #if WRITE_TO_FLASH // Set to load firmware from flash diff --git a/examples/BHI260AP_aux_BMM150_euler/BHI260AP_aux_BMM150_euler.ino b/examples/BHI260AP_aux_BMM150_euler/BHI260AP_aux_BMM150_euler.ino index b7b7a95..064bba0 100644 --- a/examples/BHI260AP_aux_BMM150_euler/BHI260AP_aux_BMM150_euler.ino +++ b/examples/BHI260AP_aux_BMM150_euler/BHI260AP_aux_BMM150_euler.ino @@ -132,8 +132,11 @@ void setup() // Set the reset pin and interrupt pin, if any bhy.setPins(BHI260AP_RST, BHI260AP_IRQ); + // Force update of the current firmware, regardless of whether it exists. + // After uploading the firmware once, you can change it to false to speed up the startup time. + bool force_update = true; // Set the firmware array address and firmware size - bhy.setFirmware(firmware, fw_size, WRITE_TO_FLASH); + bhy.setFirmware(firmware, fw_size, WRITE_TO_FLASH, force_update); #if WRITE_TO_FLASH // Set to load firmware from flash diff --git a/examples/BHI260AP_aux_BMM150_quaternion/BHI260AP_aux_BMM150_quaternion.ino b/examples/BHI260AP_aux_BMM150_quaternion/BHI260AP_aux_BMM150_quaternion.ino index 9245634..a4ab446 100644 --- a/examples/BHI260AP_aux_BMM150_quaternion/BHI260AP_aux_BMM150_quaternion.ino +++ b/examples/BHI260AP_aux_BMM150_quaternion/BHI260AP_aux_BMM150_quaternion.ino @@ -115,8 +115,11 @@ void setup() // Set the reset pin and interrupt pin, if any bhy.setPins(BHI260AP_RST, BHI260AP_IRQ); + // Force update of the current firmware, regardless of whether it exists. + // After uploading the firmware once, you can change it to false to speed up the startup time. + bool force_update = true; // Set the firmware array address and firmware size - bhy.setFirmware(firmware, fw_size, WRITE_TO_FLASH); + bhy.setFirmware(firmware, fw_size, WRITE_TO_FLASH, force_update); #if WRITE_TO_FLASH // Set to load firmware from flash