Пример #1
0
autoRC RC_create (double tmin, double tmax, long nt, double dt, double t1, long maxnCoefficients, double defaultLength) {
	try {
		autoRC me = Thing_new (RC);
		RC_init (me.get(), tmin, tmax, nt, dt, t1, maxnCoefficients, defaultLength);
		return me;
	} catch (MelderError) {
		Melder_throw (U"RC not crteated.");
	}
}
Пример #2
0
/**********************************************************************
 * Function: Drive_init
 * @return SUCCESS or FAILURE.
 * @remark Initializes the drive system state machine.
 * @author David Goodman
 * @date 2013.03.27 
 **********************************************************************/
bool Drive_init() {


    uint16_t RC_pins = MOTOR_LEFT  | MOTOR_RIGHT | RUDDER;
    RC_init(RC_pins);
    Timer_new(TIMER_DRIVE, 1);

#ifdef DEBUG
    // Timers for debug print statements
    Timer_new(TIMER_TEST2,1);
    Timer_new(TIMER_TEST3,1);
#endif

    state = STATE_IDLE;
}