Prevent proto list to be fetched when started in anything but "normal" mode

This commit is contained in:
Raphael Coeffic
2021-09-17 11:15:33 +02:00
parent 4d71f04dbe
commit c2588efbca
2 changed files with 5 additions and 1 deletions
@@ -226,6 +226,8 @@ void RadioSpectrumAnalyser::init()
if (moduleIdx == INTERNAL_MODULE &&
g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_NONE) {
reusableBuffer.spectrumAnalyser.moduleOFF = true;
// this needs to be set BEFORE the module is set to prevent proto list scanning
moduleState[moduleIdx].mode = MODULE_MODE_SPECTRUM_ANALYSER;
setModuleType(INTERNAL_MODULE, MODULE_TYPE_MULTIMODULE);
} else {
reusableBuffer.spectrumAnalyser.moduleOFF = false;
+3 -1
View File
@@ -205,7 +205,9 @@ void MultiRfProtocols::fillList(std::function<void(const RfProto&)> addProto) co
bool MultiRfProtocols::triggerScan()
{
if (scanState == ScanStop) {
if (scanState == ScanStop
&& moduleState[moduleIdx].mode == MODULE_MODE_NORMAL) {
proto2idx.clear();
protoList.clear();
scanState = ScanBegin;