mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-24 17:48:35 -04:00
Copter: move should_log check of log bitmask into DataFlash
This commit is contained in:
parent
4dfdffde43
commit
cfbde937c6
@ -21,7 +21,7 @@ const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
|||||||
constructor for main Copter class
|
constructor for main Copter class
|
||||||
*/
|
*/
|
||||||
Copter::Copter(void) :
|
Copter::Copter(void) :
|
||||||
DataFlash{FIRMWARE_STRING},
|
DataFlash{FIRMWARE_STRING, g.log_bitmask},
|
||||||
flight_modes(&g.flight_mode1),
|
flight_modes(&g.flight_mode1),
|
||||||
mission(ahrs,
|
mission(ahrs,
|
||||||
FUNCTOR_BIND_MEMBER(&Copter::start_command, bool, const AP_Mission::Mission_Command &),
|
FUNCTOR_BIND_MEMBER(&Copter::start_command, bool, const AP_Mission::Mission_Command &),
|
||||||
|
@ -491,10 +491,7 @@ void Copter::check_usb_mux(void)
|
|||||||
bool Copter::should_log(uint32_t mask)
|
bool Copter::should_log(uint32_t mask)
|
||||||
{
|
{
|
||||||
#if LOGGING_ENABLED == ENABLED
|
#if LOGGING_ENABLED == ENABLED
|
||||||
if (!(mask & g.log_bitmask)) {
|
if (!DataFlash.should_log(mask)) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!DataFlash.should_log()) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
start_logging();
|
start_logging();
|
||||||
|
Loading…
Reference in New Issue
Block a user