Skip to content

Commit

Permalink
Merge pull request #21 from akadamson/master
Browse files Browse the repository at this point in the history
added delay to startup to allow gimbal to settle
  • Loading branch information
akadamson committed Nov 15, 2013
2 parents ab5e568 + 33296ae commit 2d9e3f5
Show file tree
Hide file tree
Showing 8 changed files with 2,874 additions and 2,856 deletions.
Binary file modified built-versions/0.4/STM32Gimbal.USB.bin
Binary file not shown.
Binary file modified built-versions/0.4/STM32Gimbal.bin
Binary file not shown.
5,711 changes: 2,858 additions & 2,853 deletions built-versions/0.4/STM32Gimbal.hex

Large diffs are not rendered by default.

Binary file modified built-versions/0.4/STM32Gimbal.zip
Binary file not shown.
6 changes: 5 additions & 1 deletion history.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,8 @@
- added acc007 changes for debug/desk config of board when no IMU is present
- updated attitude with paulphil changes for pitch greater than 45 degrees
- updated rc pwm detect for futaba receievers
- Released 0.4.4
- Released 0.4.4

20131115
- added delay to startup to allow gimbal to settle
- Released 0.4.5
2 changes: 1 addition & 1 deletion src/gyro.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void MPU6050_Gyro_get(float *GyroData)
void MPU6050_Gyro_calibration(void)
{
uint8_t i;
int loops = 100;
int loops = 150;
float InitGyroData[3];

for (i = 0; i < loops; i++)
Expand Down
9 changes: 9 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include "hw_config.h"
#include "stm32f10x_tim.h"

#define SETTLE_PAUSE 20

static volatile int WatchDogCounter;
static volatile int gotIMU = 0;

Expand Down Expand Up @@ -126,6 +128,13 @@ void setup(void)

if (gotIMU)
{
print("pausing for the gimbal to settle...\r\n");

for (int i = 0; i < SETTLE_PAUSE; i++)
{
Delay_ms(1000);
}

print("calibrating MPU6050 at %ums...\r\n", millis());
MPU6050_Gyro_calibration();

Expand Down
2 changes: 1 addition & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MAIN_H_

// software version number
#define __EV_VERSION "0.4.4"
#define __EV_VERSION "0.4.5"

float GetIdlePerf(void);

Expand Down

0 comments on commit 2d9e3f5

Please # to comment.