* Proper initialization sequence framework for various supported GPS types. NMEA will now auto-detect its baud rate based on received frames.
* As a result of the above, gps_baudrate has been changed to enum, to only allow fixed rates. (GPS baudrate, -1: autodetect (NMEA only), 0: 115200, 1: 57600, 2: 38400, 3: 19200, 4: 9600)
* UBX binary initialization at any specified baudrate with auto-reconnect on signal loss.
* GPS thread to handle initialization, signal loss and configuration. No longer does GPS need to be powered before FC, and on GPS reconnect, it will be re-initialized if needed.
MTK NMEA/binary initialization is omitted for now, as I can't find my MTK GPS
GPS deltaTime can be calculated to display update rate.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@438 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
First cut at polymorphic serial port implementation. Split serialPort_t into uartPort_t and serialPort_t. Calls to uartWrite() can now be replaced with calls to serialWrite().
Replacing calls to serialWriteByte(softSerial_t*, char) with calls to serialWrite(serialPort_t*, char). This completes the proof of concept for polymorphic serial port implementations (uartPort and softSerialPort).
Renaming isSerialAvailable to uartTotalBytesWaiting. Renaming serialAvailable to softSerialTotalBytesWaiting. Adding serialTotalBytesWaiting to serial API and updating calls to the former methods to use the serial API.
Renaming serialRead to softSerialRead. Adding serialRead to serial API and updating calls to uartRead and softSerialRead to use the serial API. Renamed uartPrint to serialPrint which now works on any serialPort implementation.
Replacing calls to isUartTransmitEmpty with isSoftSerialTransmitBufferEmpty. Replacing remaing calls to uartWrite with serialWrite. Adding isSoftSerialTransmitBufferEmpty to the serial API. Adding serialSet/GetBaudRate to the serial API. Since softSerial does not implement serialSetBaudRate some GPS serial initialisation code has been updated.
At this point it is probably possible to switch around all the ports and use a software serial implementation if desired.
By Dominic Clifton / https://github.com/hydra/baseflight/
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@423 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
Conflicts:
src/drv_serial.c
src/drv_serial.h
src/main.c
First cut at polymorphic serial port implementation. Split serialPort_t into uartPort_t and serialPort_t. Calls to uartWrite() can now be replaced with calls to serialWrite().
Replacing calls to serialWriteByte(softSerial_t*, char) with calls to serialWrite(serialPort_t*, char). This completes the proof of concept for polymorphic serial port implementations (uartPort and softSerialPort).
Renaming isSerialAvailable to uartTotalBytesWaiting. Renaming serialAvailable to softSerialTotalBytesWaiting. Adding serialTotalBytesWaiting to serial API and updating calls to the former methods to use the serial API.
Renaming serialRead to softSerialRead. Adding serialRead to serial API and updating calls to uartRead and softSerialRead to use the serial API. Renamed uartPrint to serialPrint which now works on any serialPort implementation.
Replacing calls to isUartTransmitEmpty with isSoftSerialTransmitBufferEmpty. Replacing remaing calls to uartWrite with serialWrite. Adding isSoftSerialTransmitBufferEmpty to the serial API. Adding serialSet/GetBaudRate to the serial API. Since softSerial does not implement serialSetBaudRate some GPS serial initialisation code has been updated.
At this point it is probably possible to switch around all the ports and use a software serial implementation if desired.
By Dominic Clifton / https://github.com/hydra/baseflight/
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@423 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
FEATURE_SPEKTRUM has been removed and replaced with FEATURE_SERIALRX.
cli option serialrx_type now configures what type of receiver it is
0 = spektrum1024, 1 = spektrum2048, 2 = sbus
sbus will need hardware inverter to use.
also cleaned up receiver drivers to assign readrawRC callback instead of assigning in code in main()
none of this has been tested.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@418 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
documented L3G4200D driver why 0x28 read was suddenly turning into 0xA8
removed old wiimotion averaging cruft from computeIMU
NOT FLIGHT TESTED
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@403 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61