mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
Version from esc_status topic added to sdlog2
This commit is contained in:
@@ -1126,6 +1126,7 @@ int sdlog2_thread_main(int argc, char *argv[])
|
|||||||
log_msg.body.log_ESC.esc_connectiontype = buf.esc.esc_connectiontype;
|
log_msg.body.log_ESC.esc_connectiontype = buf.esc.esc_connectiontype;
|
||||||
log_msg.body.log_ESC.esc_num = i;
|
log_msg.body.log_ESC.esc_num = i;
|
||||||
log_msg.body.log_ESC.esc_address = buf.esc.esc[i].esc_address;
|
log_msg.body.log_ESC.esc_address = buf.esc.esc[i].esc_address;
|
||||||
|
log_msg.body.log_ESC.esc_version = buf.esc.esc[i].esc_version;
|
||||||
log_msg.body.log_ESC.esc_voltage = buf.esc.esc[i].esc_voltage;
|
log_msg.body.log_ESC.esc_voltage = buf.esc.esc[i].esc_voltage;
|
||||||
log_msg.body.log_ESC.esc_current = buf.esc.esc[i].esc_current;
|
log_msg.body.log_ESC.esc_current = buf.esc.esc[i].esc_current;
|
||||||
log_msg.body.log_ESC.esc_rpm = buf.esc.esc[i].esc_rpm;
|
log_msg.body.log_ESC.esc_rpm = buf.esc.esc[i].esc_rpm;
|
||||||
|
|||||||
@@ -219,6 +219,7 @@ struct log_ESC_s {
|
|||||||
|
|
||||||
uint8_t esc_num;
|
uint8_t esc_num;
|
||||||
uint16_t esc_address;
|
uint16_t esc_address;
|
||||||
|
uint16_t esc_version;
|
||||||
uint16_t esc_voltage;
|
uint16_t esc_voltage;
|
||||||
uint16_t esc_current;
|
uint16_t esc_current;
|
||||||
uint16_t esc_rpm;
|
uint16_t esc_rpm;
|
||||||
@@ -247,7 +248,7 @@ static const struct log_format_s log_formats[] = {
|
|||||||
LOG_FORMAT(ARSP, "fff", "RollRateSP,PitchRateSP,YawRateSP"),
|
LOG_FORMAT(ARSP, "fff", "RollRateSP,PitchRateSP,YawRateSP"),
|
||||||
LOG_FORMAT(FLOW, "hhfffBB", "RawX,RawY,CompX,CompY,Dist,Q,SensID"),
|
LOG_FORMAT(FLOW, "hhfffBB", "RawX,RawY,CompX,CompY,Dist,Q,SensID"),
|
||||||
LOG_FORMAT(GPOS, "LLffff", "Lat,Lon,Alt,VelN,VelE,VelD"),
|
LOG_FORMAT(GPOS, "LLffff", "Lat,Lon,Alt,VelN,VelE,VelD"),
|
||||||
LOG_FORMAT(ESC, "HBBBHHHHHfH", "Counter,NumESC,Conn,No,Adr,Volt,Amp,RPM,Temp,SetP,SetPRAW"),
|
LOG_FORMAT(ESC, "HBBBHHHHHHfH", "Counter,NumESC,Conn,No,Version,Adr,Volt,Amp,RPM,Temp,SetP,SetPRAW"),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int log_formats_num = sizeof(log_formats) / sizeof(struct log_format_s);
|
static const int log_formats_num = sizeof(log_formats) / sizeof(struct log_format_s);
|
||||||
|
|||||||
Reference in New Issue
Block a user