更新wifi强度判定

This commit is contained in:
wyf
2025-08-27 15:24:48 +08:00
parent 9474f61b08
commit 43475c2a8b
7 changed files with 44 additions and 40 deletions

View File

@@ -855,7 +855,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
int? rssi = int.tryParse(wifiItem['rssi'].toString());
if (rssi != null) {
if (rssi >= -30) {
if (rssi >= AppConstants().wifi1) {
return Container(
width: 40.rpx,
height: 40.rpx,
@@ -863,7 +863,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
decoration: BoxDecoration(shape: BoxShape.circle),
child: Image.asset("assets/img/wifi4.png"),
);
} else if (rssi >= -45) {
} else if (rssi >= AppConstants().wifi2) {
return Container(
width: 40.rpx,
height: 40.rpx,
@@ -871,7 +871,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
decoration: BoxDecoration(shape: BoxShape.circle),
child: Image.asset("assets/img/wifi3.png"),
);
} else if (rssi >= -60) {
} else if (rssi >= AppConstants().wifi3) {
return Container(
width: 40.rpx,
height: 40.rpx,

View File

@@ -830,7 +830,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
int? rssi = int.tryParse(wifiItem['rssi'].toString());
if (rssi != null) {
if (rssi >= -30) {
if (rssi >= AppConstants().wifi1) {
return Container(
width: 40.rpx,
height: 40.rpx,
@@ -838,7 +838,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
decoration: BoxDecoration(shape: BoxShape.circle),
child: Image.asset("assets/img/wifi4.png"),
);
} else if (rssi >= -45) {
} else if (rssi >= AppConstants().wifi2) {
return Container(
width: 40.rpx,
height: 40.rpx,
@@ -846,7 +846,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
decoration: BoxDecoration(shape: BoxShape.circle),
child: Image.asset("assets/img/wifi3.png"),
);
} else if (rssi >= -60) {
} else if (rssi >= AppConstants().wifi3) {
return Container(
width: 40.rpx,
height: 40.rpx,