made sonar support compiled in (lol)
changed PPM pulse idle detect to 2.7ms per JimDrew instructions
updated keil project w /sonar source files.

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@168 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
synced serial protocol to multiwii-dev 20120622
changed booleans to bitfield struct to match with 0622
no other functional changes, and not all enhancements (like boxlight) from 0622 are implemented yet
NOT flight tested, use at your own risk.

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@172 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
added support for outputting FrSky telemetry by silpstream @ rcgroups
feature TELEMETRY to enable it. when armed, telemetry is sent out the TX pin. It must be connected to 'Rx' pin of FrSky telemetry receiver via a level shifter. When disarmed, port goes back to 115200 bps for GUI.
fixed a typo in imu.c introduced by  GYRO_INTERLEAVE junk.
todo: just switch serial speed instead of reinitializing everything.

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@173 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
added pidalt stuff into cli
added a modifier for set (type "set *") to see min/max values for each parameter. this is for gui stuff
bumped config VERSION
fixed 0xffff - now stuff in drv_pwm, after it was mentioned to me for the  3rd time :p
replaced some uint8_t -> uint32_t for loop counters - saving 4 to 8 bytes of flash each time. thanks goes to thee 35+ years of C experience kicad guy.
turned bitfiends into a regular struct - instant 100byte flash size reduction

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@174 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
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: http://afrodevices.googlecode.com/svn/trunk/baseflight@180 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
added softi2c source file (oops)
changed gpio speeds to 2mhz from 50, nothing is toggling at 50mhz here. reduce ringing/noise.

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@181 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
synced with mwc 2.1. it's suprising how many "new" things in 2.1 didn't actually matter on a real platform.
removed camtrig stuff since it wasnt possible. somewhat replaced with aux forwarding (see below)
2.1 buzzer code changed, untested.
removed flying wing mixer. nobody used that. 
added alt_hold_throttle_neutral, nav_slew_rate and looptime configuration to cli. default looptime set to 3000. changed default gyro_cmpf to 400 to sync with 2.1.
increased bmp085 oversampling
added gimbal_flags (bit 4 set) flag which, in PPM mode, forwards AUX1..4 to the lower 4 PWM outputs instead of using them as motors. set gimbal_flags=8 to test it out. output is fixed to 50Hz.
merged 2.1 gps changes (not many)
casting in gyro smoothing (nobody uses that anyway)
calibrate accel in gimbal mode, set smallangle in gyro-only mode
vtail4 mixer fix
flight tested on quadx w/ppm.


git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@182 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
allow 0 for looptime to go back to not-rate-limited loop.

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@183 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
added support for l3g4200d i2c gyro, autodetected
added motors off in hardfault handler, so we drop to the ground on hardfault.


git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@190 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
fixed bug in mpu6050 accel code
added mpu6050 acc scale factor fixup for es/non es chips (exposed as cli option as well)


git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@191 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
fix for 32bit overflow of currentTime killing baro/mag after 72 minutes (yes, someone noticed)
thanks to enots @ feenode.

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@194 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
committing built firmware w/currentTime fix

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@195 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
makefile fix to add l3gd driver

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@196 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
rewritten and cleaned up PWM driver
this has been hover-tested.
all current functionality *should* work even though the driver has been rewritten.
please test carefully, especially servo configurations!

git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@197 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
cleaned up bmp085 driver
added ms5611 driver
refactored pressure sensor subsystem to allow multiple sensors
couple changes in PWM driver to make motor/servo arrangement for airplane mode more intuitive
moved MAX_MOTORS/MAX_SERVOS etc into drv_pwm.h
staring to merge back in airplane/flyingwing mixes
fix for tri servo display - mwc moved it to servo[5] again, gui was broken, function not.
will probably implement custom mixer soon (motors only, no servos)


git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@198 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
i2c no-ack fix (never actually worked properly, fixed now)
bumped config version, or else r198 crashed on update from recent version
airplane mode config passed to drv_pwm


git-svn-id: http://afrodevices.googlecode.com/svn/trunk/baseflight@199 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61