***documentation***

===============================================================
Documentation for releases should be in the official wiki at 
http://www.multiwii.com/wiki

stable and development versions can be found here:
http://code.google.com/p/multiwii/downloads/list
For development versions you are on your own - good luck.
Don't try any development version if you don't follow dev evolution.
Don't forget a multirotor is something that can be dangerous.

For discussion and questions the official forum is at
http://www.multiwii.com/forum

Evolution of the code can be followed here:
http://code.google.com/p/multiwii/source/list

MultiWii is not a product, nor a plug and play solution.
It is basically an open source project.
Don't expect to buy a compatible board and run it without a minimum knowledge.





main changes 2.2 -> 2.3



***Control mode***

- main PITCH/ROLL/YAW PID modification (r1474)
  - the sticks scaling is no more affected by PID coefficients
  - yaw rate (to the right of the PIDs in GUI) now works as stick scaling
  - default yaw rate is increased (with yaw rate at 0)
  - yaw PID principle is now different from PITCH&ROLL PID:
    - yaw ITerm windup is very high, allowing an 'elastic' direction return after a manual perturbation
    - yaw ITerm is also constrained with a windup independent limit
    - yaw PTerm is constrained in order to counter the yaw jump effect.
      use yaw DTerm to increase this constrain (r1573)
    - yaw ITerm is canceled if the yaw stick is not centered

- Throttle angle correction (r1374)

- Advanced Headfree mode added (see config.h for instructions) (r1374)

- DYNBALANCE option, individual motor can be controled via GUI, to test individual vibration
  http://www.multiwii.com/forum/viewtopic.php?f=7&t=3294

- better gyro & acc calibration accuracy (r1546)
  http://www.multiwii.com/forum/viewtopic.php?f=7&t=3880

- cannot arm is baro mode is on (r1550)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=3910
  ! baro mode should be activated only when the multi is nearly Z stable !
- only one baro mode : vario around a throttle deadband (r1554)

- magHold is reset when arm is switched on (r1553)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=3910

- ONLYARMWHENFLAT option (r1587)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=4077&hilit=coming&start=40#p41755



***receiver & UART***

- RCSERIAL is now deeply integrated. If a MSP_SET_RAW_RC comes, it will just override legacy RX data. (r1420)
  as a consequence, RCSERIAL is no more an option

- no RC averaging for Spektrum & SBUS (r1545)

- SBUS center define (r1568)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=3957

- FAILSAFE_DETECT_TRESHOLD configurable



***GPS***

- Enables sonar altitude from i2c-gps-nav board (1424)

- navigation code will follow after 2.3



***GUI***

- Gui with Servosettings. (r1441 & r1450)
  All models with servo included.

- GUI globalsettings (for some settings previously only in config.h)

- do not display /dev/cu.* devices but only corresponding /dev/tty.* (r1442)

- GUI baudrate as configurable setting



***LCD***

- lcd.telemtry: show max ground speed from gps data (r1398)

- lcd.telemetry: allow separate suppression of aux2 configuration (r1456)

- new display support 1.3" i2c OLED from digole.com (r1413)

- config.menu: when abort, revert all values back to last saved state

- visual feedback from servos during midpoint trim via LCD



***IMU and baro***

- correct GYRO_SCALE for all gyro (r1428)

- no more small angles while shaking the board (r1579)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=4112

- baro Alt based on ground temp compensation (r1570)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=4059

- not I reset for FIWEDWING (r1590)
  http://www.multiwii.com/forum/viewtopic.php?f=7&t=2456&start=330#p42355

- add 6DOF LSM330 sensor (r1571)

- add ACC BMA280 sensor (r1600)



*** SERVO management ***

warning:
The pins for coptertypes with servos have been changed.
Attaching a servo to a motor pin can quickly destroy your servo.
All connection diagrams out there from v2.2 or older are no longer valid for v2.3 with servos using hardware PWM.

http://www.multiwii.com/wiki/index.php?title=Config.h#Servos_configuration

- add 8 hardware PWM's for servos on MEGA boards. Servo outputs are 44,45,46,11,12,6,7,8 (r1384)

- Allow any servo refresh rate from 20 to 400Hz on Mega hardware PWM servos. (r1386)

- Tri servo moved to SERVO4 (pin11) on mega boards with HW PWM's. (r1392)

- a32u4 (nanoWii, MicroWii etc) HW PWM for 4 servos; warning different pins!!
  (with lots of info and help from ronco)
  (r1464 & r1470)

- add a generic way to configure servo settings : conf struct + MSP read/set messages (r1383)

- Added general servo handler (r1421 & r1429)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=3498

- allow preset of some servo stuff from config.h (r1432)

- Gui with Servosettings. (r1441)

- add gimbal servo stretcher usable with HW PWM's. (r1384)
  We can get 180 degrees servo move without servo modification.
- note about gimbal: settings for neutral&endpoints are no more in config.h, but only in GUI

- do not update servos during unarmed calibration of sensors which are sensitive to vibration (r1408)



***internal improvements***

- migration to a cpp/h code structure (r1515 & r1516)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=3773
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=2931

- huge flash size optimization (around 1k)
  thanks to fine struct definitions + serialization over MSP (r1369)

- make powermeter computation time based (again) to reduce config hassle and increase accuracy (r1375)

- read at most one analog channel per MWii main loop cycle (r1375)

- smoothing of RX_RSSI (r1379)

- make faster analog reads an option with default off to increase accuracy (r1375)

- detangle vbat & buzzer dependancy (r1375)

- optimization : small approximation bit shift used instead of * or / number
  for TPA, rates, dynP, dynD and expo curb (r1376)

- Added checking for flash content change, and reload config parameters in this case. (r1389)

- split Serial into Serial(core UART management) & Protocol (r1548)

- loop is globally faster



***add-ons***

- option to suppress defaults in mwc sketch and load via gui from file instead (r1365)

- add OVERRIDE_PSENSORPIN option (r1375)

- manual for using Multiwii in Eclipse environment
  http://www.multiwii.com/wiki/index.php?title=Developing_in_Eclipse

- add amperage to MSP_ANALOG (r1542)

- MY_PRIVATE_DEFAULTS (r1559)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=3987

- no more than one MSP per port and per cycle
  should smooth the delay while requesting MSP, especially for USB port on micro





2.1 -> 2.2


***Control mode***

- introduction of HORIZON MODE.
We have now 3 modes:

ACRO mode.
  This is the default one when none of the ANGLE & HORIZON BOX is activated.
  The copter will continue rotating in the direction in which you tilt sticks.
  When you let go of sticks it will maintain that angle and not return to level

ANGLE mode
  The position of the stick indicates the angle at which the copter tries to maintain. Sticks off = level.
  Full sticks in any direction and it will tilt at around 50 degrees. It's proportional in-between.
  It maintains the angle set by the stick. Let go of sticks and it returns to level

HORIZON mode <- new
  It's a proportional mix of the two. Sticks off = level. Full deflection = ACRO.
  In between it gradually mixes from LEVEL mode to ACRO.
  It's a fine mix to be able to do some ACRO with the safety of ANGLE mode when you release the sticks.
  It allows also a more natural way of flying as the multi seems less constrained.


- failsafe code is more strict. (thanks to MIS)
  If activated, it takes into account all the main channels and it's important to stay strictly inside the [1000-2000] range.
  For instance a throttle of 995 will activate the failsafe
  failsafe is optional and can be activated via #define FAILSAFE

- Acrotrainer mode introduced by PatrikE
  a kind of non proportional horizon mode
  more info here: http://www.multiwii.com/forum/viewtopic.php?f=16&t=1944

- SERVO_TILT_MIX
  introduced by Bledi and Gary
  http://youtu.be/zKGr6iR54vM 
  corrected after to supportoptionallyup to 2 AUX channelssuperpositionto control the gimbal

- CAM STAB: (thanks to Gary and suggested or Arne)
  Ability to define Cam Stab control channels used
  Ability to turn off
  Fix for AUX3 + 4 affecting tilt/roll with camstab enabled


***add-ons***

- pilotlamp integration (thanks to mr.rc-cam, jevermeister, doughboy )
  via #define PILOTLAMP
  http://code.google.com/p/multiwii/wiki/Documentation_Pilotlamp

- LEDRING pattern was refined thanks to shikra
  instructions here: http://code.google.com/p/multiwii/source/browse/trunk/LEDRing/README.txt

- variometer introduced by Hamburger
  enable to get audio feedback upon rising/falling copter/plane
  via #define VARIOMETER



***receiver & UART***

- option to use throttle PIN as the PPM PIN on mega boards thanks to MIS
  this way you can use the UART 1 for other purpose
  via #define PPM_ON_THROTTLE

- every UART port on MEGA boards can be used at the same time with different baud configuration.
  ie, you can connect up to 4 GUI or OSD or anything using MSP simultaneously

- the second UART port on promicro boards can be used at the same time with different baud configuration.

- spektrum (thanks to Danal)
  - spektrum satellite up to 12 channels, even if only 8 are usable in multiwii
  - spektrum satellite BIND button, to associate a satellite without the main receiver



***PIN mapping***

- possibility to override some PIN definition in config.h (thanks to Hamburger)



***GPS***

- UBLOX GPS: the baud configuration is autodetected and the UBLOX binary protocol is automaticly set (thanks to MIS & EOSBandi)

- MKT GPS can now be parsed in binary mode is possible thanks to EOSBandi
  made for DIYDrones MTK firmware v1.6 and v1.9

- I2C GPS:
  correct directionToHome (change it to the opposite direction)
  there is still a problem remaining when your distance to home reaches 654m: it overflows.
  a I2C code evolution is needed to correct this problem

- a forward predictive filter was ported from the Arducopter code by EOSBandi
  optional and by default activated: #define GPS_LEAD_FILTER

- first implementation of MSP_SET_WP
  with the help of Ezio app (EZ-GUI), we can now control the multi with a smartphone:
    set a new position on a map / follow me / follow heading
  see Multiwii EZ-GUI specific topic: http://www.multiwii.com/forum/viewtopic.php?f=8&t=2034
  some video about this functionality:
  http://www.youtube.com/watch?v=qpoPanmVa9Y
  http://www.youtube.com/watch?v=hPj6WZex8j0
  http://www.youtube.com/watch?v=nPICiiaDTnc

- AP_MODE introduced by PatrikE
  used in GPS POS HOLD mode, outside the specified stick range the POS HOLD position is renew



***multiwii models***

- HELICOPTER and PLANE models was refined thanks to PatrickE and Hamburger
  multiple helicopter type HELI_120_CCPM , HELI_90_DEG
  servo configuration for plane, FLAP, FLAPPERON

- HEXH6 multicopter type added (thanks to shikra)

- Bi-Copter pitch direction setting

- USE_THROTTLESERVO (for airplanes), COLLECTIVE_RANGE changed (second value not offset anymore)



***GUI & OSD & LCD***

- a RECONNECT button was added by PatrickE
  a file is now generated to indicate the last COM&Serial speed.
  The serial speed can be edited in this file to change the UART speed of GUI.

- New MultiWiiConf GUI v2.2 with graphical improvements (thanks to Magnetron and doughboy)
  cool things like virtual horizon

- optional 3 independent configurations, stick selectable settings in EEPROM (thanks to MIS)
  can be activated via #define MULTIPLE_CONFIGURATION_PROFILES

- a RESET button was added in the GUI
  if you encounter any EEPROM problem or if you want to restore the default values



***LCD***

- on mega boards, it's possible to define the LCD port for LCD supporting true UART.

- more parameters are tunable via LCD conf, all the one in config.h with a small (*) besides,  thanks to Hamburger
  those parameters will be moved in the GUI later in another step, once we find the good way to do it.
  example: failsave.throttle , vbat tunable params , powermeter tunable params

- many telemetry and LCD config enhancements (thanks to hamburger)
  telemetry page 3: use long boxnames
  telemetry page 2: show numerical values for sensor data next to bar graphs 
  no user interaction necessary to run telemetry info upon start up
  set individual board name string (currently used for display; no GUI representation yet)

- LCDconfig menu: with THROTTLE=High, increment is 10 times of normal

- servos are moved to neutral position during calibration and lcd.configuration



***OSD***

- RSSI PIN added for OSD use (thanks to Kataventos)
  the RSSI output can be retrieved via a MSP message for OSD

- OSD BOX added for OSD activation (thanks to Itai)

- huge work made on an open source code OSD fully compatible with MultiWii (thanks to the team lead by Kataventos)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=2918
  http://code.google.com/p/rush-osd-development/



***IMU and baro***

- gyro calibration could be held until the MWC stops moving
  introduced by MIS, and made optional after via a specific define:#define GYROCALIBRATIONFAILSAFE

- mag gain calibration is improved thanks to EOSBandi
  based on Fabio FreeIMU code. We won't forget you Fabio...

- perfect euler angle computation in case of 9DOF (better heading)
  no more gimbal lock in GUI representation with a 9DOF sensor

- force sensors orientation to override board specific defaults
  optional in config.h

- default ACC LPF factor reduced from 16 (2^4), and is share with ACC LPF for alt hold

- gyro/acc complementary filter value increased from 400 to 600

- gyro/mag complementary filter now set to 250 instead of 200

- gyro scale factor changed from 2380 to 2279

- accelerometer now used below 1.15G and above 0.85G instead of previous 1.4G/0.6G settings

- option: SENSORS_TILT_45DEG_LEFT/RIGHT to change X/P configuration without changing board orientation

- ALT HOLD is greatly improved thanks to the code of Mahowik, a little bit optimized since
  improved baro hold (PID) algorithm that includes the accelerometer z-axis
  its a real major improvement for multiwii
  http://www.youtube.com/watch?v=T3htaJ53Z7E

- baro calibration and calculation is improved thanks to Sebbi
  baro indicates now altitude 0 when it is powered. This is the reference altitude.

- calculation of barometric altitude changed to include temperature, faster update rate

- new FC boards: SIRIUSGPS, SIRIUS_AIR, SIRIUS_AIR_GPS, MICROWII, GY_521, MultiWiiMega, DESQUARED6DOFV2GO, DESQUARED6DOFV4,   LADYBIRD, MEGAWAP_V2_STD, MEGAWAP_V2_ADV, HK_MultiWii_SE_V2, HK_MultiWii_328P, RCNet_FC, FLYDU_ULTRA



***internal improvements***

- some default PID were changed for optimization speed in PID copmputation.
  The default PID should behave exactly as the previous ones.
  To restore your old PID settings, just a proportion is needed.

- 5 hardware PWM servos avaliable with Mega boards on pins 44,45,46,11,12 (thanks to MIS)

- EEPROM settings secured by checksum (thanks to MIS)

- optional permanent logging to eeprom
  setting: LOG_PERMANENT

- change LED blink frequency for acc-uncalibrated or tilt>25 from 50ms to 10ms

- rework of task scheduler code thanks to ideas from Sebbi
  we have now a better computation time repartition

- optional fixate cycle time (by burning cpu time away)

- allow override of motor/servo mixing from config.h - no need to edit Output.ino
  experimental

- faster cycle time than with v2.1

- many many hidden optimizations in the code





2.0 -> 2.1

Some things everyone should be aware before upgrading to this version.

  WMP and NUNCHUCK are no longer auto recognized.
  You must explicitly declare them (or just WMP) in config.h

  Pullups are now undefined by default
    (think about activating it if you use a WMP only conf)
  LCD is not activated by default

  Failsafe is not activated by default

  VBAT monitoring is not activted by default

  There is no more .pde files
  You must use Arduino 1.0 or greater to compile the sketch (and open Multiwii.ino)

  If the GUI does not work on your setup,
    try to deactivate hardware acceleration for your display board
    or use an alternative GUI like WinGUI

  MultiWii is not a product, nor a plug and play solution.
  Don't expect to buy a compatible board and run it without a minimum knowledge.


Receiver part
  OpenLRS Multi board support done
    This is a board including an OpenLRS receiver where the atmel
    is used also to run multiwii code.
    more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1438 


Multiwii Serial Protocol
  It's a new protocol to communicate with the FC
  It was introduced by me and tuned by Tommie
  It's a huge change, but it should ensure a generic way to communicate with the FC
  which is less dependant to version evolutions.
  more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1516
  
  Now, there is no mod to multiwii code if we want to add a GUI/OSD/conf tool/...

  Compatible GUI:
   open source code, compatible with the new serial protocol:
    WinGUI from EOSBandi, which is fully equivalent with the original one,
     with a better look
      more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1229
    mwGui from kos
      more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1791
    Android ones via serial bluetooth:
     - adding a bluetooth module to multiwii
       more info here: http://www.multiwii.com/forum/viewtopic.php?f=6&t=133
     compatible apps:
      https://play.google.com/store/apps/details?id=net.xrotor.andmultiwiiconf
      https://play.google.com/store/apps/details?id=net.loide.games.bicopter
      https://play.google.com/store/apps/details?id=com.naze32.configurator

  Compatible OSD:
    open source code, compatible with the new serial protocol
    Rushduino:
      more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=922
    mobiDrone:
      more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1498

LCD config
  OLED display
    thanks to contributions of howardhb and Hamburger
    more info here: http://www.multiwii.com/forum/viewtopic.php?f=7&t=1350

  VT100 terminal type addition
    thanks to contribution of Hamburger
    more info here: http://www.multiwii.com/forum/viewtopic.php?f=7&t=1096

  A multiline option is added to allow the configuration on more than 2 lines
    useful for displays like OLED or VT100

  We have now a lot of possibilities regarding LCD:
    SERIAL3W : original 2x16 line from Sparkfun
    TEXTSTAR : Cat's Whisker LCD_TEXTSTAR Module CW-LCD-02
    VT100 : vt100 compatible terminal
    ETPP : Eagle Tree Power Panel LCD
    LCD03 : an i2c LCD
    OLED_I2C_128x64

New proc: ATmega32U4
  Thanks to the work from ronco.
  This proc can be found in the Arduino pro micro board, or Teensy 2.0
  The Pro Micro is similar in size to the Pro Mini except it has a ATmega32U4 on board.
  The USB transceiver inside the 32U4 allows us to add USB connectivity on-board.
  ronco also designed a custom board named nanowii.
  One of the smallest 6DOF Multiwii board with usb, which can be now purchased.
  more info here: http://www.multiwii.com/forum/viewtopic.php?f=6&t=1337

Servo:
  Higher refresh rate:
    Some servo (mostly digital ones) can work with a higher frequency than 50Hz.
    The benefit to use a higher refresh rate is a sharper response.
    ronco adapted the code to make this frequency configurable
    more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1644
  Hardware PWM output:
    On MEGA boards, it's now possible to drive the gimbal servos with
    a 11-bit PWM servo resolution. Thanks to ronco.
    The hardware PWM output ensures a jitter free response.

LED flasher
  A way to set a flash LED sequence from Tommie
  more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1505

Throttle expo
  There is now another curve in the GUI to configure the Throttle expo.
  It's a way to smooth the throttle stick response around the hover point.
  In order to help the setting, there is a small cursor in the graph to show
  where is the current throttle input.

ACC LEVEL improvement
  The LEVE mode is improved since 2.0 thanks to new choice of
  other complementary filter coefficients and a floating point low pass filter

Headfree checkbox:
  It's possible to reset the headfree direction while flying via a checkbox.
  thanks to Tommie

Sensor:
  MPU6050: there was a bug which prevents using the gyro LPF. correted now.
  SONAR: I2C sonar SRF0x code was added but is not currently used.
  HMC5883 axis calibration factor was added
  NUNCHUK is fusioned with ACC in GUI
  many new boards was also added in config.h file

Internal code:
  - the Serial part uses now less RAM (thanks to Tommie first mod)
    RX/TX buffers are smaller than before.
  - EEPROM parameters are stored in a struct, and are written in the
    EEPROM in a single step.
  - MAG declination was added by EOSBandi, to have more accurate orientation.
    In some countries, it's really mandatory to set this variable right,
     otherwise it's impossible to use GPS.
  - Flag var was introduced for global boolean type variables.
  - Hamburger introduced some "copter exemple" in order to check
    if compilation is ok. (should be a way to remove some trivial bugs)
  - code style (indentation, variable naming convention etc.) started
  - GUI requires new ControlP5 library to compile
  - interval variable activate[] is now 16 bit long
  - new config.h structure

GUI:
  - thanks to Danal, there is now the PIN number and the propeller direction
  drawed in the graph representation
  - thanks to kos, we can now load and save parameters into a file
  - there is now a reset button to set all parameters to default
  - there is now a GUI visual feedback on all states (checkbox items)

GPS code:
  Thanks to the work of EOSBandi, we have now a working GPS code !
  The navigational routines are based on the works of Jason Short
  and the Arducopter team (another great open source project).
  EOSBandi adapted it to multiwii.
  basically, there are 2 main options for GPS: SERIAL option and I2C option.

    - If you have a spare serial port AND an AtMega1280 or 2560 microcontroller
    based FC, you can connect your GPS to that port and enable the serial GPS
    code in the code.
    Patrick introduced a way to switch automaticly between GUI message parsing
    or NMEA message parsing on the same Serial port
    (useful for promini because you can use the same port for GUI and GPS
    in an exclusive mode)
    
    - You can use an I2C_GPS board, which contains a secondary AtMega328 processor
    with a serial GPS and runs the GPS parsing and navigational computations.
    This board communicates with the FC via the I2C bus.

  more info here: http://code.google.com/p/i2c-gps-nav/downloads/list
  and here in this huge post: http://www.multiwii.com/forum/viewtopic.php?f=8&t=649

  There is also a specific GPS_FROM_OSD option:
    it's a way to use the GPS device of OSD to feed Multiwii with GPS data
    MIS OSD uses this functionality

ESC calibration
  experimental
  It's a special #define which allows to calibrate all ESCs with exaclty
   the same signal.
  more info here: http://www.multiwii.com/forum/viewtopic.php?f=13&t=1517

Telemetry
  new telemetry manual stepping mode

Arming option
  configurable TX stick combos for arm/disarm
  this way, it's possible to arm/disarm the multi via:
    - one AUX switch like before
    - YAW stick and/or ROLL stick

AIRPLANE mode
  experimental, more info here:
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=364
  https://code.google.com/p/multiwii/wiki/MWiiAirplane

HELICOPTER mode
  experimental
  more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1562

Dual & Single copter
  experimental
  more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1882

VTAIL mode
  motor rotation has changed:
  Front Left & Rear Right: CCW, Front Right & Rear Left: CW , YAW_DIRECTION=1

An attempt to improve the documentation via wiki
  wiki from googlecode:
   https://code.google.com/p/multiwii/w/list
  wiki from multiwii.com
   http://www.multiwii.com/wiki/index.php?title=Main_Page
  We all know the overall documentation is still to improve :)







1.9 -> 2.0

***you need at least Arduino 1.0 IDE to open the .ino file***

Board and sensors:
New sensor:
  ACC MMA7544 Accelerometer. 
  MAG MAG3110 

New boards:
  CRIUS_SE
  CRIUS_LIGHT
  MONGOOSE
  CHERRY6DOFv1_0
  DROTEK_6DOF_MPU

A new processor
  Coded by ronco based on ATMega 32U4, which can be seen
  as an intermediate proc between 328 and 2560, allowing
  many improvements over the 328 with nearly the same size.
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=1145



STM32 port
  A nice initiative from dongs to port multiwii to a 32bit processor.
  This code allows also to reuse some cheap FC boards and replace the
  firmware by a multiwii one. (boards like FreeFlight FC that can be
  found on goodluckbuy site, or specific boards designed by dongs like AfroFlight32)
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=1193
  http://code.google.com/p/afrodevices/



Stable mode
  BMA180 and BMA020 settings are now set to 8G.
  The settings were formerly 2G. We noticed vibrations could cause ACC saturation
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=849
  , causing a wrong ACC measurement, and causing a wrong PITCH/ROLL angle deduction.
  This problem was probably the main cause of the level drift problem.
  => level mode should be much better now with those sensors.
  One consequence: TRUSTED ACC is now enabled by default and will probably
  be removed in future versions.

  The term D of the PID LEVEL settings is now used to limit the effect
  of the level correction thanks to the suggestion of Shikra
   (see http://www.multiwii.com/forum/viewtopic.php?f=7&t=905 ).
  By default (D=100), the behaviour of the stable mode is unchanged.
  With a lower D, effects are:
   - a smoothing level change
   - should prevent some wobbles of death



Altitude hold mode:
  There was a lot of hit and miss about this functionality.
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=562 
  http://www.multiwii.com/forum/viewtopic.php?f=7&t=363 

  Things are not perfect, but thanks to Marcin we can see a huge
  improvement and a working alt hold with default settings *on most setups*
  There are still some oddities to solve.

  ***Velocity PID is not currently used in the code***



GPS mode:
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=649

  There are now 2 GPS devices supported:
  
  Serial GPS
   which should be connected on a free Serial port of the FC (MEGA boards needed)
   Must be defined in config.h
   #define GPS_SERIAL 2 < - a free serial port
   #define GPS_BAUD 115200

   GPS POSITION HOLD and GPS RETURN to HOME are both implemented with the Serial GPS option.

  I2C Serial boards
   EOSBandi did some code to add a specific arduino + a Serial GPS which
   communicates with multiwii via I2C.
   http://code.google.com/p/i2c-gps-nav/
   Must be defined in config.h
   #define I2C_GPS

  Position of the Home is defined once the GPS receives at least 4 satellites.
  Then there are 2 GPS mode:
   -ReturnToHome: when activated, the multi will go back to the GPS Home GPS coordinates.
   -PositionHold: when activated, the multi will stay at its position.

  The GPS mode needs:
   -a very well calibrated MAG which is not disturbed by running motors.
    (no current of magnetic fields influence on the MAG, otherwise,
    the GPS wont work fine)
   -an ACC correctly tuned for level stabilization

  The principle is very simple for the moment: multiwii tries to lean
  the multi in the direction of the target point, with an angle which
  is proportional to the distance.
  A PID setting was added in the GUI:
   P = angle inclination proportional to target distance
    with P=5.0 in the GUI , 1 meter = 0.5deg inclination
   I is currently not used
   D = max angle inclination due to the GPS correction (15 is fine to begin)


  Nice vids with first working GPS here:
   EOSBandi: http://www.youtube.com/watch?v=pJJKG6uWqv4
   nhadrian: http://www.youtube.com/watch?v=YcLJfC4h90M



More motors/more servos/better output accuracy:

  Thanks to ronco, the output.pde part was nearly rewritten from scratch.
  We have now new possible combinations that were impossible before.

  Better efficiency for hardware pwm: digitalWrite arduino function was
  removed in order to address directly the output ports.
  One consequence: motor order is no more easily configurable.

  On MEGA boards: the first 6 motors are now driven by timers configured
  in a 16 bit mode.
  The difference is noticeable in flight for a quad.
  It's a really nice improvement for MEGA boards running a quad for instance.

  Extended motor range option (for use with wii-ESC; resolution 250 steps vs. 125 steps std.)
  see http://www.multiwii.com/forum/viewtopic.php?f=13&t=516 for more info


  On 328p based board (promini): we can now have the following configurations:
   HEX (FLAT X, FLAT +, or Y6)
    - with a standard receiver: in this case the 2 last motors are
      on PIN A0/A1 instead of D5&D6
    - or still with a PPM SUM receiver
    - with 2 servos for a GIMBAL mode + 1 servo for CAM TRIG:
     - with a PPM sum receiver: in this case, the 2 last motors are
       on PIN D5&D6 and the servos are on PIN A0/A1/A2
     - with a standard receiver: in this case, the 2 last motors are
       on PIN A0/A1 and the servos are on PIN A2/D12 (no CAM trig here)

   OCTO config (FLAT X, FLAT +, X8):
    - with or without a standard receiver: on PINs 3,9,10,11,A0,A1,A2,12
    - no servos

  Config schemes are documented here:
  http://www.multiwii.com/connecting-elements



New config:
  - Flying wing was introduced as beta, and is now successfully tested:
    http://www.multiwii.com/forum/viewtopic.php?f=8&t=594
  - VTAIL



LCD
  The current supported LCD are now:
   - LCD_SERIAL_3W: Alex' initial variant with 3 wires serial
     LCD from Sparkfun, using rx-pin for transmission @9600 baud fixed
   - LCD_TEXTSTAR: Cat's Whisker LCD_TEXTSTAR Module CW-LCD-02
     (Which has 4 input keys for selecting menus)
   - LCD_VT100: vt100 compatible terminal emulation (blueterm, putty, etc.)
     alternate GUI to any (vt-100 aware) terminal program (optionally over BT),
     works for most tablets, smartphones, etc.
     http://www.multiwii.com/forum/viewtopic.php?f=7&t=1096
   - LCD_ETPP: Eagle Tree Power Panel LCD, which is a i2c device (not serial)
   - LCD_LCD03: LCD03, which is a i2c device
     http://www.multiwii.com/forum/viewtopic.php?f=8&t=1094

  - servo midpoints (default 1500) user configurable via LCD
    (like subtrim on computer TX) for Flying Wing and TRI



LED
  An I2C LED Ring device with 12 RBG LEDs is integrated as an option
  in multiwii to give more feedback about sensor states.
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=902
  http://www.dailymotion.com/video/xmdqa9_ledringmultiwii_tech



HeadFree mode
  Something similar to MK Carefree mode was added.
  Firstly introduced by mahowik as a simple mode
  http://www.multiwii.com/forum/viewtopic.php?f=7&t=925
  A specific check box was added in the GUI to activate this mode via a switch.
  You need to have a magnetometer and accelerometer on the board
  Principle: The head/front will be remembered when you turn on the engines.
    So it means that you can   turn on/off the mode during the flight.



Pass-through mode
  Its a checkbox in the GUI.
  The purpose is to bypass the IMU for some configs like flying wings.



Beeper mode
  Its a checkbox in the GUI.
  The purpose is to activate a beeper in case you have a buzzer
  installed and you lost your multi in high grass for instance.



New stick combo
  for magneto calibration (throttle=up yaw=right pitch=down)



Better magnetometer calibration
  The calibration of the magnetometer is now more precise,
  because it takes into account the relative strength of the magnitude
  projection on each axis.
  Based on a code suggested by EOSBandi:
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=1068

  It should improve the GPS return to target point accuracy.



Gyro smoothing
  There are 2 options to smooth the gyros: (mainly useful for fixed wings configs)
   - per axis based on a LPF: #define GYRO_SMOOTHING {20, 20, 3}
     // separate averaging ranges for roll, pitch, yaw
   - for all axis, based on a moving average (from Magnetron)
     #define MMGYRO
     #define MMGYROVECTORLENGHT 10 

  Servo gimbal smoothing is also an option based on the same principle:
     #define MMSERVOGIMBAL
     #define MMSERVOGIMBALVECTORLENGHT 32



Inflight ACC-calibration:
  Its a way to calibrate the level via on flight tests.
  Must be defined in config.h
  #define InflightAccCalibration

  Suggested by jevermeister
  http://www.multiwii.com/forum/viewtopic.php?f=7&t=893



Coding specific improvements:
  Less RAM memory usage via the use of PROGMEM statement

  No more Arduino Serial function => the new serial communication is more efficient

  Board and sensors orientation:
   This was something that was not well coded at the beginning.
   http://www.multiwii.com/forum/viewtopic.php?f=8&t=1259
   This mod should not affect board definition (a remapping of axis was done)
   About individual sensor orientation: is not the same and its normal,
   there is no bug to correct here.

  task state in the main loop to reduce the jitter time loop



GUI
  I2C errors status display in the GUI

  New AUX3/AUX4 checkboxes.
  We can now have many more possibilities to activate/deactivate
  a specific function (4 switch with 3 states assuming you have a 8 channels RC system)
  The previous CAM1/CAM2 rc channels (that are now AUX3/AUX4) are still usable
   for an assisted   PITCH/ROLL gimbal system if the AUX3/AUX4 checkboxes are not used.

  visual feedback on state of all of the auxN options

  GUI reports the full MWC firmware version number

  And of course, there is the nice version of WinGUI from EOSBandi
  It is definitively more friendly than the java one,
  allowing more features like load/write configs.
  http://www.multiwii.com/forum/viewtopic.php?f=8&t=1229



OSD
  rushduino is basically an arduino board, with OSD capabilities.
   It's a very flexible solution, as it is open source,
   and it plugs on the multiwii serial port to retrieve sensors info.
   http://www.multiwii.com/forum/viewtopic.php?f=8&t=922

  MIS OSD is also updated so that multiwii can also take GPS info from the OSD,
   or the OSD can take GPS info from multiwii





1.8 -> 1.9
    - some factorizations between PPM sum receiver code & standard receiver code
    - EXPERIMENTAL: integration of direct SBUS receiver thanks to the contribution of Captain IxI & Zaggo
      For this, you must use:
         - a MEGA board
         - the RX1 of the Serial 1 port
         - have a way to invert the input signal.
      more info here: http://www.multiwii.com/forum/viewtopic.php?f=7&t=289
    - EXPERIMENTAL: integration of SPEKTRUM satellite receiver thanks to the contribution of Danal Estes
      For this, you must use:
         - a MEGA board
         - the RX1 of the Serial 1 port
      It could be used also on ProMini board with some restrictions (exclusive GUI or Spektrum use)
      more info here: http://www.rcgroups.com/forums/showthread.php?t=1504116
    - EXPERIMENTAL: integration of direct Serial RX, to command the multi from a Bluetooth+phone Signal for instance.
      thanks to Luis
    - many optimizations to reduce loop cycle
    - GPS main function integration
        The code to connect and recognize a GPS with NMEA sentences is here.
        currently calculated:
          - number of sat
          - distance to home
          - direction to home
	There is currently no control code except a nice working GUI
	=> there is no code behind GPS HOME and GPS HOLD, in progress
    - PIN A0 and A1 instead of PIN D5 & D6 for 6 motors config and promini config
      This mod allows the use of a standard receiver on a pro mini
      (no need to use a PPM sum receiver)
      #define A0_A1_PIN_HEX
    - possibility to use PIN8 or PIN12 as the AUX2 RC input
      it deactivates in this case the POWER PIN (pin 12) or the BUZZER PIN (pin 8)
      #define RCAUXPIN8 or #define RCAUXPIN12
    - thanks to Danal, integration of the Eagle Tree Power Panel LCD for configuration
      it's an I2C LCD that should be very convenient for the ProMini because it doesn't require the unique Serial Port
    - all in one FC:
      QUADRINO_ZOOM board integration
      MINIWII : Jussi's MiniWii Flight Controller
    - sensor boards:
      SIRIUS600       // Sirius Navigator IMU  using the WMP for the gyro
      CITRUSv1_0      // CITRUSv1 from qcrc.ca
      DROTEK_IMU10DOF
    - ATAVRSBIN1 mag direction correction (http://www.multiwii.com/forum/viewtopic.php?f=8&t=506&start=60#p4950)
    - no need to define anymore PROMINI or MEGA in the sketch:
      this information is grabed form the board selection in Arduino IDE
    - LEVEL drift problem:
      the root of this problem was identified (at least partly).
      Several options to try to solve it:
      - adding a #define TRUSTED_ACCZ for those who have huge ACC Z variations when some throttle is applied
        (it's a test you should do before tructing ACCZ)
	//#define TRUSTED_ACCZ  -> ACCZ is not taken into account in calculation for small angles
	#define TRUSTED_ACCZ    -> ACCZ is taken into account in calculation for small angles
      - BMA180 init changes to another mode: should help to filter noisy setups
      - adding a #define STAB_OLD_17 for those who still encounter problem with the stable code,
        as the old 1.7 LEVEL code (less elaborated) doesn't seem to cause drift.
     - some flying wing code upgrade (thanks to the suggestion of Hamburger)
     - ACC added: LSM303DLx_ACC

1.8 patch 2:
    - integration of SIRIUS 9DOF + baro IMU
    - debugging FREEIMUv035_MS baro code
    - adding another condition in the attitude IMU calculation to take into account the ACC
      (should help to prevent LEVEL drift problem)

1.8 patch 1:

MAIN SOFT: Better deadband implementation thanks to the suggestion of PeterPilot
    http://www.multiwii.com/forum/viewtopic.php?f=7&t=608

MAIN SOFT: updated PIN 46 on mega boards for CAM TRIG servo (more convenient for flyduino boards)

MAIN SOFT: failsafe small bug correction thanks to jevermeister
    prevent any motor glitch rearming in some conditions
    http://www.multiwii.com/forum/viewtopic.php?f=8&t=610

MAIN SOFT: small bug correction about BUZZERPIN, STABLEPIN, DIGITAL_TILT_PIN in MEGA board definition
    http://www.multiwii.com/forum/viewtopic.php?f=8&t=583&start=10#p3049

MAIN SOFT: OCTOP bug correction (left motor was not correctly PID mixed)

GUI: minor bug correction about serial protocol, detected by Hamburger

MAIN SOFT:
    Correction from Fabio about the 5 Free IMU possibilities and the according orientations.



new in 1.8 version:

MAIN SOFT: code modularization.
     There are now multiple .pde files
     The configuration should be changed only in config.h
     The files are opened with the Arduino IDE (open one file and the remaining files will follow)
     This change should ease more easily the extension of MultiWii project in the future

MAIN SOFT: due to the multiplication of multiwii hardware compatible boards
     a first try to manage automatically in config.h the definition of
	- sensors
	- orientation
	- I2C address
     for the moment:
	FFIMUv1          // first 9DOF+baro board from Jussi, with HMC5843              <- tested by Alex
	FFIMUv2          // second version of 9DOF+baro board from Jussi, with HMC5883  <- tested by Alex
	FREEIMUv1        // v0.1 & v0.2 & v0.3 version of 9DOF board from Fabio
	FREEIMUv035      // FreeIMU v0.3.5 no baro
	FREEIMUv035_MS   // FreeIMU v0.3.5_MS
	FREEIMUv035_BMP  // FreeIMU v0.3.5_MS
	PIPO             // 9DOF board from erazz
	QUADRINO         // full FC board 9DOF+baro board from witespy                  <- tested by Alex
	ALLINONE         // full FC board or standalone 9DOF+baro board from CSG_EU
	AEROQUADSHIELDv2 // the 9DOF version of aeroquad shield v2
	ATAVRSBIN1       // Atmel 9DOF (Contribution by EOSBandi). The board requires 3.3V power.
     It's still however possible to declare individual sensors for a different configuration
     If everything is commented (default conf), MultiWii assumes there is only a WMP or a WMP+NK connected.

MAIN SOFT: introduction of a deadband around the stick center
     via a #define DEADBAND. (commented by default)
     it might help to get some accuracy from RC TX with not accurate potentiometers
     however, as it introduces a central deadband, the TX trims are not efficient as before.

MAIN SOFT: new altitude hold
     there is now a working implementation :)
     thanks to ziss_dm, the estimation of the altitude is more precise.
     the Z ACC is integrated in the alt hold estimation and helps a lot to estimate short term variation
     how-to:
        the multi must be nearly altitude stable before the activation of altitude hold.
        a dead band is then created around the throttle value.
     at every moment, it's possible to still control the trhottle power when the throttle goes out of the deadband
     this is not the best implemetation as the multi needs to be quite static before the activation, but it's a good start.
     
     There are 2 PIDS which are separated ans which can be used separatly.
	ALT PID: better results are obtained with a P only term (P=4.7 I=0 D=0 is the default value)
	VEL PID: it stands for velocity PID, more info here: (P=I=D=0 is the default value)
            it should help to smooth every altitude varation
            http://www.multiwii.com/forum/viewtopic.php?f=7&t=363

GUI: altitude representation
     there is an autoscale feature in the GUI to see better the altitude variation.
     So, don't be surprised about the huge amplitude of altitude curve in the GUI.
     The altitude is displayed in meter in the GUI.
     A normal variation when the multi is not Z moving should be around 0.5m

ALL: thank to Hamburger, integration of a power meter estimator
     voltage reading (now available in GUI) and alarm set up.
     (see full description and manual in config.h file)
     more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=167

MAIN SOFT: thank to Hamburger, integration of a LCD telemetry
     very convenient with the TEXT STAR LCD and it's 4 buttons
     for other LCDs with no button, implementation of a Telemetry autoswitching 
     (see full description and manual in config.h file)

MAIN SOFT: thanks to ziss_dm hint, gyro are calculated with more software internal resolution.
     This should smooth the overall alttitude.
     might not be so good with very noisy WMP copies

MAIN SOFT: more settings are avalaible for the ITG3200 gyro
     there was also a bug regarding the ITG3200 initialisation which is corrected => 2000deg/s setting is now used.

     thanks to EOSBandi: ITG3200 & ITG3205 Low pass filter setting. (see the according #define in the config.h file)
     In case you cannot eliminate all vibrations to the Gyro, you can try
     to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
     It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
     balancing options ran out. Uncomment only one option!
     IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.
     see config.h for the related #define

MAIN SOFT: New angle calculation by ziss_dm
     it's a completly new approach wich gives a constant cycle time
     and a representation in all attitude.
     there are some singularity when an angle reaches 90deg. It's normal.

MAIN SOFT: thanks to ziss_dm, there is another way to use the level mode.
     no overshoot is possible, but the reaction time is longer
     more info here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=503

MAIN SOFT: code rework: RX rate/expo is now interpolated via a lookup table without any float.

GUI: thanks to shama, disparition of warning messages

MAIN SOFT: thanks to C2po , some more tuning on BMA180 I2C initialization.

ALL: 3 octo configs are now supported on mega boards: OCTOX8 (dual coax quadX), OCTOFLAT+, OCTOFLATX
     motor order: PIN 3,5,6,2,7,8,9,10
     OCTOX8:
         REAR_R , FRONT_R , REAR_L , FRONT_L , UNDER_REAR_R , UNDER_FRONT_R , UNDER_REAR_L , UNDER_FRONT_L
     OCTOFLATP:
         FRONT_L , FRONT_R , REAR_R , REAR_L , FRONT , RIGHT , REAR , LEFT
     OCTOFLATX:
         MIDFRONT_L , FRONT_R , MIDREAR_R , REAR_L , FRONT_L , MIDFRONT_R , REAR_R , MIDREAR_L
     one detail: the GUI is not yet adapted to display the 8 motors & the according 3D representation on the right

MAIN SOFT: PITCH&TILT camera compenstation with channel 7 & 8 is now working
     - must be used with SERVO_TILT option
     - TILT/ROLL inclination compensation is still trigged by CAMSTAB GUI checkbox option

GUI: improvment by Hamburger
     improvement to the devices list in the gui and that got me to tuning it a bit more.
       - list is still too short for my amount of known devices - some vertical space is unused,
          so longer box is possible
       - on mac, for each bt-device I get two device files:
          cu.name and tty.name. using the tty.name is recommended by arduino documentation,
          so do not add the cu.name devices to list
       - remove leading tty. from names to use limited space for readability.

LCD: improvment by Hamburger: exit without save from EEPROM menu
     You can use the LCD quite extensively for viewing values - especially with development versions.
     Therefore there is a need to exit the LCD config loop without doing a complete write to eeprom.
     The eeprom is limited to only 100.000 write cycles.

ALL: thanks to Cass3825, new optional arming procedure via an AUX switch
     this option is activated only if at least one checkbox is checked on the line "ARM"
     the motors won't arm if the copter is plugged while the tx switch is in the armed position.
     you must use the switch to disarm position then back to arm position in order to arm the motors.

     Another 'feature' worth mentioning is that changes in the switch position are only
     acknowledged when the throttle stick is all the way down.
     This prevents accidentally arming the motors at mid or full throttle.
     One downside is that the motors will not disarm unless the throttle stick is all the way down.

ALL: it's now possible to calibrate the MAG from the GUI (and mandatory for the first time)
	once activated, the LED will flash very fast for 30s
	you have exactly 30s to move the multi in all possible direction
	(one full turn on each axis is sufficient)
	There is no order to respect, but it is important to cover every directions.

GUI: introduction of MAG 3 axis raw values

MAIN SOFT: BI-COPTER PIN 6 servo correction

MAIN SOFT: thanks to jevermeister,
      the failsafe function of the PPM sum receiver was a little mofified and can handle better
      unusual signal patterns with short pulses.





1.7 list of differences with the 1.6

ALL: BARO is more precise, but still not perfect (1m to 2m amplitude). Note it's a code issue, not a baro component issue.

ALL: RC channels AUX2, CAM1 CAM2 added. only relevant for PPM SUM stream or MEGA boards.
 	On the 328p with a standard receiver, only the first 5 channels are recognized.
 	CAM1 and CAM2 controls are not yet implemented.

ALL: AUX1 and AUX2 switches are fully customizable via a 3 state position.
	We can activate/deactivate individually  level mode (ACC), baro or compass (mag).
	It's a generic approach which lets other possibilities to control things in the future.
	With this principle, it's possible to activate permanently the options you want even if you have only 4 channels 
	(replace the FORCE LEVEL option)

ALL: CAM triger option:
	a servo can be connected on digital pin A2 (pro mini) to activate the trigger of a camera
	the option can be activated or deactivated via the button configuration panel AUX1/AUX2
	#define CAM_SERVO_HIGH 2000  // the position of HIGH state servo
	#define CAM_SERVO_LOW 1020   // the position of LOW state servo
	#define CAM_TIME_HIGH 1000   // the duration of HIGH state servo expressed in ms
	#define CAM_TIME_LOW 1000    // the duration of LOW state servo expressed in ms
	the PIN on arduino mega is also A2, but this is not the final PIN mapping

ALL CAM stab (servo tilt) button option:
	the servo tilt option can be activated or deactivated via the button configuration panel AUX1/AUX2

ALL: BI COPTER is now a avatar style implementation.
	on a pro mini: 9 motor left, 10 motor right, 11 servo left, 3 servo right
	on mega: 3 motor left, 5 motor right, 6 servo left, 2 servo right

ALL: addition of Y4 (not tested)
	on a pro mini: motors 9,10,11,3
	on mega: motors 3,5,6,2
	REAR1 , FRONT R , REAR2 , FRONT L

ALL: addition of HEX6X (not tested)
	on a pro mini: motors 9,10,11,3,6,5
	on mega: motors 3,5,6,2,7,8
	REAR_R , FRONT_R , REAR_L , FRONT_L , RIGHT , LEFT

ALL: new level mode
	The level mode is completely redesigned with a coherent independent trim
	There a now a PI control loop for level mode based on angle estimation.
	The old auto level strength value was a sort of P only control loop.
	With the new code, the I term allows to refine the remaining angular error for a better angle positioning accuracy.
	With an RC rate = 1, the angle at full stick is around 45deg => a flip should never happen in this mode.

MAIN SOFT: software trim for stable mode
	It is now possible to adjust the trim of the level mode to match the same TX trim used for the acro mode.
	1) disarm the motors
	2) full throttle (must be >1900)
	3) full PITCH forward/backward and full ROLL left/right (2 axis possibilities) will trim the level mode according to 
	the neutral angle you want to change. The status LED will blink to confirm each ticks.

MAIN SOFT: new calibration procedure
	The ACC calibration differs now from the gyro calibration.
	gyro calibration: it's still done at each power on. It's also possible manually as before: min throttle+full pitch 
	backward+full yaw left.
	acc calibration: motor disarmed, full throttle up, full pitch backward+full yaw left.

MAIN SOFT: it was in 1.6 but not mentioned. it's possible to arm/disarm motors
	either via min throttle + full yaw stick or full roll stick.

MAIN SOFT: anti yaw jump modification for multi with 4 motors or more

MAIN SOFT: servo range for tricopter 
	#define TRI_YAW_CONSTRAINT_MIN 1020
	#define TRI_YAW_CONSTRAINT_MAX 2000

MAIN SOFT: thanks to Ciskje, integration of L3G4200D gyro (this Gyro is present in PIPO ISU)

MAIN SOFT: HMC5883 compass integration 

MAIN SOFT: compass lock now works
	the option can be activated or deactivated via the button configuration panel AUX1/AUX2
	the lock is activated 1s after the stick release
	the lock is maintained only if the YAW stick in centred +/- 50
	In some case, especially with the 5883, the mag must be calibrated otherwise, the direction is not good.
	The calibration procedure is not yet implemented.

MAIN SOFT: there was a bug on servo tilt (it came back to zero at around 45deg due to a variable overflow)

MAIN SOFT: thanks to Syberian, a bug was corrected to prevent ACC correction just before hovering.
         It could explain  some odd flips when using autolevel at the beginning

MAIN SOFT: thanks to ziss_dm, a bug was corrected about the ITG3200: there was a variable
	overflow which occured only for high PITCH variation.

MAIN SOFT: thanks to mis_b (MIS), integration of failsafe code.
 	Failsafe detect absence of RC pulse on THROTTLE channel (standard PPM receiver)
 	If the pulse is OFF the failsafe procedure is initiated.

 	After configurable FAILSAVE_DELAY time of pulse absence,
 	the level mode is switched to ON (if ACC or nunchuk is available),
 	PITCH, ROLL and YAW is centered and THROTTLE is set to FAILSAVE_THROTTLE value.
 	This value is dependent from your configuration, AUW and some other params.

 	Next, afrer configurable FAILSAVE_OFF_DELAY time,
 	the copter is disarmed, and motors are stopped.
 	If RC pulse coming back before reached FAILSAVE_OFF_DELAY time,
 	after the small quard time the RC control is returned to normal.

	The fail-safe can be deactivated via #define

MAIN SOFT: thanks to ziss_dm, nunchuk alone integration (incompatible with WMP and seen as a standalone I2C ACC)

MAIN SOFT: bug correction the mag indication was reversed

MAIN SOFT: small bug correction in angle calculation (conversion rad->1/10 deg)

MAIN SOFT: added a small delay after ITG3200 init to have a better calibration

MAIN SOFT: thanks to zara,
	vbat code simplification + low pass filter.
	vbat activation via #define.
	coupling alarm with status LED

MAIN SOFT: reduce the PPM sum recognition delay between 2 sequences (5ms->3ms).
	might be the source of frsky PPM sum problem

GUI: 3D copter attitude visualization

GUI: ACC calibration. there is now a calibrate button to calibrate the ACC directly from the GUI
	(it resets the soft trim)

GUI: thanks to Eberhard, better display of serial ports on Mac OS X and Linux

GUI: the memory leak bug GUI is corrected

GUI and LCD: D is now positive (to avoid confusion in explanations)

LCD: all parameters are now customizable via the LCD thanks to the work initiated by Shirka.
	This first one is still P  for both ROLL&PITCH as it is the most used.

LCD: implementation of TextStar LCD tanks to Hamburger & gtrick90 code

OSD: implementation of MIS code thanks to Rurek
         thanks to Rurek and mis_b, optimisation of OSD code Serial write is driven by a switchable interrupt,
         minimising  delay to transmit data

SITE: www.multiwii.com was updated accordingly.

SPECIAL NOTE ABOUT THE PULL-UPS:
- they are now enable by default
- WARNING if you use I2C devices that don't support 5V.

- If you use a WMP alone: enable it in soft
- If you use a WMP + NK : enable it in soft
- If you use a WMP + BMP020 (5V friendly thanks to its LLC): enable it in soft
- If you use a WMP + (LLC + I2C devices): enable it in soft
- If you use a WMP + direct I2C bus connection I2C devices (not 5V friendly): disable it in soft and use external 
pull-ups on 3.3V. note that most breakout boards are built with pullups already available.




1.6 list of differences with the 1.5

  - MIDRC in a #define configuration : allow to choose another stick center position for specific TX

  - Free Flight IMU integrated, designed by Jussi (see specific rcgroups topic). Front orientation = Y arrow
	- Gyro ITG3200 integration : note this version uses a different I2C address of the sparkfun breakout ITG3200 board
		the ITG3200 replaces the WMP once the #define line is uncommented. Can be used as a single sensor if needed.
	- Acc BMP180: thanks to the code of Opie, but I changed the orientation to match FFIMU
		it works fine and is activated with mode selection.
 	- Magnetometer HMC5843: for the moment integrated for visualization purpose only in the GUI. works only for inclination<25deg
	- Baro BMP085: it acts as a celling and is activated with mode selection.
		Not well implemented for the moment, big jump. To deactivate it, it's possible to comment the #define line

  - pullups are now de activated by default, there is a #define INTERNAL_I2C_PULLUPS to activate them.
	the de activation of pullups is mandatory for a FFIMU direct connection with no LLC

  - support of the following ACCs: BMA180, BMA020, ADXL345. Thanks to the contribution of mgros, opie11 and Point65

  - GUI: new buttons to indicate the presence of sensors.

  - bug corrected (thanks to Bo): in some case with a WMP + annex ACC,
    WMP data was interpreted as NK data yaw jump correction modification (less present)

  - remove old way to init motor and calibrate. No more full throttle fear.

  - corrected: PIN5&6 switch bug for HEX6 and Y6

  - Arduino MEGA integration
    thanks to the work initiated by Mariano,
    I completed it to be be fully compatible with Arduino MEGA boards (all configs and options).
    With MEGA boards like seeeduino,
      it's possible to have some config impossible to have with a pro mini: Y6+standard receiver+tilt servos

    it's just a #define to switch
    #define PROMINI or #define MEGA  //Arduino type

    The PIN assignment for RC&motors is compatible with Aeroquad shield mega 2.x

    PIN for MEGA board, not definitive, Jussi is preparing a shield with a different PIN mapping

    PPM_SUM 19 (now separated from RC_THROTTLE assignment)
    RC_THROTTLE 62 (=A8)
    RC_ROLL 63 (=A9)
    RC_PITCH 64 (=A10)
    RC_YAW 65 (=A11)
    RC_MODE 66 (=A12)
    RC_AUX(not used) 67 (=A13)
    RC_7(not used) 68 (=A14)
    RC_8(not used) 69 (=A15)
    I2C SDA 20
    I2C SCL 21
    FRONTMOTORPIN 2 (on 328p was 3) = servo for tricopter
    REARMOTORPIN 3 (on 328p was 9)
    RIGHTMOTORPIN 5 (on 328p was 10)
    LEFTMOTORPIN 6 (on 328p was 11)
    Y6RIGHT(HEXFRONT) 7 (on 328p was 6)
    Y6LEFT(HEXREAR) 8 (on 328p was 5)
    V_BAT_MONITOR A3
    TILT&GIMBAL&WING A0/A1
    POWERPIN 12

  - a bug seen by Mariano in stable mode (sqrt on a negative number) is corrected 

  - TILT ROLL&PITCH is now compatible with TRICOPTER configuration

  - anti gyro glitch : I re introduced a limitation between 2 reads as it seemed to be more stable. Info from Point65.

  - RC rate can be extended to 5. With this option, we should see a more linear response on pitch/roll sticks for very acrobatic setups.

  - on quadris we can notice some yaw jumps when the yaw is suddenly stopped.
    There is now a function to smooth the stop.
    If you don't like it just remove the line axisPID[YAW] = constrain(axisPID[YAW],-100-abs(rcCommand[YAW]),+100+abs(rcCommand[YAW]));

  - sketch: I added an  advanced users settings part with a description of some more tunning possibilities.

  - If the ACC is present (Nunchuk or other I2C), you won't be able to arm the motors until you do a proper ACC calibration manually.
    If the calibration is not done or if the multi is too much inclinated, the status LED will slowly blink every 1s.




1.5 list of differences with the 1.4

#define MOTOR_STOP
this is an alternative method to stop immediately the motors when the throttle command is in low position
HEX6 added
motor pin :
//REAR_R => PIN 9
//FRONT_R => PIN 10
//REAR_L => PIN 11
//FRONT_L => PIN 3
//FRONT => PIN 6
//REAR => PIN 5

anti gyro glitch : the time we neutralize data after a hard reset is increased. The impact of gyro glitches is greatly reduced. I can even fly safely with a bad WMP copy doing a hard reset every 5s.

suppression of throttle rate pid curve: replaced by only one relevant value. PID can decrease proportionally between [1500-2000] throttle position (helps to prevent wobbling in fast translation).

internal soft simplification: EEPROM, serial communication, motor naming.

stable mode is greatly improved.

support of ADXL345 I2C acc. Benefit: the loop time WMP+ADXL345 is reduced, allowing a better stability, comparable to a WMP only conf. Obviously, ADXL345 must not be connected with a with a NK setup.The integration of BMA020 I2C acc should be easy because the code frame is ready.

when a NK is detected, the LED blink is much longer after the init step => it's a way to visualize the good detection of a nunchuk.

support of BMP085 I2C barometer. But for visualization purpose only. It can't be activated yet for altitude stabilization.

Known issue:the trim in acro mode is different of the trim in stable mode.

Note:
if you use a NK or a ADXL345 acc. You must do a manual calibration to see good results in gui
- stable mode with NK should indicate 0 / 0 / 200 acc values
- stable mode with ADXL345 should indicate 0 / 0 / 250 acc values
- If you have a constant +/- 400 values on the graph, the calibration is not done.
for the WMP+ADXL345 setup: (+/-BMP085 for curious)
- D12 +1 diode is used to poser the WMP
- a 3.3V is used to power the ADXL345 (stabilized alim or multiple LED from a 5V source)
to reset parameters to default: just upload an old version and the new again.
this version is compatible with everything designed before (WMP only conf or WMP+NK)








1.4:
Serial PPM:
	more explanation on //#define SERIAL_SUM_PPM
	only one line to comment/uncomment in order to activate it
	a bug was corrected about the number of channel

integration of Y6
	the code of the working test version is now merged

integration of pitch/roll servo stabilization (compatible only with QUAD+ and QUADX setup)
	SERVO_TILT_PITCH_PIN: A0
	SERVO_TILT_ROLL_PIN:  A1
	- for each servo, it is possible to set up diferent parameters directly in the sketch (no GUI interraction)
	TILT_PITCH_MIN    1020    //servo travel min, don't set it below 1020
	TILT_PITCH_MAX    2000    //servo travel max, max value=2000
	TILT_PITCH_MIDDLE 1500    //servo neutral value
	TILT_PITCH_PROP   10      //servo proportional (tied to angle) ; can be negative to invert movement

integration of a GIMBAL configuration : mix of pitch/roll angle + input stick servo stabilization
	this is the same as previous, but is is a pure gimbal system (no ESC)
	the input RC stick position is mixed with the angle calculation

suppression of AXIS RATE PID curve which was not enough comprehensible . Replaced by 2 more versatile boxes:
	- ROLL/PITCH RATE: to increase the rotation rate for ROLL&PITCH axis
	- YAW RATE: to increase the rotation rate for ROLL&PITCH axis
	0 = default soft rate ; 0.7 = acro rate ; 1 = insane rate (be careful with 1 setting, it's very violent)

longer blinking LED after each calibration

new calibration approach
	at each initialization:
		the gyro calibration is done
		the acc calibration is done only for a pure gimbal setup
		for other setups, the acc is retrieved from the EEPROM
	on demand (via full left yaw stick + full pitch low stick):
		the gyro calibration is done
		the acc calibration is done and store in the EERPOM
	=> the acc calibration must be done at least once on demand.

adding a #define to supress LCD code in order to save memory space

autolevel strength: the last range was [0;10]. The new range is [0;25] with a reduction weight of 2.5 => more precision for tunning.





1.2:
I pushed a little further the optimization of code size, it's now only 14k.
A lot of work to reduce LCD code without affecting the desired result.
There would be now enough room in the Arduino to run 2 TriiWii code.
It's mainly useful for old Arduino cards with only a 168p inside and half memory.(we can still find these cards less priced on ebay)
The range of parameters is extended in the GUI.
- BI copter mode with 2 servos is introduced, but not yet tested on a real model. I tested only the reaction in the GUI. 






1.1:
A lot of code change:
most float operations in the critical parts (PID loop) are replaced by int operations 
protocol between GUI and arduino is simplified 
LCD code rewrote 
EEPROM code rewrote 
There is no new functionalities, it's more an optimization.
But it increases the speed of the code, and it is also much smaller (19k->15k) 





1.0:
This is a new version which first aim is to consolidate what has already be developed in the thread.
I rename it TriWii to MultiWii as the soft is now designed also for QUAD copter
There are some real improvements and changes:
Sketch: support of TRI, QUAD+ and QUADX 
Sketch: support of PPM SUM input signal of digital pin 2 
Arduino: PIN remapping ! (see the previous posts and main site). Think about doing some soldering before an upgrade from the previous TriWii 
GUI: better PITCH/ROLL representation and representation of the model inclination 
GUI: support of TRI, QUAD+ and QUADX, automatically recognized 
GUI: ACC graph enabled by default 
Site: partially updated, but the main part is ok
The stabilization WMP and NK+WMP is not different from the previous version. 