|
|
@ -41,10 +41,9 @@ void Copter::Log_Write_Control_Tuning() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// get surface tracking alts
|
|
|
|
// get surface tracking alts
|
|
|
|
float desired_rangefinder_alt, rangefinder_alt; |
|
|
|
float desired_rangefinder_alt; |
|
|
|
if (!surface_tracking.get_dist_for_logging(desired_rangefinder_alt, rangefinder_alt)) { |
|
|
|
if (!surface_tracking.get_target_dist_for_logging(desired_rangefinder_alt)) { |
|
|
|
desired_rangefinder_alt = AP::logger().quiet_nan(); |
|
|
|
desired_rangefinder_alt = AP::logger().quiet_nan(); |
|
|
|
rangefinder_alt = AP::logger().quiet_nan();; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
struct log_Control_Tuning pkt = { |
|
|
|
struct log_Control_Tuning pkt = { |
|
|
@ -58,7 +57,7 @@ void Copter::Log_Write_Control_Tuning() |
|
|
|
inav_alt : inertial_nav.get_altitude() / 100.0f, |
|
|
|
inav_alt : inertial_nav.get_altitude() / 100.0f, |
|
|
|
baro_alt : baro_alt, |
|
|
|
baro_alt : baro_alt, |
|
|
|
desired_rangefinder_alt : desired_rangefinder_alt, |
|
|
|
desired_rangefinder_alt : desired_rangefinder_alt, |
|
|
|
rangefinder_alt : rangefinder_alt, |
|
|
|
rangefinder_alt : surface_tracking.get_dist_for_logging(), |
|
|
|
terr_alt : terr_alt, |
|
|
|
terr_alt : terr_alt, |
|
|
|
target_climb_rate : target_climb_rate_cms, |
|
|
|
target_climb_rate : target_climb_rate_cms, |
|
|
|
climb_rate : int16_t(inertial_nav.get_velocity_z()), // float -> int16_t
|
|
|
|
climb_rate : int16_t(inertial_nav.get_velocity_z()), // float -> int16_t
|
|
|
@ -463,7 +462,7 @@ const struct LogStructure Copter::log_structure[] = { |
|
|
|
{ LOG_PARAMTUNE_MSG, sizeof(log_ParameterTuning), |
|
|
|
{ LOG_PARAMTUNE_MSG, sizeof(log_ParameterTuning), |
|
|
|
"PTUN", "QBfff", "TimeUS,Param,TunVal,TunMin,TunMax", "s----", "F----" }, |
|
|
|
"PTUN", "QBfff", "TimeUS,Param,TunVal,TunMin,TunMax", "s----", "F----" }, |
|
|
|
{ LOG_CONTROL_TUNING_MSG, sizeof(log_Control_Tuning), |
|
|
|
{ LOG_CONTROL_TUNING_MSG, sizeof(log_Control_Tuning), |
|
|
|
"CTUN", "Qffffffefffhhf", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt,N", "s----mmmmmmnnz", "F----00B0B0BB-" }, |
|
|
|
"CTUN", "Qffffffefffhhf", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DSAlt,SAlt,TAlt,DCRt,CRt,N", "s----mmmmmmnnz", "F----00B000BB-" }, |
|
|
|
{ LOG_MOTBATT_MSG, sizeof(log_MotBatt), |
|
|
|
{ LOG_MOTBATT_MSG, sizeof(log_MotBatt), |
|
|
|
"MOTB", "Qffff", "TimeUS,LiftMax,BatVolt,BatRes,ThLimit", "s-vw-", "F-00-" }, |
|
|
|
"MOTB", "Qffff", "TimeUS,LiftMax,BatVolt,BatRes,ThLimit", "s-vw-", "F-00-" }, |
|
|
|
{ LOG_DATA_INT16_MSG, sizeof(log_Data_Int16t),
|
|
|
|
{ LOG_DATA_INT16_MSG, sizeof(log_Data_Int16t),
|
|
|
|