mirror of https://github.com/ArduPilot/ardupilot
Plane: log mode number as well as mode string
this makes graphing mode changes easier
This commit is contained in:
parent
a64d067749
commit
bdf0a2da69
|
@ -347,6 +347,7 @@ static void Log_Write_Nav_Tuning()
|
||||||
struct PACKED log_Mode {
|
struct PACKED log_Mode {
|
||||||
LOG_PACKET_HEADER;
|
LOG_PACKET_HEADER;
|
||||||
uint8_t mode;
|
uint8_t mode;
|
||||||
|
uint8_t mode_num;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Write a mode packet. Total length : 5 bytes
|
// Write a mode packet. Total length : 5 bytes
|
||||||
|
@ -354,7 +355,8 @@ static void Log_Write_Mode(uint8_t mode)
|
||||||
{
|
{
|
||||||
struct log_Mode pkt = {
|
struct log_Mode pkt = {
|
||||||
LOG_PACKET_HEADER_INIT(LOG_MODE_MSG),
|
LOG_PACKET_HEADER_INIT(LOG_MODE_MSG),
|
||||||
mode : mode
|
mode : mode,
|
||||||
|
mode_num : mode
|
||||||
};
|
};
|
||||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||||
}
|
}
|
||||||
|
@ -442,7 +444,7 @@ static const struct LogStructure log_structure[] PROGMEM = {
|
||||||
{ LOG_NTUN_MSG, sizeof(log_Nav_Tuning),
|
{ LOG_NTUN_MSG, sizeof(log_Nav_Tuning),
|
||||||
"NTUN", "CICCcc", "Yaw,WpDist,TargBrg,NavBrg,AltErr,Arspd" },
|
"NTUN", "CICCcc", "Yaw,WpDist,TargBrg,NavBrg,AltErr,Arspd" },
|
||||||
{ LOG_MODE_MSG, sizeof(log_Mode),
|
{ LOG_MODE_MSG, sizeof(log_Mode),
|
||||||
"MODE", "M", "Mode" },
|
"MODE", "MB", "Mode" },
|
||||||
{ LOG_CURRENT_MSG, sizeof(log_Current),
|
{ LOG_CURRENT_MSG, sizeof(log_Current),
|
||||||
"CURR", "hhhHf", "Thr,Volt,Curr,Vcc,CurrTot" },
|
"CURR", "hhhHf", "Thr,Volt,Curr,Vcc,CurrTot" },
|
||||||
{ LOG_COMPASS_MSG, sizeof(log_Compass),
|
{ LOG_COMPASS_MSG, sizeof(log_Compass),
|
||||||
|
|
Loading…
Reference in New Issue