MatrixPilot DB Breeze branch: Corrected many bugs, Reverted the I2C1 driver to the trunk version, corrected the settings in the baro and magneto driver to use i2c2.
Modified: estAltitude.c, gpsParseCommon.c, libDCM.c, libDCM_internal.h, 
I2C2_udb4.c, libUDB.c, I2C.h, nv_memory_options.h, telemetry.c, defines.h and options.h.

Bugs fixed: 

1.  sonar and barometer doesn't feed in any data (sonar raw, rmat8 alt, barometer temp ground, pressure ground etc. as logged - H0,0:btg0,bpg0,bt0,bp0,bga0,eba0,Ba0:;

2. compile error and warnings when #define USE_I2C1_DRIVER set to 0 (i.e., 

set back to default) in nv_memory_options.h. 

With remain issues to fix:

1)  GPS doesn't lock when magnetometer is set to 0 in option.h (per 5th test /log 550, see posting: "incorporating barometer...")
2)  barometer data isn't going through the 12C2 queue (may be related to 1 and could indicate some resource contention or conflict)
Modified libDCM.c to get rxBarometer to run at 40hz.
Modified options to reflect BAROMETER_ALTITUDE parm change for testing purposes
Modifications to get the barometer reading issues resolved
Modifications to get the barometer reading issues resolved
Modifications to get the barometer reading issues resolved
Profound thanks to Bill for sharing his observations, replaced _RA3 and _RA2, with _LATA2 and _LATA3 to prevent  outputs of all other pins on port X from becoming corrupted. Also replaced I2C1_SCL = I2C1_SDA = 0 ~~ for efficiency and optimization.
reverted I2C2 to non-queue, for now. barometer branch now fully updated with r1749 revisions, incorporates logic to blend sonar altitude and barometer altitude into LOGO additional functions, telemetry.c, navigate.c and deadReckoning.  Still remaining: getting correct barometer temperature and pressure data.
included rough in algorithms in estAltitude.c, to invoke altitude and pa_pressure defines in options.h, pending sanity check and possible revisions on the barometer data and functions.
Include modification to effect bug fixes to get the barometer data feed working.  Bug fixes include:  ppm encoder not working, radio out not working, and occasional board reboot, when barometer is enabled.  Also barometer feed to support altitude is now working. Still WIP include resolving barometer data feed and altitude inconsistencies.
Included Bill Premerlani's latest mods to lift the 20m range constraint. Also clean up barometer_udb4.c of debug codes.
 *  Added i2c2 queued algorithm to support Magnetometer and Barometer (WIP) sensors to use i2c2 pins
 *  Added Sonar AGL altitude enhanced LOGO, navigation and deadreckoning modules using Pete and Robert's codes as baseline
 *  Reorganized options.h to enhance logical groupings and to include paremeter (from other header files) for ease of use 
 *     single point of access, simplification of finetuning 
 *
 *  DEVWIP : 1) Get Barometer algorithm to work and fuse with altitude management
 *           2) Dev. database (mavlink compliant) parameter definitions for settings
 *           3) Enable Wifi communication
 *           4) phase-in interactive GCS functionalities
Sonar modification work in progress, currently with compile error occuring when USE_SONAR_INPUT is set to 8 (or on).
Project saved, compile errors when USE_SONAR_INPUT is set to 8.
MatrixPilot_DB_Breeze: some of the modules (especially headers) which are missing from the udb4 project... let me know if my adding these causes you grief and i'll revert the commit.