更新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

@@ -949,7 +949,7 @@ class _WifiPageState extends State<WifiPage> {
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,
@@ -957,7 +957,7 @@ class _WifiPageState extends State<WifiPage> {
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,
@@ -965,7 +965,7 @@ class _WifiPageState extends State<WifiPage> {
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,