mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 00:22:56 -05:00
Optimize IP display logic.
WiFi version: Only display the corresponding IP when either ETH or WiFi is present; otherwise, both IPs will alternate.
This commit is contained in:
@@ -140,6 +140,8 @@ int qrencode(char *string)
|
||||
ip_addr_t show_which_ip(void)
|
||||
{
|
||||
if(kvm_sys_state.wifi_state == -2) return ETH_IP;
|
||||
if(kvm_oled_state.eth_state == 3 && kvm_oled_state.wifi_state != 1) return ETH_IP;
|
||||
if(kvm_oled_state.eth_state != 3 && kvm_oled_state.wifi_state == 1) return WiFi_IP;
|
||||
static uint8_t run_count = 0;
|
||||
static ip_addr_t ip_type = ETH_IP;
|
||||
run_count++;
|
||||
|
||||
Reference in New Issue
Block a user