Heltec boards sensor and low power features update (#4418)

* Update sensor drive and low power features.

* Update ST7789 TFT control logic.

* Update Heltec nRF board low power features.

* Update the GPS UART port pointer
This commit is contained in:
Aaron.Lee
2024-08-13 19:30:35 +08:00
committed by GitHub
parent f97ae52263
commit 6e8300287b
9 changed files with 84 additions and 6 deletions

View File

@@ -198,8 +198,15 @@ void NRF52Bluetooth::shutdown()
{
// Shutdown bluetooth for minimum power draw
LOG_INFO("Disable NRF52 bluetooth\n");
if (connectionHandle != 0) {
Bluefruit.disconnect(connectionHandle);
uint8_t connection_num=Bluefruit.connected();
if(connection_num)
{
for(uint8_t i=0;i<connection_num;i++)
{
LOG_INFO("NRF52 bluetooth disconnecting handle %d\n",i);
Bluefruit.disconnect(i);
}
delay(100);//wait for ondisconnect;
}
Bluefruit.Advertising.stop();
}