mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
fixed: freeze on touching in boot #57
This commit is contained in:
parent
0f24a6bd7f
commit
30d33571fa
10
plot.c
10
plot.c
|
|
@ -942,12 +942,16 @@ search_index_range_x(int x, uint32_t index[101], int *i0, int *i1)
|
||||||
i = (head + tail) / 2;
|
i = (head + tail) / 2;
|
||||||
if (x == CELL_X0(index[i]))
|
if (x == CELL_X0(index[i]))
|
||||||
break;
|
break;
|
||||||
|
else if (x < CELL_X0(index[i])) {
|
||||||
if (x < CELL_X0(index[i]))
|
if (tail == i+1)
|
||||||
|
break;
|
||||||
tail = i+1;
|
tail = i+1;
|
||||||
else
|
} else {
|
||||||
|
if (head == i)
|
||||||
|
break;
|
||||||
head = i;
|
head = i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (x != CELL_X0(index[i]))
|
if (x != CELL_X0(index[i]))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue