Browse Source

Rover: move should_log check of log bitmask into DataFlash

mission-4.1.18
Peter Barker 8 years ago committed by Francisco Ferreira
parent
commit
8697faa44f
  1. 2
      APMrover2/Rover.cpp
  2. 5
      APMrover2/system.cpp

2
APMrover2/Rover.cpp

@ -24,7 +24,7 @@ Rover::Rover(void) :
channel_steer(nullptr), channel_steer(nullptr),
channel_throttle(nullptr), channel_throttle(nullptr),
channel_learn(nullptr), channel_learn(nullptr),
DataFlash{FIRMWARE_STRING}, DataFlash{FIRMWARE_STRING, g.log_bitmask},
modes(&g.mode1), modes(&g.mode1),
L1_controller(ahrs, nullptr), L1_controller(ahrs, nullptr),
nav_controller(&L1_controller), nav_controller(&L1_controller),

5
APMrover2/system.cpp

@ -502,10 +502,7 @@ uint8_t Rover::check_digital_pin(uint8_t pin)
*/ */
bool Rover::should_log(uint32_t mask) bool Rover::should_log(uint32_t mask)
{ {
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…
Cancel
Save