MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / get_detected_ip_address

Function get_detected_ip_address

OpenHD/ohd_interface/src/microhard_link.cpp:396–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396std::string get_detected_ip_address() {
397 auto ip_addresses = get_ip_addresses(MICROHARD_IP_RANGE);
398 if (!ip_addresses.empty()) {
399 return ip_addresses.front();
400 } else {
401 openhd::log::get_default()->warn("No IP addresses starting with {} found.",
402 MICROHARD_IP_RANGE);
403
404 return ""; // Return an empty string if no IP found
405 }
406}
407
408static void wait_for_microhard_module(bool is_air) {
409 const std::string microhard_device_ip = get_gateway_ip();

Callers

nothing calls this directly

Calls 1

get_ip_addressesFunction · 0.85

Tested by

no test coverage detected