29 #define RADIO_CONTROL_DT (1./40.)
78 #define RADIO_CONTROL_TAKEOFF_TIME 8
145 if (((
int32_t)rint((time * 0.5))) % 2) {
160 if (((
int32_t)rint((time * 0.5))) % 2) {
174 if (((
int32_t)rint((time * 0.5))) % 2) {
#define MODE_SWITCH_MANUAL
int nps_radio_control_spektrum_init(const char *device)
struct NpsRadioControl nps_radio_control
int nps_radio_control_joystick_init(const char *device)
Initializes SDL and the joystick.
static void radio_control_script_step_pitch(double time)
void nps_radio_control_init(enum NpsRadioControlType type, int num_script, char *js_dev)
#define MODE_SWITCH_AUTO2
struct NpsJoystick nps_joystick
#define RADIO_CONTROL_TAKEOFF_TIME
static void radio_control_script_hover(double time)
bool nps_radio_control_available(double time)
void nps_radio_control_joystick_update(void)
Updates joystick buttons from events, directly reads current axis positions.
static void radio_control_script_takeoff(double time)
static void radio_control_script_step_roll(double time)
static rc_script scripts[]
static void radio_control_script_ff(double time)
void(* rc_script)(double)
enum NpsRadioControlType type
static void radio_control_script_step_yaw(double time)