| 162 | } |
| 163 | |
| 164 | std::vector<openhd::Setting> OHDInterface::get_all_settings() { |
| 165 | std::vector<openhd::Setting> ret; |
| 166 | m_console->debug("get all settings"); |
| 167 | if (m_wb_link) { |
| 168 | auto settings = m_wb_link->get_all_settings(); |
| 169 | OHDUtil::vec_append(ret, settings); |
| 170 | } |
| 171 | if (m_microhard_link) { |
| 172 | auto settings = m_microhard_link->get_all_settings(); |
| 173 | OHDUtil::vec_append(ret, settings); |
| 174 | } |
| 175 | if (m_wifi_hotspot != nullptr) { |
| 176 | auto cb_wifi_hotspot_mode = [this](std::string, int value) { |
| 177 | if (!is_valid_wifi_hotspot_mode(value)) return false; |
| 178 | m_nw_settings.unsafe_get_settings().wifi_hotspot_mode = value; |
| 179 | m_nw_settings.persist(); |
| 180 | update_wifi_hotspot_enable(); |
| 181 | return true; |
| 182 | }; |
| 183 | ret.push_back(openhd::Setting{ |
| 184 | "WIFI_HOTSPOT_E", |
| 185 | openhd::IntSetting{m_nw_settings.get_settings().wifi_hotspot_mode, |
| 186 | cb_wifi_hotspot_mode}}); |
| 187 | } |
| 188 | if (m_profile.is_ground()) { |
| 189 | const auto settings = m_nw_settings.get_settings(); |
| 190 | auto cb_ethernet = [this](std::string, int value) { |
| 191 | m_nw_settings.unsafe_get_settings().ethernet_operating_mode = value; |
| 192 | m_nw_settings.persist(); |
| 193 | // Change requires reboot |
| 194 | return true; |
| 195 | }; |
| 196 | ret.push_back(openhd::Setting{ |
| 197 | "ETHERNET", |
| 198 | openhd::IntSetting{settings.ethernet_operating_mode, cb_ethernet}}); |
| 199 | } |
| 200 | /* if(m_opt_hotspot_card){ |
| 201 | auto setting=openhd::create_read_only_string(fmt::format("HOTSPOT_CARD"), |
| 202 | wifi_card_type_to_string(m_opt_hotspot_card.value().type)); |
| 203 | ret.emplace_back(setting); |
| 204 | }*/ |
| 205 | openhd::validate_provided_ids(ret); |
| 206 | return ret; |
| 207 | } |
| 208 | |
| 209 | void OHDInterface::print_internal_fec_optimization_method() { |
| 210 | fec_stream_print_fec_optimization_method(); |
nothing calls this directly
no test coverage detected