Helper function to check if a Microhard device is present
| 51 | |
| 52 | // Helper function to check if a Microhard device is present |
| 53 | bool 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 | |
| 65 | OHDInterface::OHDInterface(OHDProfile profile1) |
| 66 | : m_profile(std::move(profile1)) { |
no test coverage detected