Plane: support multiple simultaneous backends
This commit is contained in:
parent
5d46a9add0
commit
574f95bd76
@ -222,8 +222,7 @@ struct PACKED log_Startup {
|
||||
uint16_t command_total;
|
||||
};
|
||||
|
||||
// do not add any extra log writes to this function; see LogStartup.cpp
|
||||
bool Plane::Log_Write_Startup(uint8_t type)
|
||||
void Plane::Log_Write_Startup(uint8_t type)
|
||||
{
|
||||
struct log_Startup pkt = {
|
||||
LOG_PACKET_HEADER_INIT(LOG_STARTUP_MSG),
|
||||
@ -231,7 +230,7 @@ bool Plane::Log_Write_Startup(uint8_t type)
|
||||
startup_type : type,
|
||||
command_total : mission.num_commands()
|
||||
};
|
||||
return DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||
}
|
||||
|
||||
struct PACKED log_Control_Tuning {
|
||||
|
@ -1158,6 +1158,10 @@ const AP_Param::Info Plane::var_info[] = {
|
||||
GOBJECT(camera_mount, "MNT", AP_Mount),
|
||||
#endif
|
||||
|
||||
// @Group: LOG
|
||||
// @Path: ../libraries/DataFlash/DataFlash.cpp
|
||||
GOBJECT(DataFlash, "LOG", DataFlash_Class),
|
||||
|
||||
// @Group: BATT
|
||||
// @Path: ../libraries/AP_BattMonitor/AP_BattMonitor.cpp
|
||||
GOBJECT(battery, "BATT", AP_BattMonitor),
|
||||
|
@ -324,6 +324,8 @@ public:
|
||||
k_param_pidNavPitchAltitude, // unused
|
||||
k_param_pidWheelSteer, // unused
|
||||
|
||||
k_param_DataFlash = 253, // Logging Group
|
||||
|
||||
// 254,255: reserved
|
||||
};
|
||||
|
||||
|
@ -738,7 +738,7 @@ private:
|
||||
void do_erase_logs(void);
|
||||
void Log_Write_Attitude(void);
|
||||
void Log_Write_Performance();
|
||||
bool Log_Write_Startup(uint8_t type);
|
||||
void Log_Write_Startup(uint8_t type);
|
||||
void Log_Write_Control_Tuning();
|
||||
void Log_Write_TECS_Tuning(void);
|
||||
void Log_Write_Nav_Tuning();
|
||||
|
Loading…
Reference in New Issue
Block a user