DataFlash: Add Acceleration Feedforward to PID_Info.

This commit is contained in:
Robert Lefebvre 2015-05-22 19:57:49 -04:00 committed by Andrew Tridgell
parent 810b12a1ac
commit 7ab628521e
2 changed files with 7 additions and 4 deletions

View File

@ -99,6 +99,7 @@ public:
float I;
float D;
float FF;
float AFF;
};
void Log_Write_PID(uint8_t msg_type, const PID_Info &info);
@ -442,6 +443,7 @@ struct PACKED log_PID {
float I;
float D;
float FF;
float AFF;
};
struct PACKED log_Current {
@ -635,11 +637,11 @@ Format characters in the format string for binary log messages
{ LOG_MODE_MSG, sizeof(log_Mode), \
"MODE", "QMB", "TimeUS,Mode,ModeNum" }
{ LOG_PIDR_MSG, sizeof(log_PID), \
"PIDR", "Qffff", "TimeUS,P,I,D,FF" }, \
"PIDR", "Qfffff", "TimeUS,P,I,D,FF,AFF" }, \
{ LOG_PIDP_MSG, sizeof(log_PID), \
"PIDP", "Qffff", "TimeUS,P,I,D,FF" }, \
"PIDP", "Qfffff", "TimeUS,P,I,D,FF,AFF" }, \
{ LOG_PIDY_MSG, sizeof(log_PID), \
"PIDY", "Qffff", "TimeUS,P,I,D,FF" }
"PIDY", "Qfffff", "TimeUS,P,I,D,FF,AFF" }
// messages for more advanced boards
#define LOG_EXTRA_STRUCTURES \

View File

@ -1337,7 +1337,8 @@ void DataFlash_Class::Log_Write_PID(uint8_t msg_type, const PID_Info &info)
P : info.P,
I : info.I,
D : info.D,
FF : info.FF
FF : info.FF,
AFF : info.AFF
};
WriteBlock(&pkt, sizeof(pkt));
}