Oops... red herring, looking at the dataflash log outside of Mission Planner I'm not seeing the extra value I've asked to be logged.
Here's the tweaked current log structs:
struct PACKED log_Current {
LOG_PACKET_HEADER;
int16_t throttle_in;
uint32_t throttle_integrator;
int16_t battery_voltage;
int16_t current_amps;
uint16_t board_voltage;
float current_total;
float temp_sensor;
};
// Write an Current data packet
static void Log_Write_Current()
{
struct log_Current pkt = {
LOG_PACKET_HEADER_INIT(LOG_CURRENT_MSG),
throttle_in : g.rc_3.control_in,
throttle_integrator : throttle_integrator,
battery_voltage : (int16_t) (battery_voltage1 * 100.0f),
current_amps : (int16_t) (current_amps1 * 100.0f),
board_voltage : board_voltage(),
current_total : current_total1,
temp_sensor : temp_sensor1
};
DataFlash.WriteBlock(&pkt, sizeof(pkt));
}
...and the modified parameter description block:
static const struct LogStructure log_structure[] PROGMEM = {
LOG_COMMON_STRUCTURES,
{ LOG_CURRENT_MSG, sizeof(log_Current),
"CURR", "hIhhhf", "Thr,ThrInt,Volt,Curr,Vcc,CurrTot,TempSens" },
....
temp_sensor1 is a static float declared along with the battery monitor variables, and it is definitely being filled in correctly (I see the right value when i pump it into one of the existing logging variables, e.g. current_total1).
What am I missing? Any advice appreciated, thanks all.