init dataflash before entering menu

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1900 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
mich146@hotmail.com 2011-04-17 06:45:18 +00:00
parent 0db3f100cc
commit fa7168c892
1 changed files with 7 additions and 5 deletions

View File

@ -172,6 +172,13 @@ void init_ardupilot()
pinMode(PUSHBUTTON_PIN, INPUT); // unused
DDRL |= B00000100; // Set Port L, pin 2 to output for the relay
// Logging:
// --------
DataFlash.Init(); // DataFlash log initialization
// setup the log bitmask
if (g.log_bitmask & MASK_LOG_SET_DEFAULTS)
default_log_bitmask();
// If the switch is in 'menu' mode, run the main menu.
//
// Since we can't be sure that the setup or test mode won't leave
@ -201,11 +208,6 @@ void init_ardupilot()
// Logging:
// --------
DataFlash.Init(); // DataFlash log initialization
// setup the log bitmask
if (g.log_bitmask & MASK_LOG_SET_DEFAULTS)
default_log_bitmask();
if(g.log_bitmask != 0){
// TODO - Here we will check on the length of the last log
// We don't want to create a bunch of little logs due to powering on and off