Modulation checked

pull/34/head
erikkaashoek 4 years ago
parent 7bc20dc1f6
commit 419e810ed3

@ -2908,8 +2908,8 @@ static const int am_modulation[MODULATION_STEPS] = { 5, 1, 0, 1, 5, 9, 11, 9 };
// //
#define LND 96 #define LND 96
#define HND 48 #define HND 48
#define LWD 512 #define LWD 1024
#define HWD 256 #define HWD 512
#endif #endif
#define S1 1.5 #define S1 1.5
@ -3162,7 +3162,13 @@ pureRSSI_t perform(bool break_on_operation, int i, freq_t f, int tracking) /
if (setting.mode == M_GENLOW) {// if in low output mode and level sweep or frequency weep is active or at start of sweep if (setting.mode == M_GENLOW) {// if in low output mode and level sweep or frequency weep is active or at start of sweep
#ifdef TINYSA4 #ifdef TINYSA4
if (test_output) { if (test_output) {
if (f < MAX_LOW_OUTPUT_FREQ || setting.mixer_output)
enable_rx_output(!test_output_switch); enable_rx_output(!test_output_switch);
else
enable_direct(!test_output_switch);
if (f > MAX_LOW_OUTPUT_FREQ && !setting.mixer_output)
ADF4351_drive(test_output_drive);
else
SI4463_set_output_level(test_output_drive); SI4463_set_output_level(test_output_drive);
PE4302_Write_Byte(test_output_attenuate); PE4302_Write_Byte(test_output_attenuate);
} else } else
@ -3441,7 +3447,7 @@ modulation_again:
#endif #endif
} }
} else if (setting.mode == M_GENLOW) { } else if (setting.mode == M_GENLOW) {
if (ultra && (f > ultra_start || (!setting.mixer_output && f > MAX_LOW_OUTPUT_FREQ))) { // Ultra mode output using both SI and ADF if (ultra && (f > ultra_start || (setting.mixer_output && f > MAX_LOW_OUTPUT_FREQ))) { // Ultra mode output using both SI and ADF
if (!SI4463_is_in_tx_mode()) if (!SI4463_is_in_tx_mode())
SI4463_init_tx(); SI4463_init_tx();
enable_ADF_output(true); enable_ADF_output(true);
@ -4413,9 +4419,9 @@ static bool sweep(bool break_on_operation)
int refreshing = false; int refreshing = false;
if (MODE_OUTPUT(setting.mode) && config.cor_nfm == 0) { // Calibrate the modulation frequencies at first use if (MODE_OUTPUT(setting.mode) && config.cor_nfm == 0) { // Calibrate the modulation frequencies at first use
#ifndef TINYSA4 //#ifndef TINYSA4
calibrate_modulation(MO_AM, &config.cor_am); // No AM mondulation for now calibrate_modulation(MO_AM, &config.cor_am); // No AM mondulation for now
#endif //#endif
calibrate_modulation(MO_NFM, &config.cor_nfm); calibrate_modulation(MO_NFM, &config.cor_nfm);
calibrate_modulation(MO_WFM, &config.cor_wfm); calibrate_modulation(MO_WFM, &config.cor_wfm);
} }
@ -6892,7 +6898,7 @@ void calibrate_modulation(int modulation, int8_t *correction)
{ {
if (*correction == 0) { if (*correction == 0) {
setting.modulation = modulation; setting.modulation = modulation;
setting.modulation_frequency = 5000; setting.modulation_frequency = 7000;
in_selftest = true; in_selftest = true;
perform(false,0, 30000000, false); perform(false,0, 30000000, false);
perform(false,1, 30000000, false); perform(false,1, 30000000, false);

@ -2517,8 +2517,8 @@ static const menuitem_t menu_sweep[] = {
}; };
#ifdef TINYSA4 #ifdef TINYSA4
static const menuitem_t menu_lowoutput_settings[] = { static const menuitem_t menu_lowoutput_settings[] = {
{ MT_FORM | MT_ADV_CALLBACK, 1, "SQUARE WAVE max 4.4GHz", menu_lowoutput_settings_acb}, { MT_FORM | MT_ADV_CALLBACK, 0, "SQUARE WAVE max 4.4GHz", menu_lowoutput_settings_acb},
{ MT_FORM | MT_ADV_CALLBACK, 0, "MIXER max 5.4GHz", menu_lowoutput_settings_acb}, { MT_FORM | MT_ADV_CALLBACK, 1, "MIXER max 5.4GHz", menu_lowoutput_settings_acb},
{ MT_FORM | MT_SUBMENU, 255, S_RARROW" Settings", menu_settings}, { MT_FORM | MT_SUBMENU, 255, S_RARROW" Settings", menu_settings},
{ MT_FORM | MT_NONE, 0, NULL, menu_back} // next-> menu_back { MT_FORM | MT_NONE, 0, NULL, menu_back} // next-> menu_back
}; };

Loading…
Cancel
Save

Powered by TurnKey Linux.