Skip to content

Commit

Permalink
AP_ESC_Telem: log error count
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 committed Oct 20, 2024
1 parent 8c817f2 commit cfea266
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libraries/AP_ESC_Telem/AP_ESC_Telem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,8 @@ void AP_ESC_Telem::update()
esc_temp : telemdata.temperature_cdeg,
current_tot : telemdata.consumption_mah,
motor_temp : telemdata.motor_temp_cdeg,
error_rate : rpmdata.error_rate
error_rate : rpmdata.error_rate,
error_count : telemdata.error_count,
};
AP::logger().WriteBlock(&pkt, sizeof(pkt));

Expand Down
4 changes: 3 additions & 1 deletion libraries/AP_ESC_Telem/LogStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// @Field: CTot: current consumed total mAh
// @Field: MotTemp: measured motor temperature in centi-degrees C
// @Field: Err: error rate
// @Field: Errc: error count
struct PACKED log_Esc {
LOG_PACKET_HEADER;
uint64_t time_us;
Expand All @@ -29,8 +30,9 @@ struct PACKED log_Esc {
float current_tot;
int16_t motor_temp;
float error_rate;
uint32_t error_count;
};

#define LOG_STRUCTURE_FROM_ESC_TELEM \
{ LOG_ESC_MSG, sizeof(log_Esc), \
"ESC", "QBffffcfcf", "TimeUS,Instance,RPM,RawRPM,Volt,Curr,Temp,CTot,MotTemp,Err", "s#qqvAOaO%", "F-00--BCB-" , true },
"ESC", "QBffffcfcfI", "TimeUS,Instance,RPM,RawRPM,Volt,Curr,Temp,CTot,MotTemp,Err,ErrC", "s#qqvAOaO%-", "F-00--BCB-0" , true },

0 comments on commit cfea266

Please sign in to comment.