修改亮灯逻辑
This commit is contained in:
@@ -57,7 +57,7 @@ void embedded_thread(void* arg)
|
||||
}
|
||||
void pc_link_rgb_color(device_t* device)
|
||||
{
|
||||
static uint8_t last_connect = 0, last_wifi_mode = 0;
|
||||
static uint8_t last_connect = 255, last_wifi_mode = 0;
|
||||
if(device->connect_pc != last_connect || last_wifi_mode != device->init_device.wifi_mode)
|
||||
{
|
||||
switch (device->connect_pc)
|
||||
@@ -65,9 +65,9 @@ void pc_link_rgb_color(device_t* device)
|
||||
case DISCONNECT:
|
||||
{
|
||||
if(device->init_device.wifi_mode == WIFI_NETIF_MODE_AP)
|
||||
rgb_color_change(0, RGB_COLOR_BLUE);
|
||||
rgb_color_change(0, RGB_COLOR_GREEN_WHITE);
|
||||
else
|
||||
rgb_color_change(0, RGB_COLOR_ORANGE);
|
||||
rgb_color_change(0, RGB_COLOR_GREEN_PURPLE);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -96,8 +96,12 @@ void pc_link_rgb_color(device_t* device)
|
||||
last_connect = device->connect_pc;
|
||||
last_wifi_mode = device->init_device.wifi_mode;
|
||||
}
|
||||
if(device->connect_pc){
|
||||
rgb_update_cyle(0);
|
||||
if(device->connect_pc == DISCONNECT)
|
||||
{
|
||||
rgb_update_cyle(50);
|
||||
}
|
||||
else if(device->connect_pc){
|
||||
rgb_update_cyle(888);
|
||||
}else{
|
||||
rgb_update_cyle(500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user