Add BHI260 init retry, revert BMM150 firmware (no magnetometer on PCB)

The T-Watch Ultra does not have a BMM150 magnetometer — the BHI260AP
aux I2C pins are tied to VDD1V8 (confirmed from schematic). The
BOSCH_BHI260_AUX_BMM150_GPIO firmware fails to init because there
is no BMM150 to discover.

Reverted to BOSCH_BHI260_GPIO. Added 10s retry interval for BHI260
init failures instead of single-attempt with no recovery.
pull/129/head
GlassOnTin 2026-04-02 10:49:33 +01:00
parent a45986f7a4
commit 7208ce348c
1 changed files with 6 additions and 2 deletions

View File

@ -2221,9 +2221,13 @@ void loop() {
// Deferred BHI260AP init — runs once after boot is complete // Deferred BHI260AP init — runs once after boot is complete
// Firmware upload takes ~10s and blocks, so we do it after radio is up // Firmware upload takes ~10s and blocks, so we do it after radio is up
#if BOARD_MODEL == BOARD_TWATCH_ULT #if BOARD_MODEL == BOARD_TWATCH_ULT
if (!bhi260_ready && bhi260 == NULL && millis() > 5000) { static uint32_t bhi260_next_try = 5000;
if (!bhi260_ready && millis() > bhi260_next_try) {
bhi260_next_try = millis() + 10000; // retry every 10s
if (bhi260 == NULL) {
bhi260 = new SensorBHI260AP();
}
Wire.setClock(1000000UL); Wire.setClock(1000000UL);
bhi260 = new SensorBHI260AP();
bhi260->setPins(-1); bhi260->setPins(-1);
bhi260->setFirmware(bosch_firmware_image, bosch_firmware_size, false); bhi260->setFirmware(bosch_firmware_image, bosch_firmware_size, false);
bhi260->setBootFromFlash(false); bhi260->setBootFromFlash(false);