sdlog2: log mtecs mode

This commit is contained in:
Thomas Gubler 2014-05-30 19:43:58 +02:00
parent c94e358380
commit ca6e309ba0
2 changed files with 4 additions and 1 deletions

View File

@ -1508,6 +1508,7 @@ int sdlog2_thread_main(int argc, char *argv[])
log_msg.body.log_TECS.totalEnergyRate = buf.tecs_status.totalEnergyRate;
log_msg.body.log_TECS.energyDistributionRateSp = buf.tecs_status.energyDistributionRateSp;
log_msg.body.log_TECS.energyDistributionRate = buf.tecs_status.energyDistributionRate;
log_msg.body.log_TECS.mode = (uint8_t)buf.tecs_status.mode;
LOGBUFFER_WRITE_AND_COUNT(TECS);
}

View File

@ -362,6 +362,8 @@ struct log_TECS_s {
float totalEnergyRate;
float energyDistributionRateSp;
float energyDistributionRate;
uint8_t mode;
};
/********** SYSTEM MESSAGES, ID > 0x80 **********/
@ -419,7 +421,7 @@ static const struct log_format_s log_formats[] = {
LOG_FORMAT(GS0B, "BBBBBBBBBBBBBBBB", "s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15"),
LOG_FORMAT(GS1A, "BBBBBBBBBBBBBBBB", "s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15"),
LOG_FORMAT(GS1B, "BBBBBBBBBBBBBBBB", "s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15"),
LOG_FORMAT(TECS, "ffffffffffff", "AltSP,Alt,FpaSP,Fpa,AsSP,As,AsDSP,AsD,TERSP,TER,EDRSP,EDR"),
LOG_FORMAT(TECS, "ffffffffffffB", "AltSP,Alt,FpaSP,Fpa,AsSP,As,AsDSP,AsD,TERSP,TER,EDRSP,EDR,Mod"),
/* system-level messages, ID >= 0x80 */
/* FMT: don't write format of format message, it's useless */