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

Function is_microhard_device_present

OpenHD/ohd_interface/src/ohd_interface.cpp:53–63  ·  view source on GitHub ↗

Helper function to check if a Microhard device is present

Source from the content-addressed store, hash-verified

51
52// Helper function to check if a Microhard device is present
53bool is_microhard_device_present() {
54 if (!OHDFilesystemUtil::exists(std::string(getConfigBasePath()) +
55 "wfb.txt") &&
56 !OHDFilesystemUtil::exists(std::string(getConfigBasePath()) +
57 "ethernet.txt")) {
58 std::string output = exec("lsusb");
59 return output.find("Microhard") != std::string::npos;
60 }
61
62 return false;
63}
64
65OHDInterface::OHDInterface(OHDProfile profile1)
66 : m_profile(std::move(profile1)) {

Callers 1

OHDInterfaceMethod · 0.85

Calls 2

getConfigBasePathFunction · 0.85
execFunction · 0.85

Tested by

no test coverage detected