Skip to content

Commit 23d1129

Browse files
author
timecop
committed
added test driver for software i2c. disabled by default. no, that wasn't the cause of cycletime jumps.
increased flash size to 128k, moved config data in last kbyte of that. as a result all settings are reset, please save them. corrected hex6x mixer. added telemetry to makefile. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@180 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
1 parent 829331c commit 23d1129

File tree

7 files changed

+2501
-2486
lines changed

7 files changed

+2501
-2486
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ COMMON_SRC = startup_stm32f10x_md_gcc.S \
4747
sensors.c \
4848
serial.c \
4949
spektrum.c \
50+
telemetry.c \
5051
drv_i2c.c \
5152
drv_system.c \
5253
drv_uart.c \

obj/baseflight.hex

+2,483-2,484
Large diffs are not rendered by default.

src/board.h

+2
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ typedef struct sensor_t
118118
#define BEEP_ON ;
119119
#endif
120120

121+
#undef SOFT_I2C // enable to test software i2c
122+
121123
#ifdef FY90Q
122124
// FY90Q
123125
#include "drv_system.h" // timers, delays, etc

src/config.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <string.h>
44

55
#ifndef FLASH_PAGE_COUNT
6-
#define FLASH_PAGE_COUNT 64
6+
#define FLASH_PAGE_COUNT 128
77
#endif
88

99
#define FLASH_PAGE_SIZE ((uint16_t)0x400)

src/drv_i2c.c

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include "board.h"
22

3+
#ifndef SOFT_I2C
4+
35
// I2C2
46
// SCL PB10
57
// SDA PB11
@@ -347,3 +349,5 @@ static void i2cUnstick(void)
347349
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
348350
GPIO_Init(GPIOB, &GPIO_InitStructure);
349351
}
352+
353+
#endif

src/mixer.c

+9
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,21 @@ void mixTable(void)
163163
break;
164164

165165
case MULTITYPE_HEX6X:
166+
#if 0
166167
motor[0] = PIDMIX(-1 / 2, +1 / 2, +1); //REAR_R
167168
motor[1] = PIDMIX(-1 / 2, -1 / 2, +1); //FRONT_R
168169
motor[2] = PIDMIX(+1 / 2, +1 / 2, -1); //REAR_L
169170
motor[3] = PIDMIX(+1 / 2, -1 / 2, -1); //FRONT_L
170171
motor[4] = PIDMIX(-1, +0, -1); //RIGHT
171172
motor[5] = PIDMIX(+1, +0, +1); //LEFT
173+
#else
174+
motor[0] = PIDMIX(-4/5,+9/10,+1); //REAR_R
175+
motor[1] = PIDMIX(-4/5,-9/10,+1); //FRONT_R
176+
motor[2] = PIDMIX(+4/5,+9/10,-1); //REAR_L
177+
motor[3] = PIDMIX(+4/5,-9/10,-1); //FRONT_L
178+
motor[4] = PIDMIX(-4/5 ,+0 ,-1); //RIGHT
179+
motor[5] = PIDMIX(+4/5 ,+0 ,+1); //LEFT
180+
#endif
172181
break;
173182

174183
case MULTITYPE_OCTOX8:

stm32_flash.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
2222
/* Specify the memory areas */
2323
MEMORY
2424
{
25-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K
25+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 127K
2626
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
2727
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
2828
}

0 commit comments

Comments
 (0)