fix: #52. Previous fix 4e2036b was incomplete.

pull/58/head
TT 6 years ago
parent 064477291a
commit 0aeadaa213

@ -758,8 +758,10 @@ set_frequencies(uint32_t start, uint32_t stop, int16_t points)
{ {
int i; int i;
float span = stop - start; float span = stop - start;
for (i = 0; i < points; i++) for (i = 0; i < points; i++) {
frequencies[i] = start + i * span / (float)(points - 1); float offset = i * span / (float)(points - 1);
frequencies[i] = start + (uint32_t)offset;
}
// disable at out of sweep range // disable at out of sweep range
for (; i < sweep_points; i++) for (; i < sweep_points; i++)
frequencies[i] = 0; frequencies[i] = 0;

Loading…
Cancel
Save

Powered by TurnKey Linux.