mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-03-27 01:45:28 +01:00
added autostart feature
This commit is contained in:
parent
747b6bfbc6
commit
663dd8d887
@ -18,6 +18,7 @@ void CommandArgsParser::defineAll() {
|
|||||||
define('p', "port", "Server mode port", 5259);
|
define('p', "port", "Server mode port", 5259);
|
||||||
define('r', "root", "Root directory, where all config files are stored", std::filesystem::absolute(root).string());
|
define('r', "root", "Root directory, where all config files are stored", std::filesystem::absolute(root).string());
|
||||||
define('s', "server", "Run in server mode");
|
define('s', "server", "Run in server mode");
|
||||||
|
define('\0', "autostart", "Automatically start the SDR after loading");
|
||||||
}
|
}
|
||||||
|
|
||||||
int CommandArgsParser::parse(int argc, char* argv[]) {
|
int CommandArgsParser::parse(int argc, char* argv[]) {
|
||||||
|
@ -221,6 +221,7 @@ void MainWindow::init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
autostart = core::args["autostart"].b();
|
||||||
initComplete = true;
|
initComplete = true;
|
||||||
|
|
||||||
core::moduleManager.doPostInitAll();
|
core::moduleManager.doPostInitAll();
|
||||||
@ -385,6 +386,12 @@ void MainWindow::draw() {
|
|||||||
}
|
}
|
||||||
if (playButtonLocked && !tmpPlaySate) { style::endDisabled(); }
|
if (playButtonLocked && !tmpPlaySate) { style::endDisabled(); }
|
||||||
|
|
||||||
|
// Handle auto-start
|
||||||
|
if (autostart) {
|
||||||
|
autostart = false;
|
||||||
|
setPlayState(true);
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
float origY = ImGui::GetCursorPosY();
|
float origY = ImGui::GetCursorPosY();
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ private:
|
|||||||
int selectedWindow = 0;
|
int selectedWindow = 0;
|
||||||
|
|
||||||
bool initComplete = false;
|
bool initComplete = false;
|
||||||
|
bool autostart = false;
|
||||||
|
|
||||||
EventHandler<VFOManager::VFO*> vfoCreatedHandler;
|
EventHandler<VFOManager::VFO*> vfoCreatedHandler;
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user