From bea9a9d558628ec76043a2febc95271a4d2286ad Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Jan 2013 10:25:09 +1100 Subject: [PATCH] Plane: move memcheck_init() earlier in setup() --- ArduPlane/ArduPlane.pde | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ArduPlane/ArduPlane.pde b/ArduPlane/ArduPlane.pde index 9ad9c9317b..9b2ccf6a17 100644 --- a/ArduPlane/ArduPlane.pde +++ b/ArduPlane/ArduPlane.pde @@ -661,6 +661,10 @@ AP_Mount camera_mount2(¤t_loc, g_gps, &ahrs, 1); AP_Param param_loader(var_info, WP_START_BYTE); void setup() { + // this needs to be the first call, as it fills memory with + // sentinel values + memcheck_init(); + cliSerial = hal.console; // load the default values of variables listed in var_info[] @@ -680,7 +684,6 @@ void setup() { batt_curr_pin = hal.analogin->channel(g.battery_curr_pin); airspeed.init(pitot_analog_source); - memcheck_init(); init_ardupilot(); }