This object is not yet populated or used. This
will soon hold the raw position data from the GPS
receiver. PositionActual will be converted to
hold the computed position from the AHRS.
Contents of this object are still subject to change.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1355 ebee16cc-31ac-478f-84a7-5cbb03baadba
This is to align the object names to matches the UAVObject
architecture doc. No functional changes.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1351 ebee16cc-31ac-478f-84a7-5cbb03baadba
into NED reference frame and used in the INSGPS algorithm, although currently this
information isn't propagated back to OP. Data structures related to the GPS position
into the algorithm and the position estimate out will likely be in flux.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1334 ebee16cc-31ac-478f-84a7-5cbb03baadba
Altitude/pressure sensor data is sent to the AHRS whenever
the AltitudeActual object is updated.
Altitude, Pressure and Temperature are sent as floats.
Same as in the UAVObject that goes to the GCS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1291 ebee16cc-31ac-478f-84a7-5cbb03baadba
No functional change, uavobjects were not regenerated since last
change to the object generator.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1288 ebee16cc-31ac-478f-84a7-5cbb03baadba
The STM32 I2C block has a number of errata associated with it.
These errata are primarily related to timing sensitivities between
the peripheral and the interrupt handler. In particular, the
correct generation of the stop bit relies on the I2C IRQ running
immediately and not being held off for any reason.
NOTE: The I2C interrupts must be the highest priority IRQs in the
system to ensure correct operation.
I2C protocol is now implemented as a formal state machine.
See: stm32_i2c_fsm.{dot,jpg} for FSM description.
I2C init is now expressed by const initializers in pios_board.c
for both OP and AHRS boards.
I2C device drivers (ie. bmp085/hmc5843) now pass in const arrays
of an unlimited number of bus transfers to be done atomically.
The I2C adapter driver now handles all bus-level locking across the
list of transactions. Generation of start/restart/stop conditions
are handled automatically over the list of transactions.
Timeouts have been removed from the API for now. May be added
back later.
This driver has run error free on both the OP and AHRS boards for
up to 48hrs but it still sometimes fails earlier than that on the OP
board. There is another possible set of improvements to the driver
that could employ the DMA engine for transfers of >= 2bytes. This
change would reduce the timing sensitivities between the peripheral
and the driver but unfortunately, both the SPI and I2C interfaces
share the DMA1 engine. That means only one of these two peripherals
can use the DMA engine and right now, SPI between OP and AHRS is
already using it.
Failures are currently fatal and will lock up the CPU. This allows
useful information to be obtained in the failure cases.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1241 ebee16cc-31ac-478f-84a7-5cbb03baadba
The modules were disabled for some reason in r1172.
This just turns them back on for the real targets.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1237 ebee16cc-31ac-478f-84a7-5cbb03baadba
- syntax error in pios_board_posix.c introduced with Doxygen comment blocks
- platform dependant code had been added to openpilot.c instead of pios_board.c
- redundant header inclusion (stm32... already included by PiOS)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1171 ebee16cc-31ac-478f-84a7-5cbb03baadba
- Added FlighSituation Module (development module for sensor fusion, mostly stub, possibly renamed later)
- Added Navigation Module (development module for navigating towards a point in space - DEVELOPMENT CODE, NOT STABLE YET (I am testing around with this))
- Changed Stabilization Module (uses local reference frame now. Stable except for code cleanup/review. Tested in simulator and outperforms old code.)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1154 ebee16cc-31ac-478f-84a7-5cbb03baadba
The AHRS comms module now sync's with the AHRS and
exchanges interesting data periodically. Whenever
the link to the AHRS is down, the AHRSComms alarm is
raised.
This is fairly basic for now but provides the last
piece of the infrastructure to move data back/forth
between the OP and the AHRS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1014 ebee16cc-31ac-478f-84a7-5cbb03baadba
PIOS SPI devices may now make use of automatic CRC generation
and checking on block transfers. Only supports CRC8 for now.
Since the SPI interface CRC calculation continues across message
boundaries (ie. not reset on every transfer), we must manually reset
the CRC registers for every transfer to allow the two sides of the
link to resynchronize.
Unfortunately, resetting the CRC registers requires disabling the
SPI peripheral which must now be done on every block transfer.
Note: The last byte of the tx buffer is never sent and is assumed to
be a place holder for the tx CRC8.
Note: The last byte of the rx buffer is expected to hold the rx CRC8.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1011 ebee16cc-31ac-478f-84a7-5cbb03baadba
The Attitude module will soon be handling updates for all UAVObjects
that require data from the AHRS. To reflect this expansion of scope,
it has been renamed to AHRSComms.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1009 ebee16cc-31ac-478f-84a7-5cbb03baadba
This object currently only holds the serial number of the attached
AHRS board. This will be retrieved each time communications are
(re)established with the AHRS board.
This will eventually be extended to hold some statistics for OP to
AHRS comms.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1008 ebee16cc-31ac-478f-84a7-5cbb03baadba
This object currently holds only the raw magnetometer readings and
an instantaneous heading calculation which are only really useful
for debugging. The contents of this object will change often as
development progresses.
Note: The magnetometer values are often garbage due to a problem
with i2c software on the AHRS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1007 ebee16cc-31ac-478f-84a7-5cbb03baadba
The input data lines between the OP and AHRS boards had internal
pull-ups enabled. This seemed to be causing issues early on
during development of the inter-board comms. Not sure if this
is still necessary but this is how the current code was tested.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1006 ebee16cc-31ac-478f-84a7-5cbb03baadba
This defines the SPI message format as well as a few
initial messages for moving data across the link.
The v0 messages are place holders for firmware download
in the bootloader.
The v1 messages are to be used by the main application.
Note: This is not the final protocol definition.
Subject to change without notice.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1004 ebee16cc-31ac-478f-84a7-5cbb03baadba
Mark the device specific DMA IRQ handlers as strongly linked
aliases for the genericly named interrupt vector symbol.
Here's how this works...
* The address of the symbol DMA1_Channel2_IRQHandler is written
into the DMA1/Channel2 interrupt vector by the linker script.
* The startup_*.S file specifies Default_Handler() as a weakly
linked alias for DMA1_Channel2_IRQHandler.
* We now override the weakly linked alias with the strongly linked
PIOS_SPI_sdcard_irq_handler().
* This results in the address of PIOS_SPI_sdcard_irq_handler() being
written to the vector table for the DMA1/Channel2 interrupt.
* The PIOS_SPI_sdcard_irq_handler() function is now called whenever
the DMA1/Channel2 interrupt fires.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1003 ebee16cc-31ac-478f-84a7-5cbb03baadba
The AHRSComms alarm will be raised whenever the OP board
is not able to communicate with the AHRS board.
The navigation software on the OP board could use this
alarm to trigger its best attempt at an emergency landing.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1002 ebee16cc-31ac-478f-84a7-5cbb03baadba
The sequence number field for the attitude solution is
likely unnecessary. Removed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1000 ebee16cc-31ac-478f-84a7-5cbb03baadba
Moving sounds folder to shared. Some sounds will be uploaded later.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@792 ebee16cc-31ac-478f-84a7-5cbb03baadba