Sub: remove pointless zero-initialisation

This commit is contained in:
Peter Barker 2018-10-08 11:45:00 +11:00 committed by Peter Barker
parent 8985cc05c7
commit ecd69e4359
2 changed files with 2 additions and 18 deletions

View File

@ -30,20 +30,7 @@ Sub::Sub()
scaleLongDown(1),
auto_mode(Auto_WP),
guided_mode(Guided_WP),
circle_pilot_yaw_override(false),
initial_armed_bearing(0),
desired_climb_rate(0),
loiter_time_max(0),
loiter_time(0),
climb_rate(0),
target_rangefinder_alt(0.0f),
auto_yaw_mode(AUTO_YAW_LOOK_AT_NEXT_WP),
yaw_look_at_WP_bearing(0.0f),
yaw_look_at_heading(0),
yaw_look_at_heading_slew(0),
yaw_look_ahead_bearing(0.0f),
condition_value(0),
condition_start(0),
G_Dt(MAIN_LOOP_SECONDS),
inertial_nav(ahrs),
ahrs_view(ahrs, ROTATION_NONE),
@ -52,8 +39,7 @@ Sub::Sub()
wp_nav(inertial_nav, ahrs_view, pos_control, attitude_control),
loiter_nav(inertial_nav, ahrs_view, pos_control, attitude_control),
circle_nav(inertial_nav, ahrs_view, pos_control),
param_loader(var_info),
last_pilot_yaw_input_ms(0)
param_loader(var_info)
{
memset(&current_loc, 0, sizeof(current_loc));
@ -61,8 +47,6 @@ Sub::Sub()
sensor_health.baro = true;
sensor_health.compass = true;
failsafe.last_heartbeat_ms = 0;
#if CONFIG_HAL_BOARD != HAL_BOARD_SITL
failsafe.pilot_input = true;
#endif

View File

@ -444,7 +444,7 @@ private:
uint32_t last_pilot_heading;
uint32_t last_pilot_yaw_input_ms;
uint32_t fs_terrain_recover_start_ms = 0;
uint32_t fs_terrain_recover_start_ms;
static const AP_Scheduler::Task scheduler_tasks[];
static const AP_Param::Info var_info[];