stephb9959
2023-03-07 08:02:02 -08:00
parent 0cc023c4b0
commit b336ee4e23
3 changed files with 3 additions and 3 deletions

View File

@@ -515,7 +515,7 @@ namespace OpenWifi::GWObjects {
void FrequencyRange::to_json(Poco::JSON::Object &Obj) const {
field_to_json(Obj, "from", from);
field_to_json(Obj, "to", to);
field_to_json(Obj, "bw", bw);
field_to_json(Obj, "channelWidth", channelWidth);
field_to_json(Obj, "powerDb", powerDb);
field_to_json(Obj, "options", options);
}

View File

@@ -353,7 +353,7 @@ namespace OpenWifi::GWObjects {
struct FrequencyRange {
float from = 0.0;
float to = 0.0;
int bw = 0;
int channelWidth = 0;
int powerDb = 0;
RangeOptions options;

View File

@@ -126,7 +126,7 @@ namespace OpenWifi {
if(inCountry) {
GWObjects::FrequencyRange fr;
auto tokens = Poco::StringTokenizer(line,",", Poco::StringTokenizer::TOK_TRIM);
std::sscanf(tokens[0].c_str(),"(%f - %f @ %d)", &fr.from, &fr.to, &fr.bw);
std::sscanf(tokens[0].c_str(),"(%f - %f @ %d)", &fr.from, &fr.to, &fr.channelWidth);
if(tokens[1].find("mW")!=std::string::npos) {
int temp_pwr;
std::sscanf(tokens[1].c_str(),"(%d mW)", &temp_pwr);