| 140 | } |
| 141 | |
| 142 | bool WifiHotspot::get_use_5g_channel( |
| 143 | const WiFiCard& wifiCard, |
| 144 | const openhd::WifiSpace& wifibroadcast_frequency_space) { |
| 145 | const bool wifibroadcast_uses_5G = |
| 146 | wifibroadcast_frequency_space == openhd::WifiSpace::G5_8; |
| 147 | bool should_use_5G = !wifibroadcast_uses_5G; |
| 148 | if (should_use_5G && !wifiCard.supports_5GHz()) { |
| 149 | openhd::log::get_default()->debug( |
| 150 | "openhd needs 5G hotspot but hotspot card only supports 2G,you'l get " |
| 151 | "really bad interference"); |
| 152 | openhd::log::get_default()->debug("Using 2.4G hotspot"); |
| 153 | should_use_5G = false; |
| 154 | } |
| 155 | // Not seen a 5G only card yet |
| 156 | return should_use_5G; |
| 157 | } |
| 158 | |
| 159 | uint16_t WifiHotspot::get_frequency() { |
| 160 | if (m_use_5G_channel) return 5180; |
nothing calls this directly
no test coverage detected