Lowest drive -124, changed correction table

Removed_REF_marker
erikkaashoek 5 years ago
parent fbb3797017
commit 4926ad39cb

@ -1018,15 +1018,15 @@ config_t config = {
.high_level_output_offset = 0.0, // Uncalibrated .high_level_output_offset = 0.0, // Uncalibrated
.correction_frequency = .correction_frequency =
{ {
{ 10000, 100000, 300000, 1000000, 30000000, 500000000, 750000000, 1000000000, 1500000000, 1520000000, 2000000000, 2500000000, 3000000000, 3500000000, 4000000000, 4500000000, 5000000000, 5500000000, 6000000000, 6500000000 }, { 10000, 100000, 300000, 1000000, 30000000, 500000000, 750000000, 750000010, 1000000000, 1500000000, 1520000000, 2000000000, 2500000000, 3000000000, 3500000000, 4000000000, 4500000000, 5000000000, 5500000000, 6000000000 },
{ 10000, 100000, 300000, 1000000, 30000000, 500000000, 750000000, 1000000000, 1500000000, 1520000000, 2000000000, 2500000000, 3000000000, 3500000000, 4000000000, 4500000000, 5000000000, 5500000000, 6000000000, 6500000000 }, { 10000, 100000, 300000, 1000000, 30000000, 500000000, 750000000, 750000010, 1000000000, 1500000000, 1520000000, 2000000000, 2500000000, 3000000000, 3500000000, 4000000000, 4500000000, 5000000000, 5500000000, 6000000000 },
{ 10000, 100000, 300000, 1000000, 30000000, 500000000, 750000000, 1000000000, 1500000000, 1520000000, 2000000000, 2500000000, 3000000000, 3500000000, 4000000000, 4500000000, 5000000000, 5500000000, 6000000000, 6500000000 }, { 10000, 100000, 300000, 1000000, 30000000, 500000000, 750000000, 750000010, 1000000000, 1500000000, 1520000000, 2000000000, 2500000000, 3000000000, 3500000000, 4000000000, 4500000000, 5000000000, 5500000000, 6000000000 },
}, },
.correction_value = .correction_value =
{ {
{ 10.5, +4.9, +1.6, +0.6, 0, 0, +4, +2.5, +2, +2, +2, +3.5, +6.5, +6.5, +9, +9, +9, +11, +11, +11, }, { 10.5, +4.9, +1.6, +0.6, 0, 0, +2, +0, +2, +2, +2, +2, +3.5, +6.5, +6.5, +9, +9, +9, +11, +11,},
{ 10.5, +4.9, +1.6, +0.6, 0, 0, +4, +2.5, +2, +2, +2, +6, +9, +11.5, +14.5, +23, +25, +36, +46, +46, }, { 10.5, +4.9, +1.6, +0.6, 0, 0, +2, +0, +2, +2, +2, +2, +6, +9, +11.5, +14.5, +23, +25, +36, +46,},
{ 10.5, +4.9, +1.6, +0.6, 0, 0, +4, +2.5, +2, +2, +2, +3.5, +6.5, +6.5, +9, +9, +9, +11, +11, +11, }, { 10.5, +4.9, +1.6, +0.6, 0, 0, +2, +0, +2, +2, +2, +2, +3.5, +6.5, +6.5, +9, +9, +9, +11, +11,},
}, },
.setting_frequency_30mhz = 30000000, .setting_frequency_30mhz = 30000000,
.cor_am = 0, .cor_am = 0,

@ -95,7 +95,7 @@ const int8_t drive_dBm [16] = {-38, -32, -30, -27, -24, -19, -15, -12, -5, -2, 0
#define SL_GENHIGH_LEVEL_MIN (drive_dBm[MIN_DRIVE] - (config.high_out_adf4350 ? 0: 37 - config.switch_offset)) #define SL_GENHIGH_LEVEL_MIN (drive_dBm[MIN_DRIVE] - (config.high_out_adf4350 ? 0: 37 - config.switch_offset))
#define SL_GENHIGH_LEVEL_MAX drive_dBm[MAX_DRIVE] #define SL_GENHIGH_LEVEL_MAX drive_dBm[MAX_DRIVE]
#define SL_GENLOW_LEVEL_MIN -104 #define SL_GENLOW_LEVEL_MIN -124
#define SL_GENLOW_LEVEL_MAX -16 #define SL_GENLOW_LEVEL_MAX -16
@ -2551,6 +2551,7 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
float a = ((int)((setting.level + ((float)i / sweep_points) * ls)*2.0)) / 2.0; float a = ((int)((setting.level + ((float)i / sweep_points) * ls)*2.0)) / 2.0;
a += PURE_TO_float(get_frequency_correction(f)); a += PURE_TO_float(get_frequency_correction(f));
if (a != old_a) { if (a != old_a) {
int very_low_flag = false;
old_a = a; old_a = a;
a = a - level_max; // convert to all settings maximum power output equals a = zero a = a - level_max; // convert to all settings maximum power output equals a = zero
if (a < -SWITCH_ATTENUATION) { if (a < -SWITCH_ATTENUATION) {
@ -2560,6 +2561,7 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
set_switch_receive(); set_switch_receive();
#else #else
enable_rx_output(false); enable_rx_output(false);
very_low_flag = true;
#endif #endif
} else { } else {
#ifdef TINYSA3 #ifdef TINYSA3
@ -2567,11 +2569,16 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
set_switch_transmit(); set_switch_transmit();
#else #else
enable_rx_output(true); enable_rx_output(true);
#endif #endif
} }
#ifdef TINYSA4
#define LOWEST_LEVEL (very_low_flag ? 0 : MIN_DRIVE)
#else
#define LOWEST_LEVEL MIN_DRIVE
#endif
int d = MAX_DRIVE; // Reduce level till it fits in attenuator range int d = MAX_DRIVE; // Reduce level till it fits in attenuator range
while (a - BELOW_MAX_DRIVE(d) < - 31 && d > MIN_DRIVE) { while (a - BELOW_MAX_DRIVE(d) < - 31 && d > LOWEST_LEVEL) {
d--; d--;
} }
a -= BELOW_MAX_DRIVE(d); a -= BELOW_MAX_DRIVE(d);

Loading…
Cancel
Save

Powered by TurnKey Linux.