sdlog2: Add system power to logging

This commit is contained in:
Lorenz Meier
2014-04-05 12:42:32 +02:00
parent 6ea22c8c07
commit da10565052
2 changed files with 39 additions and 0 deletions
+14
View File
@@ -316,6 +316,19 @@ struct log_ESTM_s {
// uint8_t kalman_gain_nan;
// };
/* --- PWR - ONBOARD POWER SYSTEM --- */
#define LOG_PWR_MSG 133
struct log_PWR_s {
float 5v_peripherals;
float 5v_servo_rail;
float 5v_servo_rssi;
uint8_t usb_ok;
uint8_t brick_ok;
uint8_t servo_ok;
uint8_t low_power_rail_overcurrent;
uint8_t high_power_rail_overcurrent;
};
#pragma pack(pop)
/* construct list of all message formats */
@@ -349,6 +362,7 @@ static const struct log_format_s log_formats[] = {
LOG_FORMAT(VER, "NZ", "Arch,FwGit"),
LOG_FORMAT(PARM, "Nf", "Name,Value"),
LOG_FORMAT(ESTM, "ffffffffffBBBB", "s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,n_states,states_nan,cov_nan,kgain_nan"),
LOG_FORMAT(PWR, "fffBBBBB", "5V_PERIPH, 5V_SRV,USB_OK,BRICK_OK,SRV_OK,PERIPH_OC,HIPWR_OC");
//LOG_FORMAT(ESTM, "ffffffffffffffffffffffffffffffffBBBB", "s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27,s28,s29,s30,s31,n_states,states_nan,cov_nan,kgain_nan"),
};