hi all
I’m trying to start motors one by one before arming sequences
I try several ways
I added a step in AP_MotorsMultirors::output_logic
I stuffed this step between SHUT_DOWN and SPIN_WHEN_ARMED
case SPIN_1BY1:{
// set limits flags
limit.roll_pitch = true;
limit.yaw = true;
limit.throttle_lower = true;
limit.throttle_upper = true;
_spin_up_ratio = 1.0f;
if (motorcnt>=AP_MOTORS_MAX_NUM_MOTORS)
{
hal.console->printf("[%d] to armed\n",now);
_spool_mode = SPIN_WHEN_ARMED;
lastcall=now;
motorcnt=0;
}
else
if(now-lastcall>=500)
{
int16_t motor_out;
motor_out = 1200;//calc_spin_up_to_pwm();//get_pwm_output_min();
hal.console->printf("[%d] motor %d set to %d enable=%d\n",now,motorcnt,
motor_out,motor_enabled[motorcnt]);
lastcall=now;
if(motor_enabled[motorcnt])
rc_write(motorcnt, motor_out);
motorcnt++;
}
}
break;
I tried to move it after SPIN_WHEN_ARM i tryed to change the value setted by rcwrite
nothing change the motor stays mute until it arrives at SPIN_WHEN_ARM
anybody can explain me a bit more where are realy setted the pwm channel i’m in multirotors frame
thank’s for any help