|
|
@ -321,7 +321,7 @@ void Menu::wifiInterfaceSelect(WINDOW *window, QString interface) { |
|
|
|
const char *data = array.constData(); |
|
|
|
|
|
|
|
mvwaddstr(window, 1, 2, data); |
|
|
|
mvwaddstr(window, 3, 2, "Bands:"); |
|
|
|
mvwaddstr(window, 3, 2, "Bands: Channels:"); |
|
|
|
|
|
|
|
green(window); |
|
|
|
|
|
|
@ -329,6 +329,7 @@ void Menu::wifiInterfaceSelect(WINDOW *window, QString interface) { |
|
|
|
|
|
|
|
int count = 1; |
|
|
|
int y = 5; |
|
|
|
int y2 = y; |
|
|
|
|
|
|
|
foreach(Wireless::BandInfo band, bands) { |
|
|
|
QString bandStr; |
|
|
@ -356,24 +357,57 @@ void Menu::wifiInterfaceSelect(WINDOW *window, QString interface) { |
|
|
|
|
|
|
|
mvwaddstr(window, y, 2, data); |
|
|
|
|
|
|
|
foreach(Wireless::ChannelInfo chan, band.channels) { |
|
|
|
QString chanStr = QString::number(chan.chan); |
|
|
|
chanStr += " "; |
|
|
|
|
|
|
|
if(chan.chan < 100) { |
|
|
|
chanStr.chop(QString::number(chan.chan).length()); |
|
|
|
} |
|
|
|
|
|
|
|
chanStr += QStringLiteral("- ") + QString::number((double)chan.freq / 1000.0) + " GHz ("; |
|
|
|
|
|
|
|
if(chan.disabled) { |
|
|
|
chanStr += "disabled"; |
|
|
|
}else{ |
|
|
|
chanStr += QString::number((double)chan.max_txpower / 100.0, 'f', 1) + " dBm"; |
|
|
|
|
|
|
|
if(chan.radar) { |
|
|
|
chanStr += ", DFS required"; |
|
|
|
}else{ |
|
|
|
if(chan.passive) { |
|
|
|
chanStr += ", RX-only"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
chanStr += ")"; |
|
|
|
|
|
|
|
QByteArray chanArr = chanStr.toLatin1(); |
|
|
|
const char *chanData = chanArr.constData(); |
|
|
|
|
|
|
|
mvwaddstr(window, y2, 11, chanData); |
|
|
|
++y2; |
|
|
|
} |
|
|
|
|
|
|
|
++y; |
|
|
|
++count; |
|
|
|
} |
|
|
|
|
|
|
|
if(count == 1) { |
|
|
|
mvwaddstr(window, y, 2, "No supported bands found."); |
|
|
|
mvwaddstr(window, y2, 2, "No supported bands found."); |
|
|
|
++y; |
|
|
|
} |
|
|
|
|
|
|
|
cyan(window); |
|
|
|
mvwaddstr(window, y + 1, 2, "0. Back to wireless interfaces"); |
|
|
|
mvwaddstr(window, y2 + 1, 2, "0. Back to wireless interfaces"); |
|
|
|
|
|
|
|
magenta(window); |
|
|
|
mvwaddstr(window, y + 3, 2, "a. Add IP address"); |
|
|
|
mvwaddstr(window, y + 4, 2, "d. Delete IP address"); |
|
|
|
mvwaddstr(window, y + 5, 2, "q. Quit"); |
|
|
|
mvwaddstr(window, y2 + 3, 2, "a. Add IP address"); |
|
|
|
mvwaddstr(window, y2 + 4, 2, "d. Delete IP address"); |
|
|
|
mvwaddstr(window, y2 + 5, 2, "q. Quit"); |
|
|
|
|
|
|
|
mvwaddstr(window, y + 7, 2, "Enter selection: "); |
|
|
|
mvwaddstr(window, y2 + 7, 2, "Enter selection: "); |
|
|
|
wrefresh(window); |
|
|
|
|
|
|
|
char c = getch(); |
|
|
|