Merge branch 'tinySA-V4-SI4463' of https://github.com/erikkaashoek/tinySA into DiSlord_tinySA-V4-SI4463

Removed_REF_marker
DiSlord 5 years ago
commit f7b3f83e46

@ -401,6 +401,7 @@ void set_measurement(int);
// extern int settingSpeed;
//extern int setting.step_delay;
void sweep_remote(void);
void calculate_step_delay(void);
extern int generic_option_cmd( const char *cmd, const char *cmd_list, int argc, char *argv);
#ifdef TINYSA4
@ -1184,7 +1185,7 @@ typedef struct properties {
//sizeof(properties_t) == 0x1200
#define CONFIG_MAGIC 0x434f4e4e /* 'CONF' */
#define CONFIG_MAGIC 0x434f4e4f /* 'CONF' */
extern int16_t lastsaveid;
//extern properties_t *active_props;

@ -1447,7 +1447,7 @@ static const struct {
};
#endif
static void calculate_step_delay(void)
void calculate_step_delay(void)
{
if (setting.step_delay_mode == SD_MANUAL || setting.step_delay != 0) { // The latter part required for selftest 3
SI4432_step_delay = setting.step_delay;
@ -3111,7 +3111,11 @@ again: // Spur redu
#endif
else
{
#ifdef TINYSA4
local_IF = local_IF - DEFAULT_SPUR_OFFSET/4; // No spure removal and no spur, center in IF but avoid mirror
#else
local_IF = local_IF; // + DEFAULT_SPUR_OFFSET/2; // No spure removal and no spur, center in IF
#endif
}
}
}
@ -3159,13 +3163,10 @@ again: // Spur redu
#define TXCO_DIV3 10000000
if (setting.R == 0) {
#if 0
if (actual_rbw_x10 >= 3000) {
if (setting.mode == M_GENLOW) {
if (local_modulo == 0) ADF4351_modulo(1000);
ADF4351_R_counter(1);
} else
#endif
if (lf < 1000000000 /* && lf >= TXCO_DIV3 */ && MODE_INPUT(setting.mode)) {
if (local_modulo == 0) {
if (actual_rbw_x10 >= 3000)
@ -3177,7 +3178,7 @@ again: // Spur redu
if (tf + actual_rbw_x10*100 >= lf && tf < lf + actual_rbw_x10*100) { // 30MHz
ADF4351_R_counter(6);
} else {
if (setting.frequency_step < 100000) {
if (actual_rbw_x10 < 1000) {
freq_t tf = ((lf + actual_rbw_x10*1000) / TXCO_DIV3) * TXCO_DIV3;
if (tf + actual_rbw_x10*100 >= lf && tf < lf + actual_rbw_x10*100) // 10MHz
ADF4351_R_counter(4);

@ -517,6 +517,7 @@ static const menuitem_t menu_curve[];
static const menuitem_t menu_curve_confirm[];
#endif
static const menuitem_t menu_sweep[];
static const menuitem_t menu_settings[];
extern bool dirty;
char range_text[20];
@ -1999,7 +2000,7 @@ static const menuitem_t menu_lowoutputmode[] = {
#endif
{ MT_FORM | MT_KEYPAD, KM_EXT_GAIN, "EXTERNAL GAIN: %s", "-100..+100"},
#ifdef TINYSA4
{ MT_FORM | MT_SUBMENU, 255, S_RARROW" Settings", menu_settings3},
{ MT_FORM | MT_SUBMENU, 255, S_RARROW" Settings", menu_settings},
#endif
{ MT_FORM | MT_CANCEL, 0, "MODE", NULL },
{ MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel
@ -2443,7 +2444,7 @@ static const menuitem_t menu_actual_power[] =
static const menuitem_t menu_settings[] =
{
{ MT_ADV_CALLBACK | MT_LOW, 0,"LO OUTPUT", menu_lo_output_acb},
{ MT_SUBMENU, 0, "ACTUAL\nPOWER", menu_actual_power},
{ MT_SUBMENU, 0, "LEVEL\nCORRECTION", menu_actual_power},
{ MT_KEYPAD | MT_LOW, KM_IF, "IF FREQ", "0=auto IF"},
{ MT_SUBMENU,0, "SCAN SPEED", menu_scanning_speed},
#ifndef TINYSA4
@ -3301,7 +3302,7 @@ redraw_cal_status:
else
color = LCD_FG_COLOR;
ili9341_set_foreground(color);
if (dirty) update_rbw();
ili9341_drawstring("RBW:", x, y);
y += YSTEP;
plot_printf(buf, BLEN, "%.1FHz", actual_rbw_x10*100.0);
@ -3340,6 +3341,11 @@ redraw_cal_status:
strcpy(&buf[0],"Scan:");
ili9341_drawstring(buf, x, y);
if (dirty) {
calculate_step_delay();
setting.actual_sweep_time_us = calc_min_sweep_time_us();
}
#if 0 // Activate for sweep time debugging
y += YSTEP;
plot_printf(buf, BLEN, "%5.3Fs", (float)setting.sweep_time_us/ONE_SECOND_TIME);

Loading…
Cancel
Save

Powered by TurnKey Linux.