支持按键开关rf射频功能

This commit is contained in:
OPTOC
2025-10-28 11:25:13 +08:00
parent 2800c2660b
commit 5932e44c3e
5 changed files with 52 additions and 24 deletions

View File

@@ -354,37 +354,40 @@ void pc_link_rgb_color(device_t* device)
case DISCONNECT:
{
if(device->init_device.wifi_mode == WIFI_NETIF_MODE_AP)
new_color = RGB_COLOR_GREEN_WHITE;
else
new_color = RGB_COLOR_GREEN_PURPLE;
new_color = NO_CONNECT_COLOR_BLE_AP;
else if(device->init_device.wifi_mode == WIFI_NETIF_MODE_STA)
new_color = NO_CONNECT_COLOR_BLE_STA;
else if(device->init_device.wifi_mode == RC_OFF_NONE)
new_color = RF_OFF_COLOR;
break;
}
case CONNECT_WIFI_TCP:
{
if(device->init_device.wifi_mode == WIFI_NETIF_MODE_AP)
new_color = RGB_COLOR_WHITE;
else
new_color = RGB_COLOR_PURPLE;
new_color = WIFI_AP_COLOR;
else if(device->init_device.wifi_mode == WIFI_NETIF_MODE_STA)
new_color = WIFI_STA_COLOR;
else if(device->init_device.wifi_mode == RC_OFF_NONE)
new_color = RF_OFF_COLOR;
break;
}
case CONNECT_WIFI_UDP:
{
if(device->init_device.wifi_mode == WIFI_NETIF_MODE_AP)
new_color = RGB_COLOR_WHITE;
new_color = WIFI_AP_COLOR;
else
new_color = RGB_COLOR_PURPLE;
new_color = WIFI_STA_COLOR;
break;
}
case CONNECT_BLE:
{
new_color = RGB_COLOR_GREEN;
new_color = BLE_COLOR;
}
break;
case CONNECT_RF_OFF:
{
new_color = RGB_COLOR_BLUE;
new_color = RF_OFF_COLOR;
}
break;
}