示例#1
0
void config_load(void)
{
	load_settings();
	load_gains();

	init_yawCntrl();
	init_rollCntrl();
	init_pitchCntrl();

	init_navigation();
	init_airspeedCntrl();
	init_altitudeCntrl();
	init_altitudeCntrlVariable();
}
示例#2
0
void init_config(void)
{
#if (USE_CONFIGFILE == 1)
	load_settings();
	load_config();
	load_gains();
#endif // USE_CONFIGFILE

	init_yawCntrl();
	init_rollCntrl();
//	init_pitchCntrl();

//	init_navigation();
	init_airspeedCntrl();
//	init_altitudeCntrl();
//	init_altitudeCntrlVariable();
}
示例#3
0
static int rx_cal_dc_off(struct rx_cal *cal, struct gain_mode *gains,
                        int16_t *dc_i, int16_t *dc_q)
{
    int status = BLADERF_ERR_UNEXPECTED;

    float mean_i, mean_q;

    status = load_gains(cal, gains);
    if (status != 0) {
        return status;
    }

    status = rx_samples(cal->dev, cal->samples, cal->num_samples,
                        &cal->ts, RX_CAL_TS_INC);
    if (status != 0) {
        return status;
    }

    sample_mean(cal->samples, cal->num_samples, &mean_i, &mean_q);
    *dc_i = float_to_int16(mean_i);
    *dc_q = float_to_int16(mean_q);

    return 0;
}