1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

101 Commits

Author SHA1 Message Date
James Cotton
6310f46705 HMC5883: Update driver for F2. Move to STM32F2xx directory since it is device
dependent.  Abstract configuration out of board.h file into a standard board.c
structure.
2011-08-12 02:26:51 -05:00
James Cotton
479ba7c21f OP-378 INS: Continue getting F2 INS to compile 2011-08-08 08:36:40 -05:00
James Cotton
558bdddeaf INS: Almost got Bootloader compiling *sigh* 2011-08-06 21:27:29 -05:00
James Cotton
f23ec059fe dos2unix 2011-08-06 19:53:46 -05:00
James Cotton
1ccb9a1947 Some changes to BL to get running on F2. Also disables it for now (flash
interface is different).
2011-08-06 19:46:41 -05:00
James Cotton
0bba13a0e9 Merge branch 'next' into ins
Conflicts:
	flight/INS/Makefile
	flight/INS/pios_board.c
	flight/Modules/Altitude/altitude.c
	flight/PiOS/Boards/STM3210E_INS.h
	flight/PiOS/STM32F10x/link_STM3210E_INS_BL_sections.ld
	flight/PiOS/STM32F10x/link_STM3210E_INS_HD_BL.ld
	flight/PiOS/STM32F10x/link_STM3210E_INS_HD_NB.ld
	flight/PiOS/STM32F10x/link_STM3210E_INS_memory.ld
	flight/PiOS/STM32F10x/link_STM3210E_INS_sections.ld
	flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
2011-08-06 17:25:56 -05:00
Stacey Sheldon
2f79e4fa76 Merge remote branch 'origin/stac/refactor-usart-com' into next 2011-07-31 09:41:06 -04:00
Stacey Sheldon
c2fb0d8b43 com: allow run-time allocation of buffers 2011-07-29 15:33:14 -04:00
Stacey Sheldon
13f9b0e09d Merge remote branch 'origin/OP-498_jwhitlock_add-ppm-to-cc' into next 2011-07-28 22:15:01 -04:00
Stacey Sheldon
5f8760a55c com: Move buffering out of USART/HID layer and into COM layer
This allows the spektrum and sbus receiver drivers to bind
directly to the usart layer using a properly exported API
rather than overriding the interrupt handler.

Bytes are now pushed directly from the usart layer into the
com layer without any buffering.  The com layer performs all
of the buffering.

A further benefit from this approach is that we can put all
blocking/non-blocking behaviour into the COM layer and not
in the underlying drivers.

Misc related changes:
 - Remove obsolete .handler field from irq configs
 - Adapt all users of PIOS_COM_* functions to new API
 - Fixup callers of PIOS_USB_HID_Init()
2011-07-27 19:45:38 -04:00
James
60136f0464 Add support for PPM transmitters up to 12 channels. Small array indexing issue in PIOS_PPM_Get. 2011-07-27 00:33:32 +01:00
James Whitlock
6a6ec41809 Build fixes 2011-07-23 22:10:17 +01:00
Mike Smith
c3267a3b53 Remove PIOS_DELAY_TIMER definitions from configuration files, as there is no longer a delay timer to configure. 2011-07-23 13:48:40 -07:00
James Whitlock
11c568ec50 Add in a PPM input frame size tracker.
Move update of capture values to start of new frame.
Fix an issue with setting channels to invalid.
2011-07-23 01:38:51 +01:00
Stacey Sheldon
8dbace5ee2 Merge branch 'rcvr_mem_reduction'
Conflicts:
	flight/PiOS/STM32F10x/link_STM32103CB_CC_Rev1_sections.ld
2011-07-17 17:14:40 -04:00
James Cotton
d41260d54c Make the stabilization settings query correctly now by increasing the TX buffer
on the CC side to 256 bytes instead of 128 to support large objects (max object
size is 256 bytes)
2011-07-15 10:40:21 -05:00
Stacey Sheldon
6580462916 rcvr: specify drivers for groups of channels
Each channel was previously tracking a separate driver.
Now, channels are grouped within a channel group to save
RAM used for tracking and to better reflect how channels
are actually mapped.
2011-07-14 23:22:42 -04:00
Stacey Sheldon
226f095a2e bootcfg: remove baudrate #defines for USARTs
The initial baud rates of each interface are now forced in the
board init code.

Any modules using USARTs should have fields added to
their settings object to allow the user to change the
baud rate from the default by using the COM layer APIs.

Developers requiring custom baud rates before the settings
objects are in place should locally edit the cfg structs
to specify the desired baud rates.
2011-07-06 23:03:54 -04:00
Stacey Sheldon
dbf7574946 bootcfg: use UAVobj to control boot-time HW config
This should mark an end to the compile-time selection of HW
configurations.

Minor changes in board initialization for all platforms:
 - Most config structs are marked static to prevent badly written
   drivers from directly referring to config data.
 - Adapt to changes in .irq fields in config data.
 - Adapt to changes in USART IRQ handling.

Major changes in board initialization for CC:
 - Use HwSettings UAVObj to decide which drivers to attach to
   the "main" port and the flexi port, and select the appropriate
   device configuration data.
 - HwSettings allows choosing between Disabled, Telemetry, SBUS,
   Spektrum,GPS, and I2C for each of the two ports.
 - Use ManualControlSettings.InputMode to init/configure the
   appropriate receiver module, and register its available rx channels
   with the PIOS_RCVR layer.  Can choose between PWM, Spektrum and PPM
   at board init time.  PPM driver is broken, and SBUS will work once
   it is added to this UAVObj as an option.
 - CC build now includes code for SBUS, Spektrum and PWM receivers in
   every firmware image.

PIOS_USART driver:
 - Now handles its own low-level IRQs internally
 - If NULL upper-level IRQ handler is bound in at board init time
   then rx/tx is satisfied by internal PIOS_USART buffered IO routines
   which are (typically) attached to the COM layer.
 - If an alternate upper-level IRQ handler is bound in at board init
   then that handler is called and expected to clear down the USART
   IRQ sources.  This is used by Spektrum and SBUS drivers.

PIOS_SBUS and PIOS_SPEKTRUM drivers:
 - Improved data/API hiding
 - No longer assume they know where their config data is stored which
   allows for boot-time alternate configurations for the driver.
 - Now registers an upper-level IRQ handlerwith the USART layer to
   decouple the driver from which USART it is actually attached to.
2011-07-05 22:03:25 -04:00
Stacey Sheldon
740b5f1584 rcvr: convert PWM, PPM, SBUS and Spektrum to use PIOS_RCVR
All receivers now fall under the same driver API provided
by pios_rcvr.c.

This is part of a larger sequence of commits that will
switch the receiver selection over to boot time dynamic
configuration via UAVObjects.
2011-07-05 22:03:25 -04:00
Oleg Semyonov
311902f1f2 sbus: implemented S.Bus stream decoding 2011-06-18 23:19:57 +03:00
Oleg Semyonov
d8201ec45b sbus: provide a stub based on Spektrum driver (for CC only) 2011-06-15 22:35:21 +03:00
James Cotton
b6a8293f69 OP-378: Get BMA180 interrupt working. Data gets pushed onto a fifo that is
pulled from in the INS code.
2011-05-30 03:40:51 -05:00
James Cotton
9ede84680e OP-378: Start working on IRQ driven BMA180 reading and also fixed the mag order 2011-05-26 13:57:41 -05:00
James Cotton
0a60c5b57c Merge branch 'master' into OP-378_James_INS 2011-05-26 12:19:30 -05:00
Stacey Sheldon
504fe7a664 dfu: fix typo WRITABLA -> WRITABLE 2011-05-24 00:58:10 -04:00
Stacey Sheldon
96827eecff build: Make all flight sw use pios_board_info_blob
Now that every bootloader build has a board info blob,
make all fw and bl images use it.

The following MACROS are removed:
  BOARD_TYPE, BOARD_REVISION, BOOTLOADER_VERSION,
  START_OF_USER_CODE, HW_TYPE

These values are now ONLY available from the bootloader
flash via the pios_board_info_blob symbol.  These values
must not be #defined or otherwise hard-coded into the
firmware in any way.  The bootloader flash is the only
valid source for this information.

NOTE: To ensure that we have an upgrade path from an
      old bootloader (without board_info_blob) to a
      new bootloader (with board_info_blob), it is
      essential that the bu_* targets do not depend
      on (or validate) the board_info_blob being present
      in the bootloader flash.
2011-05-24 00:58:10 -04:00
Stacey Sheldon
6e406c0232 build: remove all remaining use of -DUSE_BOOTLOADER
The USE_BOOTLOADER compile flag was only being used
to determine where the ISR vector table was located.

Provide this explicitly from the linker since it knows
exactly where it is putting the ISR vector table.
2011-05-23 18:21:42 -04:00
James Cotton
750097ea73 OP-378: Small changes to get drivers working again. Fix I2C port for IMU3000
and change convention so that 0 is success, < 0 is error.
2011-05-18 23:35:45 -05:00
James Cotton
ab3127a0ea OP-378 Update the INS Makefile for the new file formats 2011-05-18 14:39:38 -05:00
James Cotton
81b7fb6185 Merge branch 'master' into OP-378_James_INS 2011-05-18 12:50:29 -05:00
Stacey Sheldon
575010169a build: add pios_board_info_blob struct to bootloader flash image
The board info blob is stored in the last 128 bytes of the
bootloader's flash bank.  You can access this data from the
application firmware like this:
  #include <pios_board_info.h>

  if (pios_board_info_blob.magic == PIOS_BOARD_INFO_BLOB_MAGIC) {
    /* Check some other fields */
  }

DO NOT link pios_board_info.c into your application firmware.
Only bootloaders should provide the content for the board info
structure.  The application firmware is only a user of the data.
2011-05-16 08:30:30 -04:00
Stacey Sheldon
2301600f11 Make missing definitions for essential macros more obvious 2011-05-07 18:05:50 -04:00
David Buzz Carlson
876ca3044c Added EKF code. Most of this was bulk copy and paste from the AHRS, so a lot of verification needs to take place. Grabbing sensor data remains untested. 2011-04-20 03:37:50 -07:00
chebuzz
06443b4281 OP-378 - OP/INS - Add initial support for INS. HMC5883, BMP085, BMA180, IMU300 all added. Throrough verification has not been done on any of them. main() simply calls self-test functions on all of the hardware.
AHRS_comms still needs to be implemented.  INS/GPS functionality still needs to be implemented.  Double-check of the new drivers still needs to be done.


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3162 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-14 12:46:39 +00:00
chebuzz
195e93c0d6 OP-377 PiOS/BMP085 - Update BMP085 driver to be FreeRTOS agnostic. This is required since new INS does not run FreeRTOS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3160 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-14 09:46:23 +00:00
pip
4fab429f50 Corrected the #ifdef line (line 26/27), it was "#ifndef STM32103CB_AHRS_H_", it's now "#ifndef STM32103CB_CC_H_"
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3022 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-10 20:22:20 +00:00
sambas
b240915d05 PPM driver cleanup
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3010 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:52:50 +00:00
pip
0d389c4d34 Forgot to comment out serial port debugging option .. sorry - again
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3009 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:32:16 +00:00
pip
48cecfaacd Forgot to commit this file - sorry
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3008 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:29:48 +00:00
sambas
0eeacb44bd PPM driver for OP, first test
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3007 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 18:08:13 +00:00
pip
62e510a696 Set unused/unconnected pins as outputs.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2875 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-24 17:31:24 +00:00
pip
578b779a76 Fixed PPM compile errors - you can now compile for PPM input if desired.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2818 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-20 13:41:19 +00:00
stac
66a9d53d0a hwinit: Convert I2C driver to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2773 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:54 +00:00
stac
3fda65c5d3 hwinit: Convert SPI drivers to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2772 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:50 +00:00
stac
841b0d3d6d hwinit: Convert COM and USART to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2771 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:43 +00:00
peabody124
a3ba9c3781 CC-21 Make it possible to enable Spektrum on CC, although it eats up S6 in
order to free a timer.  Mode PIOS_DELAY (not working cleanly) to TIM3 because
Spektrum resets TIM2 count.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2758 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-08 16:34:45 +00:00
peabody124
03fb82ad0a CC Attitude: Change when AttitudeRaw is set to end of attitude estimation,
because this is what is determines when the Stabilization code executes.
Because we aren't oversampling gyros relative to the PID in CC we should set
the attitude first (computational time to do so is negligible).

Also change update rate to 500 Hz.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2750 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-08 16:34:18 +00:00
pip
6559615ef8 Made quite a few constants/#defines capitals (previously lower case)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2743 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-06 10:55:08 +00:00
peabody124
56d4d54a97 CC: Increase the memory for the modules after removing PriTxTask from CC and
also increase the telem queue to decrease event errors (can be reverted later if
we need the memory back)

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2730 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-05 10:52:59 +00:00