mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 15:04:11 +00:00
Startup and communication bugfixes
- reduce amount of mode switched when starting and loading setups - improve logging for errors during HIL tests - fix small USB communication bugs
This commit is contained in:
parent
733d0ffbf4
commit
ca25969574
14 changed files with 148 additions and 44 deletions
|
|
@ -31,10 +31,6 @@ int ModeHandler::addMode(Mode *mode)
|
|||
modes.push_back(mode);
|
||||
currentModeIndex = int(modes.size()) - 1;
|
||||
connect(mode, &Mode::statusbarMessage, this, &ModeHandler::setStatusBarMessageChanged);
|
||||
|
||||
auto m = getMode(currentModeIndex);
|
||||
activate(m);
|
||||
|
||||
emit ModeCreated(currentModeIndex);
|
||||
return (currentModeIndex);
|
||||
}
|
||||
|
|
@ -166,7 +162,12 @@ void ModeHandler::closeMode(int index)
|
|||
void ModeHandler::closeModes()
|
||||
{
|
||||
while(modes.size() > 0) {
|
||||
closeMode(0);
|
||||
// skip active mode unless it is the last remaining mode
|
||||
if(activeMode == modes[0] && modes.size() > 1) {
|
||||
closeMode(1);
|
||||
} else {
|
||||
closeMode(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue