update firmware v1.2.4 (#16)

This commit is contained in:
Forairaaaaa
2026-04-20 16:27:36 +08:00
committed by GitHub
parent 605b575fcc
commit dd34f9e0ec
94 changed files with 3615 additions and 41513 deletions
+10 -4
View File
@@ -48,7 +48,7 @@ static uint8_t _handle_ble_battery_read(void)
return 96;
}
void Hal::ble_init()
void Hal::ble_init(bool useAltUuid)
{
mclog::tagInfo(_tag, "init");
@@ -61,7 +61,7 @@ void Hal::ble_init()
};
stackchan_ble_register_callbacks(&ble_callbacks);
ble_prph_init();
ble_prph_init(useAltUuid);
uint8_t mac[6];
esp_read_mac(mac, ESP_MAC_EFUSE_FACTORY);
@@ -72,7 +72,7 @@ void Hal::ble_init()
void Hal::startBleServer()
{
mclog::tagInfo(_tag, "start ble server");
ble_init();
ble_init(false);
}
bool Hal::isBleConnected()
@@ -273,7 +273,7 @@ void Hal::startAppConfigServer()
{
mclog::tagInfo(_tag, "start app config server");
ble_init();
ble_init(true);
mooncake::GetMooncake().extensionManager()->createAbility(std::make_unique<AppConfigServerWorker>());
}
@@ -283,3 +283,9 @@ bool Hal::isAppConfiged()
Settings settings("app_config", false);
return settings.GetBool("is_configed", false);
}
void Hal::resetAppConfiged()
{
Settings settings("app_config", true);
settings.SetBool("is_configed", false);
}