Add low output start burst

master
erikkaashoek 5 years ago
parent f7790b7fdc
commit add7cb225f

@ -907,6 +907,7 @@ config_t config = {
.cor_am = -14,
.cor_wfm = -17,
.cor_nfm = -17,
.sweep_voltage = 3.3,
};
//properties_t current_props;
@ -2348,6 +2349,7 @@ static const VNAShellCommand commands[] =
{"time" , cmd_time , 0},
#endif
{"dac" , cmd_dac , 0},
{"sweep_voltage",cmd_sweep_voltage,0},
{"saveconfig" , cmd_saveconfig , 0},
{"clearconfig" , cmd_clearconfig , 0},
{"data" , cmd_data , CMD_WAIT_MUTEX},

@ -527,6 +527,7 @@ typedef struct config {
int8_t cor_am;
int8_t cor_wfm;
int8_t cor_nfm;
float sweep_voltage;
uint32_t dummy;
// uint8_t _reserved[22];
freq_t checksum;

@ -119,7 +119,7 @@ float2int(float v)
void update_grid(void)
{
freq_t gdigit = 100000000;
freq_t gdigit = 1000000000;
freq_t fstart = get_sweep_frequency(ST_START);
freq_t fspan = get_sweep_frequency(ST_SPAN);
freq_t grid;

@ -246,6 +246,17 @@ VNA_SHELL_FUNCTION(cmd_deviceid)
}
}
VNA_SHELL_FUNCTION(cmd_sweep_voltage)
{
float value;
if (argc != 1) {
shell_printf("usage: sweep_voltage {value(0-3.3)}\r\n"\
"current value: %f\r\n", config.sweep_voltage);
return;
}
value = my_atof(argv[0]);
config.sweep_voltage = value;
}
VNA_SHELL_FUNCTION(cmd_rbw)
{

@ -1698,6 +1698,10 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
}
if (setting.mode == M_GENLOW && ( setting.frequency_step != 0 || setting.level_sweep != 0.0 || i == 0)) {// if in low output mode and level sweep or frequency weep is active or at start of sweep
if (i == 0)
set_switch_transmit();
else
set_switch_off();
float ls=setting.level_sweep; // calculate and set the output level
if (ls > 0)
ls += 0.5;
@ -2171,7 +2175,7 @@ sweep_again: // stay in sweep loop when output mo
return false;
}
dacPutChannelX(&DACD2, 0, i*14); // Output sweep voltage
dacPutChannelX(&DACD2, 0, (((float)i)*config.sweep_voltage)*4.279); // Output sweep voltage 4095 -> 3.3 Volt
// ----------------------- in loop AGC ---------------------------------

Loading…
Cancel
Save

Powered by TurnKey Linux.