jason4short

Results issues of jason4short

Randy, This isn't a request to pull the simple gimbal demo. It's for the exit_mode() changes in flight_mode.pde. These are needed to restore manual control to the gimbal after an...

Either remove constraint or offer additional API for setting PWM. Thanks! Jason void APM_RC_APM1::OutputCh(uint8_t ch, uint16_t pwm) { pwm=constrain(pwm,MIN_PULSEWIDTH,MAX_PULSEWIDTH); pwm

get_roll_rate_stabilized_ef(int32_t stick_angle) ... // ensure that we don't reach gimbal lock if (labs(roll_axis > 4500) && g.acro_trainer_enabled) { should be: ``` if (labs(roll_axis) > 4500 && g.acro_trainer_enabled) { ```

These values for yaw are calculated twice: OK: sin_yaw_y = yawvector.x; // 1y = north cos_yaw_x = yawvector.y; // 0x = north Recently added: sin_yaw = constrain(temp.b.x/cos_pitch_x, -1.0, 1.0); cos_yaw...

Lat used twice. ``` // update next_WP location for reporting purposes set_next_WP_latlon( home.lat + loiter_lat_from_home_cm / LATLON_TO_CM, home.lng + loiter_lat_from_home_cm / LATLON_TO_CM * scaleLongUp); ``` }

loiter_lat_from_home_cm is repeated in multiple places where loiter_lon_from_home_cm should be used. loiter_set_pos_from_velocity() and loiter_set_target() public function loiter_set_target(lat_from_home_cm:Number, lon_from_home_cm:Number):void { loiter_lat_from_home_cm = lat_from_home_cm; loiter_lon_from_home_cm = lon_from_home_cm; ``` // update next_WP location...

``` // wpinav_set_origin_and_destination - set origin and destination using lat/lon coordinates public function wpinav_set_origin_and_destination(origin:Location, destination:Location):void { //trace("wpinav_set_origin_and_destination", destination); wpinav_origin.x = (origin.lat-home.lat) * LATLON_TO_CM; wpinav_origin.y = (origin.lng-home.lng) * LATLON_TO_CM * scaleLongDown;...

Enhancement
Copter

need to edit the following line to the auto_disarming function to include check for motors armed(). Arducopter.pde (in the slow loop) ``` if((control_mode

I would suggest while calling init_disarm_motors we also include a mode change to stabilize. See below at the end of the function call: static void init_disarm_motors() { # if HIL_MODE...

Copter

If the user is in RTL, pulls the throttle low, then enters any other AP mode (such as Land) the engines will stop and the copter will fall. try it...