完成修复远程控制页面中点火的状态值不一致问题

This commit is contained in:
2026-03-18 13:43:19 +08:00
parent 179f11992b
commit bb22de2e32
2 changed files with 8 additions and 8 deletions

View File

@@ -98,7 +98,7 @@ class CenterControlArea extends StatelessWidget {
svgEnd: "assets/svgs/remote_down.svg",
onStart: () => _handleSliderAction(label, "start", context),
onCenter: () => _handleSliderAction(label, "center", context),
onEnd: () => debugPrint("$label end"),
onEnd: () => _handleSliderAction(label, "end", context),
iconSize: boxWidth * 0.6 * 0.35,
),
),

View File

@@ -232,7 +232,7 @@ class TopStatusBar extends StatelessWidget {
height: boxWidth, // 旋转后对应原宽度(足够长,不拥挤)
child: CCExpandSlider(
label: " ",
// 3. 图标适配旋转后的方向(仍用上下箭头,旋转后变为左右)
// 3. 图标适配旋转后的方向(仍用上下箭头,旋转后变为左右)因为外边旋转了 90度 参数传递也要转换
svgStart: "assets/svgs/remote_flame_minus.svg", // 旋转后→左箭头
svgCenter: "assets/svgs/remote_flame.svg",
svgEnd: "assets/svgs/remote_flame_plus.svg", // 旋转后→右箭头
@@ -241,7 +241,7 @@ class TopStatusBar extends StatelessWidget {
// 保留原有业务逻辑
onStart: () => _handleSliderAction(label, "start", context),
onCenter: () => _handleSliderAction(label, "center", context),
onEnd: () => debugPrint("$label end"),
onEnd: () => _handleSliderAction(label, "end", context),
),
),
),
@@ -262,19 +262,19 @@ class TopStatusBar extends StatelessWidget {
switch (action) {
case "start":
debugPrint('⬆点火啊');
debugPrint('2熄火');
// TODO: 发送 🔥点火指令
cubit.sendFireCommand(1);
cubit.sendFireCommand(2);
break;
case "center":
debugPrint('️熄火');
debugPrint('️0熄火');
// TODO: 发送点火停止指令
cubit.sendFireCommand(0);
break;
case "end":
debugPrint('⬇熄火)');
debugPrint('1点火)');
// TODO: 发送熄火后退指令
cubit.sendFireCommand(2);
cubit.sendFireCommand(1);
break;
}
}