mirror of https://github.com/ArduPilot/ardupilot
Tracker: move should_log check of log bitmask into DataFlash
This commit is contained in:
parent
4913fc2f2a
commit
075c40bd60
|
@ -125,7 +125,7 @@ void Tracker::ten_hz_logging_loop()
|
|||
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
||||
|
||||
Tracker::Tracker(void)
|
||||
: DataFlash{FIRMWARE_STRING}
|
||||
: DataFlash{FIRMWARE_STRING, g.log_bitmask}
|
||||
{
|
||||
memset(¤t_loc, 0, sizeof(current_loc));
|
||||
memset(&vehicle, 0, sizeof(vehicle));
|
||||
|
|
|
@ -255,10 +255,7 @@ void Tracker::check_usb_mux(void)
|
|||
*/
|
||||
bool Tracker::should_log(uint32_t mask)
|
||||
{
|
||||
if (!(mask & g.log_bitmask)) {
|
||||
return false;
|
||||
}
|
||||
if (!DataFlash.should_log()) {
|
||||
if (!DataFlash.should_log(mask)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue