From 5fc071f5f9bf25ccc14efa60498f6bbb9bc49889 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 21 Apr 2014 21:45:26 +0900 Subject: [PATCH] Copter: restore SITL to run at 100hz --- ArduCopter/config.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ArduCopter/config.h b/ArduCopter/config.h index 9d8070b11f..2c4b29fe2e 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -100,14 +100,16 @@ # define OPTFLOW DISABLED #endif -#if HAL_CPU_CLASS >= HAL_CPU_CLASS_75 - # define MAIN_LOOP_RATE 400 - # define MAIN_LOOP_SECONDS 0.0025 - # define MAIN_LOOP_MICROS 2500 -#else +#if HAL_CPU_CLASS < HAL_CPU_CLASS_75 || CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL + // low power CPUs (APM1, APM2 and SITL) # define MAIN_LOOP_RATE 100 # define MAIN_LOOP_SECONDS 0.01 # define MAIN_LOOP_MICROS 10000 +#else + // high power CPUs (Flymaple, PX4, Pixhawk, VRBrain) + # define MAIN_LOOP_RATE 400 + # define MAIN_LOOP_SECONDS 0.0025 + # define MAIN_LOOP_MICROS 2500 #endif //////////////////////////////////////////////////////////////////////////////