Prevent proto list to be fetched when started in anything but "normal" mode
This commit is contained in:
@@ -226,6 +226,8 @@ void RadioSpectrumAnalyser::init()
|
|||||||
if (moduleIdx == INTERNAL_MODULE &&
|
if (moduleIdx == INTERNAL_MODULE &&
|
||||||
g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_NONE) {
|
g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_NONE) {
|
||||||
reusableBuffer.spectrumAnalyser.moduleOFF = true;
|
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);
|
setModuleType(INTERNAL_MODULE, MODULE_TYPE_MULTIMODULE);
|
||||||
} else {
|
} else {
|
||||||
reusableBuffer.spectrumAnalyser.moduleOFF = false;
|
reusableBuffer.spectrumAnalyser.moduleOFF = false;
|
||||||
|
|||||||
@@ -205,7 +205,9 @@ void MultiRfProtocols::fillList(std::function<void(const RfProto&)> addProto) co
|
|||||||
|
|
||||||
bool MultiRfProtocols::triggerScan()
|
bool MultiRfProtocols::triggerScan()
|
||||||
{
|
{
|
||||||
if (scanState == ScanStop) {
|
if (scanState == ScanStop
|
||||||
|
&& moduleState[moduleIdx].mode == MODULE_MODE_NORMAL) {
|
||||||
|
|
||||||
proto2idx.clear();
|
proto2idx.clear();
|
||||||
protoList.clear();
|
protoList.clear();
|
||||||
scanState = ScanBegin;
|
scanState = ScanBegin;
|
||||||
|
|||||||
Reference in New Issue
Block a user