Zero span uses do_api to avoid artifacts

multi_trace
erikkaashoek 5 years ago
parent abb3e59f16
commit fd35921ef2

@ -67,6 +67,7 @@
#define SI4432_SPI_SPEED SPI_BR_DIV2 #define SI4432_SPI_SPEED SPI_BR_DIV2
#endif #endif
//#define ADF_SPI_SPEED SPI_BR_DIV64 //#define ADF_SPI_SPEED SPI_BR_DIV64
//#define ADF_SPI_SPEED SPI_BR_DIV32 //#define ADF_SPI_SPEED SPI_BR_DIV32
#define ADF_SPI_SPEED SPI_BR_DIV2 #define ADF_SPI_SPEED SPI_BR_DIV2
@ -1173,7 +1174,7 @@ static char Si446x_readRSSI(void){
rssi = SPI_READ_8BIT(SI4432_SPI); // get last byte as FRR_A (rssi) rssi = SPI_READ_8BIT(SI4432_SPI); // get last byte as FRR_A (rssi)
SI_CS_HIGH; SI_CS_HIGH;
} while (rssi == 0); // Wait for latch to happen } while (rssi == 0); // Wait for latch to happen
#elif 1 #elif 0
SI_CS_LOW; SI_CS_LOW;
SI4463_WAIT_CTS; // Wait for CTS SI4463_WAIT_CTS; // Wait for CTS
SPI_WRITE_8BIT(SI4432_SPI, SI446X_CMD_GET_MODEM_STATUS); SPI_WRITE_8BIT(SI4432_SPI, SI446X_CMD_GET_MODEM_STATUS);
@ -1253,10 +1254,10 @@ void SI446x_Fill(int s, int start)
__disable_irq(); __disable_irq();
do { do {
#ifndef __USE_FFR_FOR_RSSI__ #ifndef __USE_FFR_FOR_RSSI__
age[i] = Si446x_readRSSI();
if (++i >= sweep_points) break;
if (t) if (t)
my_microsecond_delay(t); my_microsecond_delay(t);
age[i] = Si446x_readRSSI();
if (++i >= sweep_points) break;
#else #else
// DEBUG!! restart // DEBUG!! restart
SI_CS_LOW; SI_CS_LOW;
@ -1359,6 +1360,7 @@ int16_t Si446x_RSSI(void)
int i = setting.repeat; int i = setting.repeat;
if (setting.exp_aver == 1) if (setting.exp_aver == 1)
RSSI_RAW = 0; RSSI_RAW = 0;
// SI4463_WAIT_CTS; // Wait for CTS // SI4463_WAIT_CTS; // Wait for CTS
do{ do{
// if (MODE_INPUT(setting.mode) && RSSI_R // if (MODE_INPUT(setting.mode) && RSSI_R
@ -1366,6 +1368,8 @@ int16_t Si446x_RSSI(void)
int j = SAMPLE_COUNT; //setting.repeat; int j = SAMPLE_COUNT; //setting.repeat;
int RSSI_RAW_ARRAY[3]; int RSSI_RAW_ARRAY[3];
do{ do{
if (setting.step_delay)
my_microsecond_delay(setting.step_delay);
RSSI_RAW_ARRAY[--j] = Si446x_readRSSI(); RSSI_RAW_ARRAY[--j] = Si446x_readRSSI();
if (j == 0) break; if (j == 0) break;
// my_microsecond_delay(20); // my_microsecond_delay(20);
@ -1401,7 +1405,8 @@ int16_t Si446x_RSSI(void)
#endif #endif
#endif #endif
if (--i <= 0) break; if (--i <= 0) break;
my_microsecond_delay(100); // if (setting.repeat > 3)
// my_microsecond_delay(30);
}while(1); }while(1);
if (setting.repeat > 1 && setting.exp_aver == 1) if (setting.repeat > 1 && setting.exp_aver == 1)

Loading…
Cancel
Save

Powered by TurnKey Linux.