Merge pull request #83 from treymarc/format2

format
This commit is contained in:
dongie 2014-04-17 01:21:13 +09:00
commit d687afd109
4 changed files with 6 additions and 6 deletions

View File

@ -352,7 +352,7 @@ int getEstimatedAltitude(void)
if (calibratingB > 0) { if (calibratingB > 0) {
baroGroundPressure -= baroGroundPressure / 8; baroGroundPressure -= baroGroundPressure / 8;
baroGroundPressure += baroPressureSum / (cfg.baro_tab_size - 1); baroGroundPressure += baroPressureSum / (cfg.baro_tab_size - 1);
baroGroundAltitude = (1.0f - powf((baroGroundPressure / 8) / 101325.0f, 0.190295f)) * 4433000.0f; baroGroundAltitude = (1.0f - powf((baroGroundPressure / 8) / 101325.0f, 0.190295f)) * 4433000.0f;
vel = 0; vel = 0;
accAlt = 0; accAlt = 0;

View File

@ -122,8 +122,8 @@ void annexCode(void)
tmp2 = tmp / 100; tmp2 = tmp / 100;
rcCommand[axis] = lookupPitchRollRC[tmp2] + (tmp - tmp2 * 100) * (lookupPitchRollRC[tmp2 + 1] - lookupPitchRollRC[tmp2]) / 100; rcCommand[axis] = lookupPitchRollRC[tmp2] + (tmp - tmp2 * 100) * (lookupPitchRollRC[tmp2 + 1] - lookupPitchRollRC[tmp2]) / 100;
prop1 = 100 - (uint16_t) cfg.rollPitchRate * tmp / 500; prop1 = 100 - (uint16_t)cfg.rollPitchRate * tmp / 500;
prop1 = (uint16_t) prop1 *prop2 / 100; prop1 = (uint16_t)prop1 * prop2 / 100;
} else { // YAW } else { // YAW
if (cfg.yawdeadband) { if (cfg.yawdeadband) {
if (tmp > cfg.yawdeadband) { if (tmp > cfg.yawdeadband) {

View File

@ -45,7 +45,7 @@ static void spektrumDataReceive(uint16_t c)
{ {
uint32_t spekTime; uint32_t spekTime;
static uint32_t spekTimeLast, spekTimeInterval; static uint32_t spekTimeLast, spekTimeInterval;
static uint8_t spekFramePosition; static uint8_t spekFramePosition;
spekDataIncoming = true; spekDataIncoming = true;
spekTime = micros(); spekTime = micros();

View File

@ -4,7 +4,7 @@
** File : stm32_flash.ld ** File : stm32_flash.ld
** **
** Abstract : Linker script for STM32F103C8 Device with ** Abstract : Linker script for STM32F103C8 Device with
** 64KByte FLASH, 20KByte RAM ** 128KByte FLASH, 20KByte RAM
** **
***************************************************************************** *****************************************************************************
*/ */
@ -13,7 +13,7 @@
ENTRY(Reset_Handler) ENTRY(Reset_Handler)
/* Highest address of the user mode stack */ /* Highest address of the user mode stack */
_estack = 0x20005000; /* end of 10K RAM */ _estack = 0x20005000; /* end of 20K RAM */
/* Generate a link error if heap and stack don't fit into RAM */ /* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0; /* required amount of heap */ _Min_Heap_Size = 0; /* required amount of heap */