Small speed improvements

tinySA
erikkaashoek 6 years ago
parent 0d3152c984
commit 4b5e4dffdf

@ -5,8 +5,8 @@
# Compiler options here.
ifeq ($(USE_OPT),)
# USE_OPT = -O2 -fno-inline-small-functions -ggdb -fomit-frame-pointer -falign-functions=16 --specs=nano.specs -fstack-usage
USE_OPT = -fno-inline-small-functions -ggdb -fomit-frame-pointer -falign-functions=16 --specs=nano.specs -fstack-usage
USE_OPT = -O2 -fno-inline-small-functions -ggdb -fomit-frame-pointer -falign-functions=16 --specs=nano.specs -fstack-usage
# USE_OPT = -fno-inline-small-functions -ggdb -fomit-frame-pointer -falign-functions=16 --specs=nano.specs -fstack-usage
endif
# C specific options here (added to USE_OPT).

@ -610,7 +610,7 @@ void SI4432_SetReference(int freq);
// Speed profile definition
#define START_PROFILE systime_t time = chVTGetSystemTimeX();
#define STOP_PROFILE {char string_buf[12];plot_printf(string_buf, sizeof string_buf, "T:%06d", chVTGetSystemTimeX() - time);ili9341_drawstringV(string_buf, 1, 60);}
#define STOP_PROFILE {char string_buf[12];plot_printf(string_buf, sizeof string_buf, "T:%06d", chVTGetSystemTimeX() - time);ili9341_drawstringV(string_buf, 1, 180);}
// Macros for convert define value to string
#define STR1(x) #x
#define define_to_STR(x) STR1(x)

@ -577,6 +577,8 @@ static bool sweep(bool break_on_operation)
//again:
for (int i = 0; i < sweep_points; i++) {
RSSI = perform(break_on_operation, i, frequencies[i], setting_tracking);
//START_PROFILE
// back to toplevel to handle ui operation
if (operation_requested && break_on_operation)
return false;
@ -611,6 +613,7 @@ static bool sweep(bool break_on_operation)
}
if (temp_min_level > actual_t[i])
temp_min_level = actual_t[i];
//STOP_PROFILE
}
// if (setting_spur == 1) {
// setting_spur = -1;

@ -215,7 +215,7 @@ void SI4432_Set_Frequency ( long Freq ) {
int N = Freq / 10000000;
Carrier = ( 4 * ( Freq - N * 10000000 )) / 625;
int Freq_Band = ( N - 24 ) | ( hbsel << 5 ) | ( sbsel << 6 );
#if 1
#if 0
SI4432_Write_Byte ( 0x75, Freq_Band );
SI4432_Write_Byte ( 0x76, (Carrier>>8) & 0xFF );
SI4432_Write_Byte ( 0x77, Carrier & 0xFF );
@ -237,15 +237,17 @@ float SI4432_RSSI(uint32_t i, int s)
RSSI_RAW = Si446x_getRSSI();
} else
#endif
//START_PROFILE
SI4432_Sel = s;
chThdSleepMicroseconds(actualStepDelay);
RSSI_RAW = (unsigned char)SI4432_Read_Byte( 0x26 ) ;
// if (MODE_INPUT(setting_mode) && RSSI_RAW == 0)
// SI4432_Init();
float dBm = 0.5 * RSSI_RAW - 120.0 ;
float dBm = (RSSI_RAW-240)/2.0;
#ifdef __SIMULATION__
dBm = Simulated_SI4432_RSSI(i,s);
#endif
//STOP_PROFILE
// Serial.println(dBm,2);
return dBm ;
}

@ -187,7 +187,7 @@ static void menu_mode_cb(int item, uint8_t data)
{
(void)data;
SetMode(item-1);
draw_cal_status();
// draw_cal_status();
switch (item) {
case 1:
menu_push_submenu(menu_top);
@ -202,7 +202,7 @@ static void menu_mode_cb(int item, uint8_t data)
menu_push_submenu(menu_highoutputmode);
break;
}
draw_cal_status();
// draw_cal_status();
}
extern int dirty;

Loading…
Cancel
Save

Powered by TurnKey Linux.