更新传感器升级

This commit is contained in:
wyf
2025-09-02 14:03:00 +08:00
parent 8761e8bf1a
commit aad3a00ac3
9 changed files with 456 additions and 36 deletions

View File

@@ -72,6 +72,9 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
RxMap connect_wifi = {}.obs;
RxString? cid = "".obs;
RxBool isScanning = false.obs;
Map<String, Map> localUpgradeMac = {}; //mac 进度
void startStatusPolling() {
updateDeviceStatus().then((res) {
if (res.code == HttpStatusCodes.ok) {
@@ -141,9 +144,9 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
}
String? language = "";
if (mhLanguageController.selectLanguage != null) {
language = mhLanguageController.selectLanguage.value!.language_code;
}
if (mhLanguageController.selectLanguage != null) {
language = mhLanguageController.selectLanguage.value!.language_code;
}
if (language != null && language.isNotEmpty) {
if (queryUrl.contains("?")) {
queryUrl += "&lang=$language";
@@ -372,8 +375,8 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
);
}
loadMattressTimeData(String mac,{int time = 3}) async {
String serviceAddress = ServiceConstant.service_address;
loadMattressTimeData(String mac, {int time = 3}) async {
String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.user_setting;
String type = "sleep_new_time_${mac}";