Commit graph

2737 commits

Author SHA1 Message Date
Dominic Clifton 4da8accfc0 OLIMEXINO - Initial support for the OLIMEXINO board.
PWM and ADC configuration is the same as the naze32 for now.  Requires an accelerometer is connected via I2C2.

I2C signals SDA2 and SCL2 are on the UEXT header (Pins 6 and 5 respectively)
USART signals TX and RX are on the CON3/CON4 headers (TX = D7, RX = D8)

Onboard LEDs (LED1/LED2) working.
Buzzer support removed for now as it conflicted with PWM map and LEDs.
mma845x support disabled as it conflicted with an LED.
Relocated some NAZE specific comments.

Disabling PWM2 as an input as it conflicts with the yellow onboard LED2.
2013-04-09 00:15:34 +02:00
timecop@gmail.com f2a931d248 OLIMEXINO - Initial support for the OLIMEXINO board.
PWM and ADC configuration is the same as the naze32 for now.  Requires an accelerometer is connected via I2C2.
I2C signals SDA2 and SCL2 are on the UEXT header (Pins 6 and 5 respectively)
USART signals TX and RX are on the CON3/CON4 headers (TX = D7, RX = D8)
Onboard LEDs (LED1/LED2) working.
Buzzer support removed for now as it conflicted with PWM map and LEDs.
mma845x support disabled as it conflicted with an LED.
Relocated some NAZE specific comments.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@302 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-04-07 13:18:37 +00:00
timecop@gmail.com 880b7418fd fixed bug with telemetry/powermeter labels in CLI - wasn't synced with enum properly.
baro altitude telemetry fix.


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@301 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-04-07 09:24:31 +00:00
timecop@gmail.com 98d0581ac2 part 2 of ?? of mw2.2 merge (still not flight-tested, so no binaries)
defaulted to looptime of 3500 (yea, yea)
rewrote baro stuff to match mwc2.2 - both supported sensors now return temperature and pressure, which is used in altitude calculation code
rewrote hmc5883 driver to include calibration inside the driver file instead of calling parts of calibration from userspace. it will now blink LED1 while calibrating
some parts remaining to do.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@298 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-03-23 15:58:18 +00:00
timecop@gmail.com 491b3627f6 begin initial merge of 2.2 features
mw2.2-merged stuff:
* implemented profiles 0-2 (called 'setting' in mwiigui)
* merged in MSP changes including profile switch
* cleaned up rc / aux switch stuff in mw.c based on 2.2 rewrite
* main loop switch for baro/sonar shit adjusted
todo: basically the rest of 2.2 changes (i think some minor imu/gps/baro updates)
baseflight-specific stuff:
* made boxitems transmission dynamic, based on enabled features. no more GPS / camstab trash if it's not enabled
* cleaned up gyro drivers to return scale factor to imu code
* set gyro_lpf now controls every supported gyro - not all take same values, see driver files for allowed ranges, in case of invalid lpf, defaults to something reasonable (around 30-40hz)

maybe couple other things I forgot. this is all 100% experimental, untested, and not even flown. thats why there's  no hex.
merge is still ongoing.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@294 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-03-14 14:03:30 +00:00
timecop@gmail.com bba9bc291f added some more configurable frobs to cli. commit before 2.2 merge.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@288 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-03-11 06:18:20 +00:00
timecop@gmail.com 600f50ecac added MSP_UID patch from cGiessen
added sending cell voltages (faked) via frsky telemetry by fiendie
two additional cli commands (aux and dump) from jef79m - aux allows setting switches from command line, dump creates a copy-pasteable config which can be sent to a new board.


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@283 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-03-04 00:17:50 +00:00
timecop@gmail.com c88614046b reversed o/n meaning from previous commit to actually mean what I said :)
n = new rev (fullscale acc)
o = old rev (halfscale acc)


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@279 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-02-22 15:57:29 +00:00
timecop@gmail.com bc627783f8 removed mpu6050_scale cli since it's now autodetected.
the value is now printed in the status command, after MPU6050 as MPU6050.n = new revision, MPU6050.o = old revision.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@278 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-02-22 11:04:32 +00:00
timecop@gmail.com fc185b8e15 rewrote mpu6050 revision sensing code to match that of eMPL from Invensense.
Also changed scalefactor for acc to 256/512 to match multiwii code. untested/etc, proceed with caution.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@276 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-02-21 08:59:27 +00:00
timecop@gmail.com e0af7acf4f corrected short options for getopt.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@267 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-02-16 11:16:53 +00:00
timecop@gmail.com f5616f1437 add -n parameter to stmloader to prevent sending reboot sequence in case STM32 was already in bootloader mode (by fiendie)
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@266 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-02-15 09:53:24 +00:00
timecop@gmail.com 4c0fe94072 further accuracy improvement for mag calculation.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@263 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-02-07 04:59:29 +00:00
timecop@gmail.com d1d6a5d5ef very nice proper magnetometer vector rotation from crashpilot1000
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@261 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-02-06 04:08:10 +00:00
timecop@gmail.com 785443789c third time's the charm (fixed + confirmed tiltmix gimbal)
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@251 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-01-16 11:11:13 +00:00
timecop@gmail.com fc4693af3a let's try this again (simple gimbal sign fix)
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@250 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-01-12 12:49:26 +00:00
timecop@gmail.com a1ac53c841 changed cpu to CBT6 in release build;
maybe fixed simplegimbal mixer;


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@249 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-01-12 08:26:24 +00:00
bouwens.mehl@gmail.com 2ee7bb3162 wrong commit. should be part of a new branch.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@242 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-01-08 20:47:51 +00:00
bouwens.mehl@gmail.com f34c57833e Kalman filter integration
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@241 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-01-08 20:05:49 +00:00
timecop@gmail.com bd08f337e7 Ah, finally fixed spektrum stuff. after PWM rewrite, spektrum init ended up before pwm init, so when rcReadRawFunc was assigned, it was always set to PWM. oops. Thanks to Cerberis @ irc for the patch.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@240 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2013-01-05 01:13:18 +00:00
timecop@gmail.com 006e6629f6 Added GIMBAL_MIXTILT (16) to gimbal_flags. Setting gimbal_flags=16 will use "mixed" gimbal i.e. SERVO_MIX_TILT from MultiWii. Untested, but should work(tm).
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@239 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-12-27 13:23:43 +00:00
timecop@gmail.com e7bc3cc38e oops.
spektrum support was broken, now fixed.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@238 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-12-24 14:54:37 +00:00
timecop@gmail.com af7e135d75 fix from frog32 for external adc channel allocation;
fix from mwc forum for frsky telemetry gps output

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@237 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-11-12 09:08:16 +00:00
timecop@gmail.com 12dfa8915d slight improvement to motion threshold calculation
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@234 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-10-27 07:34:45 +00:00
timecop@gmail.com 23acf529d7 implemented using one of RC inputs as ADC channel for power meter.
added MSP_ACC_TRIM stuff for android GUI.


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@231 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-10-19 02:43:27 +00:00
timecop@gmail.com e59f639951 made gyrodiff for motion detection configurable, 0 = disabled
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@230 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-10-14 00:34:23 +00:00
timecop@gmail.com 0976133f1f added acc_trim stuff into cli
spacing/indentation fixes
flyingwing is somewhat supported, reflect that in comment
added anti-moron gyro calibration routine... if model is getting moved while its arming... don't calculate gyro avearage because its gonna be wrong... example of fail see here: http://www.rcgroups.com/forums/showthread.php?t=1749966

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@229 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-10-13 12:08:56 +00:00
timecop@gmail.com 9fc43d5357 fixed MPU6050 sig stuff, d'oh
added sensor axis orientation stuff to cli... not the most optimal way but surely one that uses least code, lol!

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@228 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-10-08 13:50:48 +00:00
timecop@gmail.com 021b486916 added ability to swap sensor axises dynamically. still needs a sane way to configire in CLI, though.
adjusted all drivers for the new align stuff.
commented out default config setting values to zero - memset already did that.


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@227 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-10-07 18:03:42 +00:00
timecop@gmail.com 193902079c moved some readonly strings to flash, thanks zyp
cleaned up frsky telemetry a bit with verbose telemetry ID names, changed loop timing a bit, added output for heading and voltage (when vbat is enabled). telemetry stuff is untested, so someone try it out.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@226 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-10-07 14:58:12 +00:00
timecop@gmail.com 005308b430 Applied patch from trunet for running at 64MHz off HSI for broken Chinese kcopter clones
status in cli now prints cpu MHz, 72 when running off crystal, 64 when running off intrc.
corrected WHO_AM_I check for mpu6050 when it's used on alternate address (AD0 high).
corrected PWM driver to consider CPU clock for timer prescalers - now things properly work below 72MHz
added a neat hack for pitch angle calculation so that it's not affected when roll reaches 90deg
added proper math for vector rotation instead of small-angle approximation

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@225 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-10-06 14:40:24 +00:00
timecop@gmail.com 4a4c0d585d sign error in HEX6P mix.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@224 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-23 11:41:02 +00:00
timecop@gmail.com 1dea2b3b3b integrated tommie's eeprom sanity check. much less chances of new firmware screwing up due to old config version.
fixed pwm init for airplane mode mistakenly deleting motors from the mix. flyingwing should really work now.
removed led debug from althold


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@223 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-21 04:12:17 +00:00
timecop@gmail.com 9d5bfdb60b forgot to add lpf_for_velocity into tunables for new althold
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@222 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-20 01:47:22 +00:00
timecop@gmail.com ab509889ca stmloader serial fix from lianj
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@221 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-19 23:22:30 +00:00
timecop@gmail.com 2544c290ae enabled mahowik althold by default. let the users figure it out.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@220 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-19 11:14:12 +00:00
timecop@gmail.com 817eb09b8a fixed bug in soft_i2c driver (doesnt affect anyone except testing)
added VAR_FLOAT to cli - now allows setting/printing float vars
fixed newlines in pwm driver
exported new althold tunables to cli (some are floats) - still not enabled by default until I know it works

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@219 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-18 13:29:35 +00:00
timecop@gmail.com f3ce558871 flying wing servo output fix
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@218 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-12 10:39:30 +00:00
timecop@gmail.com a51bb66ad4 more mahowik althold changes. at least it doesn't shoot up in the air now on enable... but still nothing impressive.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@217 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-12 07:09:45 +00:00
timecop@gmail.com a139b96de6 fixed bug with MTK init - stuff was sent without delay while changing baudrates, and it would wreck stuff - changing rate mid-buffer. oops. should work now.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@216 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-12 02:15:14 +00:00
timecop@gmail.com 8e16d83a37 testing: merged patch from http://www.multiwii.com/forum/viewtopic.php?p=22485#p22485
no binaries, as it doesn't work at the claimed PIDs of 5.0-0.030-30

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@214 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-10 09:11:22 +00:00
timecop@gmail.com 70884d69d5 bring back flying wing w/all configuration options
config version bumped, settings cleared.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@213 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-09 11:35:35 +00:00
timecop@gmail.com b94c13b1c5 allow using GPS in PWM input mode. This (obviously) reduces number of available channels by 2.
I heard thats not a problem since tarduino only allows 4RC+2AUX channels anyway! If you want more, upgrade to PPM.
So you use RC3/4 for GPS, and connect the rest of the channels as usual. Channels used for GPS uart are
skipped, so no changes to 'map' are necessary. Simply connect in order.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@212 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-08 12:53:55 +00:00
timecop@gmail.com 4ed57b2696 fix for airplane pwm mode - variable wasn't initialized, resulting in non-working motors on some compilers.
synced angle/horizon mode stuff from mwc. no idea what it does.
perhaps the most important part of this update:
-errorAngle = constrain(2 * rcCommand[axis] - GPS_angle[axis], -500, +500) - angle[axis] + cfg.angleTrim[axis];
+errorAngle = constrain(2 * rcCommand[axis] + GPS_angle[axis], -500, +500) - angle[axis] + cfg.angleTrim[axis];
(which means GPS might actually work).

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@209 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-08 08:15:16 +00:00
timecop@gmail.com ad1939591f oops, printf stuff forgotten to add to uv project.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@208 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-06 06:54:06 +00:00
timecop@gmail.com 3cd8e4e3f6 added printf() support via SpareTimeLabs printf lib. this cleaned up some mess inside cli.c
example of usage: http://bcas.tv/paste/results/xToE9w26.html
hover-tested quadx loaded as custom mix, works.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@207 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-06 06:35:02 +00:00
timecop@gmail.com 98cba890e1 moving towards custom mixer table and proper fixedwing mixer.
refactored all of mixer.c to use tables instead of hardcoded mix.
custom mixer is stored in flash, but currently has no UI to configure it.
do not choose mixer CUSTOM in console.

hover-tested QUADX, if upgrading anything else, please carefully check motor response first, preferably without props on heavy models.
tec

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@206 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-05 23:44:55 +00:00
timecop@gmail.com fef43457c0 buffer overrun in cli parser, increased command buffer. oops. thanks nicodh.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@205 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-05 06:58:57 +00:00
timecop@gmail.com b2bc4bf9e6 Finished merging GPS autoconfig + ubx protocol code.
use set gps_type=X in cli to configure, where X=0 if NMEA (no special config), X=1 if UBX (enters ubx binary mode), X=2 if MTK (sets up MTK for 5Hz operation).
changed default GPS rate to 115200 baud
added baudrate reset stuff to UART driver for GPS autoconfigure
NONE of this is tested (except UBX working on my window)

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@204 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-04 16:26:46 +00:00
timecop@gmail.com 80d7ba604b merged multiwii GPS code from 1097. still no support for UBX, or GPS auto-config, soon.
added interrupt pins from mag/mma/mpu for rev4 hardware. nothing done with them yet - candidates for EXTI use
added tx buffer to UART2 (gps) in preparation for auto-config


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@203 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
2012-09-04 09:13:59 +00:00