mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
continue signal on cw mode
This commit is contained in:
parent
ef63476219
commit
fd38f249ce
8
main.c
8
main.c
|
|
@ -101,9 +101,11 @@ static void cmd_reset(BaseSequentialStream *chp, int argc, char *argv[])
|
||||||
|
|
||||||
int set_frequency(int freq)
|
int set_frequency(int freq)
|
||||||
{
|
{
|
||||||
int delay;
|
int delay = 0;
|
||||||
delay = si5351_set_frequency_with_offset(freq, frequency_offset, drive_strength);
|
if (frequency != freq) {
|
||||||
frequency = freq;
|
delay = si5351_set_frequency_with_offset(freq, frequency_offset, drive_strength);
|
||||||
|
frequency = freq;
|
||||||
|
}
|
||||||
return delay;
|
return delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
7
plot.c
7
plot.c
|
|
@ -450,6 +450,8 @@ float linear(float *v)
|
||||||
float swr(float *v)
|
float swr(float *v)
|
||||||
{
|
{
|
||||||
float x = sqrtf(v[0]*v[0] + v[1]*v[1]);
|
float x = sqrtf(v[0]*v[0] + v[1]*v[1]);
|
||||||
|
if (x > 1)
|
||||||
|
return INFINITY;
|
||||||
return (1 + x)/(1 - x);
|
return (1 + x)/(1 - x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -505,6 +507,11 @@ string_value_with_prefix(char *buf, int len, float val, char unit)
|
||||||
{
|
{
|
||||||
char prefix;
|
char prefix;
|
||||||
int n;
|
int n;
|
||||||
|
if (val < 0) {
|
||||||
|
val = -val;
|
||||||
|
*buf++ = '-';
|
||||||
|
len--;
|
||||||
|
}
|
||||||
if (val < 1e-12) {
|
if (val < 1e-12) {
|
||||||
prefix = 'f';
|
prefix = 'f';
|
||||||
val *= 1e15;
|
val *= 1e15;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue