added scanner status indicator and enabled the scanner on android

This commit is contained in:
AlexandreRouma 2022-08-31 14:59:22 +02:00
parent 6d784dfe27
commit 9f0daf7d45
2 changed files with 11 additions and 0 deletions

View File

@ -278,6 +278,7 @@ int sdrpp_main(int argc, char* argv[]) {
core::configManager.conf["modules"][modCount++] = "frequency_manager.so"; core::configManager.conf["modules"][modCount++] = "frequency_manager.so";
core::configManager.conf["modules"][modCount++] = "recorder.so"; core::configManager.conf["modules"][modCount++] = "recorder.so";
core::configManager.conf["modules"][modCount++] = "rigctl_server.so"; core::configManager.conf["modules"][modCount++] = "rigctl_server.so";
core::configManager.conf["modules"][modCount++] = "scanner.so";
#endif #endif
// Fix missing elements in config // Fix missing elements in config

View File

@ -102,11 +102,21 @@ private:
if (ImGui::Button("Start##scanner_start", ImVec2(menuWidth, 0))) { if (ImGui::Button("Start##scanner_start", ImVec2(menuWidth, 0))) {
_this->start(); _this->start();
} }
ImGui::Text("Status: Idle");
} }
else { else {
if (ImGui::Button("Stop##scanner_start", ImVec2(menuWidth, 0))) { if (ImGui::Button("Stop##scanner_start", ImVec2(menuWidth, 0))) {
_this->stop(); _this->stop();
} }
if (_this->receiving) {
ImGui::TextColored(ImVec4(0, 1, 0, 1), "Status: Receiving");
}
else if (_this->tuning) {
ImGui::TextColored(ImVec4(0, 1, 1, 1), "Status: Tuning");
}
else {
ImGui::TextColored(ImVec4(1, 1, 0, 1), "Status: Scanning");
}
} }
} }