Rover: Log_Write_Startup writes parameters

This commit is contained in:
Randy Mackay 2015-06-01 20:14:27 +09:00
parent 7d1bf75aa8
commit 31aae1f019
2 changed files with 7 additions and 7 deletions

View File

@ -225,6 +225,9 @@ struct PACKED log_Startup {
void Rover::Log_Write_Startup(uint8_t type)
{
// Write all current parameters
DataFlash.Log_Write_Parameters();
struct log_Startup pkt = {
LOG_PACKET_HEADER_INIT(LOG_STARTUP_MSG),
time_us : hal.scheduler->micros64(),
@ -234,7 +237,9 @@ void Rover::Log_Write_Startup(uint8_t type)
DataFlash.WriteBlock(&pkt, sizeof(pkt));
// write all commands to the dataflash as well
Log_Write_EntireMission();
if (should_log(MASK_LOG_CMD)) {
Log_Write_EntireMission();
}
}
void Rover::Log_Write_EntireMission()

View File

@ -210,13 +210,8 @@ void Rover::init_ardupilot()
}
#endif
// Write all current parameters
DataFlash.Log_Write_Parameters();
startup_ground();
if (should_log(MASK_LOG_CMD)) {
Log_Write_Startup(TYPE_GROUNDSTART_MSG);
}
Log_Write_Startup(TYPE_GROUNDSTART_MSG);
set_mode((enum mode)g.initial_mode.get());