From e09c69fbaab847c8001aaeb8178a944ff2019047 Mon Sep 17 00:00:00 2001 From: Jonas Holmberg Date: Mon, 7 Nov 2016 16:57:59 +0100 Subject: [PATCH] small things --- UAV-ControlSystem/src/Flight/pid.c | 2 -- UAV-ControlSystem/src/config/cli.c | 12 ++++++------ UAV-ControlSystem/src/drivers/accel_gyro.c | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/UAV-ControlSystem/src/Flight/pid.c b/UAV-ControlSystem/src/Flight/pid.c index 6ef9db6..d4cc9d5 100644 --- a/UAV-ControlSystem/src/Flight/pid.c +++ b/UAV-ControlSystem/src/Flight/pid.c @@ -558,8 +558,6 @@ void pidInit() void pidEproom(void) { - PidProfile[PID_ID_ACCELEROMETER].PIDweight[ROLL] = 2; - PidProfile[PID_ID_ACCELEROMETER].PIDweight[PITCH] = 2; PidProfile[PID_ID_ACCELEROMETER].PIDweight[YAW] = 100; PidProfileBuff[PID_ID_GYRO].dT = SystemTasks[TASK_GYROPID].desiredPeriod/1000; //�NDRA TILL SEKUNDER inte ms diff --git a/UAV-ControlSystem/src/config/cli.c b/UAV-ControlSystem/src/config/cli.c index 1d7cb04..5f5bee6 100644 --- a/UAV-ControlSystem/src/config/cli.c +++ b/UAV-ControlSystem/src/config/cli.c @@ -31,7 +31,7 @@ #define commandValueError 0xFFFFFFFFFFFFFFFF #define minSimilarCharacters 2 //the minimum amount of characters needed to to a search on a value -#define maxSimilarSearchValues 15 //max amount of values that will be found when doing a search for similar strings based on the written chars +#define maxSimilarSearchValues 18 //max amount of values that will be found when doing a search for similar strings based on the written chars #define CLI_baudRate 115200 //The baudrate used for the CLI usart #define msgArraySize 3 //The number of words that a max command can contain (ex: set looptime 1000) @@ -121,11 +121,11 @@ const typeString commandActionInformation_Strings[ACTION_COUNT] = { "| reboot - Exit CLI and reboots the system.\n\r", "| reset - Restore all the values to its default values.\n\r", "| stats - Gives some current stats of the system and tasks.\n\r", - "| calibrate_motors - Calibrates all motors.", - "| calibrate_gyro - Calibrates the gyro.", - "| calibrate_accelerometer - Calibrates the accelerometer.", - "| calibrate_compass - Calibrates the compass.", - "| calibration_info_accelerometer - Provides info on the accelerometer calibration." + "| calibrate_motors - Calibrates all motors.\n\r", + "| calibrate_gyro - Calibrates the gyro.\n\r", + "| calibrate_accelerometer - Calibrates the accelerometer.\n\r", + "| calibrate_compass - Calibrates the compass.\n\r", + "| calibration_info_accelerometer - Provides info on the accelerometer calibration.\n\r" }; /* String array containing all the signature examples for each action */ diff --git a/UAV-ControlSystem/src/drivers/accel_gyro.c b/UAV-ControlSystem/src/drivers/accel_gyro.c index bc019df..471f835 100644 --- a/UAV-ControlSystem/src/drivers/accel_gyro.c +++ b/UAV-ControlSystem/src/drivers/accel_gyro.c @@ -526,7 +526,7 @@ bool mpu6000_who_am_i() /* Set the Gyro Weight for Gyro/Acc complementary filter Increasing this value would reduce and delay Acc influence on the output of the filter*/ -#define GYRO_ACC_DIV_FACTOR (2^6) // that means a CMP_FACTOR of 1024 (2^10) +#define GYRO_ACC_DIV_FACTOR (2^8) // that means a CMP_FACTOR of 1024 (2^10) #define GetMagnitude(x) (x*x) #define Low_Magnitude (GetMagnitude(0.85))