avoid unnecessary waits when there is no signal

This commit is contained in:
John
2023-01-06 11:39:13 +01:00
parent fe2849ec65
commit 780703c6ff
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -299,7 +299,7 @@ void MainLoop::run() {
reload = false;
}
}
if (!loadDelay) {
if (!loadDelay && m_busHandler->hasSignal()) {
lastScanAddress = m_busHandler->getNextScanAddress(lastScanAddress, scanCompleted >= SCAN_REPEAT_COUNT);
if (lastScanAddress == SYN) {
taskDelay = 5;
@@ -1825,6 +1825,9 @@ result_t MainLoop::executeScan(const vector<string>& args, const string& levels,
return RESULT_OK;
}
if (!m_busHandler->hasSignal()) {
return RESULT_ERR_NO_SIGNAL;
}
result_t result;
symbol_t dstAddress = (symbol_t)parseInt(args[1].c_str(), 16, 0, 0xff, &result);
if (result == RESULT_OK && !isValidAddress(dstAddress, false)) {