Sub: Remove baro_alt and baro_climbrate members
We can get this from baro object directly
This commit is contained in:
parent
3a501a42fb
commit
d0171395b8
@ -105,7 +105,7 @@ struct PACKED log_Control_Tuning {
|
|||||||
float throttle_hover;
|
float throttle_hover;
|
||||||
float desired_alt;
|
float desired_alt;
|
||||||
float inav_alt;
|
float inav_alt;
|
||||||
int32_t baro_alt;
|
float baro_alt;
|
||||||
int16_t desired_rangefinder_alt;
|
int16_t desired_rangefinder_alt;
|
||||||
int16_t rangefinder_alt;
|
int16_t rangefinder_alt;
|
||||||
float terr_alt;
|
float terr_alt;
|
||||||
@ -131,7 +131,7 @@ void Sub::Log_Write_Control_Tuning()
|
|||||||
throttle_hover : motors.get_throttle_hover(),
|
throttle_hover : motors.get_throttle_hover(),
|
||||||
desired_alt : pos_control.get_alt_target() / 100.0f,
|
desired_alt : pos_control.get_alt_target() / 100.0f,
|
||||||
inav_alt : inertial_nav.get_altitude() / 100.0f,
|
inav_alt : inertial_nav.get_altitude() / 100.0f,
|
||||||
baro_alt : baro_alt,
|
baro_alt : barometer.get_altitude(),
|
||||||
desired_rangefinder_alt : (int16_t)target_rangefinder_alt,
|
desired_rangefinder_alt : (int16_t)target_rangefinder_alt,
|
||||||
rangefinder_alt : rangefinder_state.alt_cm,
|
rangefinder_alt : rangefinder_state.alt_cm,
|
||||||
terr_alt : terr_alt,
|
terr_alt : terr_alt,
|
||||||
@ -434,7 +434,7 @@ const struct LogStructure Sub::log_structure[] = {
|
|||||||
{ LOG_NAV_TUNING_MSG, sizeof(log_Nav_Tuning),
|
{ LOG_NAV_TUNING_MSG, sizeof(log_Nav_Tuning),
|
||||||
"NTUN", "Qffffffffff", "TimeUS,DPosX,DPosY,PosX,PosY,DVelX,DVelY,VelX,VelY,DAccX,DAccY" },
|
"NTUN", "Qffffffffff", "TimeUS,DPosX,DPosY,PosX,PosY,DVelX,DVelY,VelX,VelY,DAccX,DAccY" },
|
||||||
{ LOG_CONTROL_TUNING_MSG, sizeof(log_Control_Tuning),
|
{ LOG_CONTROL_TUNING_MSG, sizeof(log_Control_Tuning),
|
||||||
"CTUN", "Qffffffeccfhh", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt" },
|
"CTUN", "Qfffffffccfhh", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt" },
|
||||||
{ LOG_PERFORMANCE_MSG, sizeof(log_Performance),
|
{ LOG_PERFORMANCE_MSG, sizeof(log_Performance),
|
||||||
"PM", "QHHIhBHII", "TimeUS,NLon,NLoop,MaxT,PMT,I2CErr,INSErr,LogDrop,Mem" },
|
"PM", "QHHIhBHII", "TimeUS,NLon,NLoop,MaxT,PMT,I2CErr,INSErr,LogDrop,Mem" },
|
||||||
{ LOG_MOTBATT_MSG, sizeof(log_MotBatt),
|
{ LOG_MOTBATT_MSG, sizeof(log_MotBatt),
|
||||||
|
@ -38,8 +38,6 @@ Sub::Sub(void) :
|
|||||||
loiter_time(0),
|
loiter_time(0),
|
||||||
climb_rate(0),
|
climb_rate(0),
|
||||||
target_rangefinder_alt(0.0f),
|
target_rangefinder_alt(0.0f),
|
||||||
baro_alt(0),
|
|
||||||
baro_climbrate(0.0f),
|
|
||||||
auto_yaw_mode(AUTO_YAW_LOOK_AT_NEXT_WP),
|
auto_yaw_mode(AUTO_YAW_LOOK_AT_NEXT_WP),
|
||||||
yaw_look_at_WP_bearing(0.0f),
|
yaw_look_at_WP_bearing(0.0f),
|
||||||
yaw_look_at_heading(0),
|
yaw_look_at_heading(0),
|
||||||
|
@ -327,8 +327,6 @@ private:
|
|||||||
// The cm/s we are moving up or down based on filtered data - Positive = UP
|
// The cm/s we are moving up or down based on filtered data - Positive = UP
|
||||||
int16_t climb_rate;
|
int16_t climb_rate;
|
||||||
float target_rangefinder_alt; // desired altitude in cm above the ground
|
float target_rangefinder_alt; // desired altitude in cm above the ground
|
||||||
int32_t baro_alt; // barometer altitude in cm above home
|
|
||||||
float baro_climbrate; // barometer climbrate in cm/s
|
|
||||||
|
|
||||||
// Turn counter
|
// Turn counter
|
||||||
int32_t quarter_turn_count;
|
int32_t quarter_turn_count;
|
||||||
|
@ -14,8 +14,6 @@ void Sub::read_barometer(void)
|
|||||||
if (should_log(MASK_LOG_IMU)) {
|
if (should_log(MASK_LOG_IMU)) {
|
||||||
Log_Write_Baro();
|
Log_Write_Baro();
|
||||||
}
|
}
|
||||||
baro_alt = barometer.get_altitude() * 100.0f;
|
|
||||||
baro_climbrate = barometer.get_climb_rate() * 100.0f;
|
|
||||||
|
|
||||||
sensor_health.depth = barometer.healthy(depth_sensor_idx);
|
sensor_health.depth = barometer.healthy(depth_sensor_idx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user