MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / is_usb_connected

Method is_usb_connected

display.py:752–763  ·  view source on GitHub ↗

Check if any device is connected to the USB interface.

(self)

Source from the content-addressed store, hash-verified

750 if hasattr(wifi_mgr, 'ap_mode_active') and wifi_mgr.ap_mode_active:
751 # Try to get client count
752 client_count = 0
753 if hasattr(wifi_mgr, 'ap_clients_count'):
754 client_count = wifi_mgr.ap_clients_count
755
756 if client_count > 0:
757 return f"AP: {client_count} client{'s' if client_count != 1 else ''}"
758 else:
759 return "AP: No clients"
760
761 # Check Wi-Fi connection status
762 if hasattr(wifi_mgr, 'wifi_connected') and wifi_mgr.wifi_connected:
763 if hasattr(wifi_mgr, 'current_ssid') and wifi_mgr.current_ssid:
764 return f"WiFi: {wifi_mgr.current_ssid}"
765 else:
766 return "WiFi: Connected"

Callers 1

update_shared_dataMethod · 0.95

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected