James Cotton
a0b7453580
Make the firmwareIAP variable not a global
2012-04-03 02:07:03 -05:00
Brian Webb
df0a1c2ac1
Upgraded Brian-Metadata-Mods to current next.
2012-04-01 12:25:13 -07:00
Corvus Corax
0742c88a98
enabled optional rtation of Revolution board
2012-03-26 05:25:52 +02:00
Corvus Corax
d32dd0ccd4
Fixed fmod() versus fmodf() usage in flight/...
2012-03-26 04:16:54 +02:00
Brian Webb
1669f00456
Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2
2012-03-24 15:21:16 -07:00
James Cotton
c7ff2a46c7
Merge remote-tracking branch 'origin/laurent/modelview' into revolution
...
Conflicts:
flight/CopterControl/Makefile
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configgadgetwidget.h
2012-03-22 02:58:24 -05:00
James Cotton
2f8049e20a
Update the bootloader hw version for the mpu6000 board and make the sensor code
...
and initialization respond appropriately. Enable hte L3GD20 and BMA180.
Let the board type determine which is used.
2012-03-22 00:41:37 -05:00
James Cotton
6350ec575e
Merge remote-tracking branch 'origin/os/features/stick-deadband-next' into next
...
Conflicts:
ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
2012-03-21 16:03:40 -05:00
James Cotton
a77a859e5c
Using some config switches to get this board up and running
2012-03-21 00:48:31 -05:00
James Cotton
6b88a278b3
Disable overosync by default. It was triggering event system warnings due to
...
the extra updates from altholdsmoothed. Increase queue size when reenabled.
Also AltHold is is trigger warnings because other tasks starve it during
startup.
2012-03-21 00:29:09 -05:00
James Cotton
f4663b98e4
When the event system or object manager has an error store the object ID in the
...
SystemStats.
2012-03-20 23:18:07 -05:00
Brian Webb
823b111d60
Added Reed-Solomon error correction to PipXtreme. The code is a slight modification of rsscode ( http://rscode.sourceforge.net ). Packet acking has also been turned on as the default, so each packet is error corrected, and if errors remain, the packet is NACKed, otherwise it is ACKed. Also temporarily turned off UAVTalk parsing. This was causing the CC to be identified as a PipX due to the PipX sending UAVObjects (I believe) from the system module. The system module is going to have to be modified/replaced for the PipX.
2012-03-18 17:43:29 -07:00
Brian Webb
aba3789d87
Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into Brian-Metadata-Mods
2012-03-18 13:28:11 -07:00
Brian Webb
b34b849453
Added start at a modified PipX packet handler.
2012-03-15 19:29:54 -07:00
James Cotton
0d42303d37
Fix some compilation errors/warnings in attitude.c
2012-03-11 16:30:18 -05:00
James Cotton
820ca6a970
Initialize loop variable OUTSIDE loop so that baro is used still for altitude
...
hold.
2012-03-10 11:28:51 -06:00
James Cotton
f4705551b6
Update task info to cover the AltitudeHold module
2012-03-10 11:14:30 -06:00
Dmitry Zaitsev
d45e88515b
firmware: disable Attitude module in simulation
...
this part should be rewritten to completely disable the polling of sensors.
i just do not know how to do it correctly.
2012-03-10 06:02:23 +04:00
Brian Webb
d73895de7d
Working PipX com relay.
2012-03-07 18:05:42 -07:00
Brian Webb
444150269a
Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into PipXtreme
2012-03-05 18:22:08 -07:00
James Cotton
61d59828dc
Disable the new features if not revolution and set an error flag. Fixes
...
compilation errors.
2012-03-05 00:24:11 -06:00
James Cotton
7961aba83c
Clean up a few more compiler warnings
...
Conflicts:
flight/PiOS/Common/pios_ms5611.c
2012-03-03 13:32:56 -06:00
James Cotton
91a226fc12
Sometimes the mag stops updating so kickstart it
2012-03-03 13:31:46 -06:00
James Cotton
bc8b72623e
Get rid of some unused variables
2012-03-03 11:54:09 -06:00
James Cotton
e3df261213
Merge branch 'stac/revo-usb' into revolution
...
Conflicts:
flight/Revolution/System/pios_board.c
2012-03-02 13:00:13 -06:00
Brian Webb
e2cb750dc6
First cut on RadioComBridge module, which is intended to pass data from either a USART or a USB port to the PipX radio link.
2012-02-25 07:37:05 -07:00
Oleg Semyonov
2271b95816
Merge remote branch 'origin/next' into os/features/stick-deadband-next
...
Conflicts:
ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp
ground/openpilotgcs/src/plugins/config/configtaskwidget.h
2012-02-23 08:32:27 +02:00
Oleg Semyonov
e62cc8914c
Merge remote branch 'origin/next' into os/features/pid-tuning-from-transmitter-next
...
Conflicts:
flight/CopterControl/Makefile
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp
ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
shared/uavobjectdefinition/hwsettings.xml
2012-02-22 23:03:17 +02:00
Oleg Semyonov
403e9cd220
TxPID module: add ILimit values to the list of settings
2012-02-21 19:57:10 +02:00
James Cotton
7b548eaa54
Fix bug in the integral for altitude hold where it was accumulating wrong variable.
2012-02-21 00:40:55 -06:00
Brian Webb
43f6458f86
Reduced the sizeof the UAVObject metadata by:
...
1) Combining all binary or mode values into a single byte
2) Adding accessor functions to read/write the flag bits
3) Reduced the size of the time values from 32 bits to 16 bits
2012-02-20 18:45:18 -07:00
James Cotton
900780e10c
Add bias estimation to the altitude fusion algorithm. Necessary to increase
...
the gains on acceleration and velocity feedback terms (they are a problem when
biased).
2012-02-19 11:38:09 -06:00
James Cotton
47fac7e31c
Move the throttle setting code for alt hold into the fast accel loop.
2012-02-18 18:16:15 -06:00
Oleg Semyonov
c721d001c0
Subtract deadband offset from then input to still have fine control
2012-02-18 10:21:51 +02:00
James Cotton
7d4582e5f0
Update the altitude KF to use the updated measurements appropriately and check
...
in the relevant matlab code to check it and genererate it. Produces quite
smooth traces.
2012-02-16 05:33:47 -06:00
James Cotton
c957172f8f
In the case of swapping in userspace due to the buffer being blocked during
...
ISR, make sure the latency is less than 50 us to avoid framesync errors. Still
seeing a few nonsense packets on Overo side but fairly few. Probably need to
add CRC to whole packet now and call it done.
2012-02-14 11:06:16 -06:00
James Cotton
1930d092eb
In the case where the overo scheduler cannot swap buffers (userspace loading
...
it) then set a flag so as soon as the buffer is loaded then we schedule it.
2012-02-14 11:00:29 -06:00
James Cotton
f04c58b0f4
Make the overo transaction occur based on the rising edge of the NSS line.
...
This fixes most of the frame sync problems. However, it's a bit hacky as
there is currently hardware information inside a module.
2012-02-14 10:37:30 -06:00
James Cotton
d018d93e88
Clean up previous commit a bit and make the sampling rate a variable (and adapt
...
the sampling time accordingly).
2012-02-13 01:49:54 -06:00
James Cotton
3acbfbe96c
Convert the pressure sensor code to most of the calculations as int64 to retain
...
precision.
2012-02-13 01:22:48 -06:00
James Cotton
f23f53dc4e
Add settings for the altitude kalman filter settings and init the state when
...
first measurement arrives
2012-02-12 09:07:27 -06:00
James Cotton
34ca5777dd
Kalman filter for altitude
2012-02-11 21:08:19 -06:00
James Cotton
d8f0494e57
Merge branch 'revolution' into revolution_overo
2012-02-11 20:02:20 -06:00
James Cotton
3026527801
Now the desired altitude is relative to when the switch was flipped so that the
...
baro altitude module can use a smoothed altitude estimate for the starting
point.
2012-02-08 23:02:29 -06:00
James Cotton
80d602ef7b
Switch order of some commands to make sure it loads the correct hover throttle
2012-02-08 20:47:10 -06:00
James Cotton
ab41bae071
Separately smooth the error estimate from the derivative
2012-02-08 11:15:33 -06:00
James Cotton
60c951843d
Use backtracking to limit integral in altitude hold and smooth the velocity
...
error. Initialize the throttle integral better.
2012-02-08 10:39:31 -06:00
James Cotton
c6b1d6b8df
Rework the altitude hold code a bit
2012-02-08 09:42:10 -06:00
James Cotton
49a03a868b
Merge branch 'altitudehold' into revolution_overo
...
Conflicts:
flight/OpenPilot/UAVObjects.inc
flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
flight/Revolution/Makefile
flight/Revolution/ins.c
2012-02-07 23:00:29 -06:00
James Cotton
6ec0f06c80
Back to 1024 byte packets
2012-02-07 13:02:11 -06:00
James Cotton
2c60447200
Switch back to 512 byte packets and fix bug when writing the header size that
...
was smashing the crc
2012-02-07 11:32:04 -06:00
James Cotton
221a0c5e53
Add the number of dropped updates to the overosync stats
2012-02-07 09:13:26 -06:00
James Cotton
a89d425b23
Reset the received rate for overo sync object
2012-02-07 09:01:58 -06:00
James Cotton
02bec750bd
In the attitude loop need to check all the queues even if unused or the event
...
system will have warnings
2012-02-07 08:46:34 -06:00
Stacey Sheldon
e2939dae2a
revo usb: Add support for USB to Revo
2012-02-07 02:25:31 -05:00
James Cotton
ae01936808
Add the portTickTime into the OveroSync stream
2012-02-06 10:00:02 -06:00
James Cotton
dbcb499d7f
Add object to monitor the overo link status. Current just records the bytes/s
...
being sent and the connected status (based on sending more than 500 bytes per
second)
2012-02-06 09:37:31 -06:00
James Cotton
5b2376dbee
Remove the semaphore for buffer swapping and make this occur during the receive
...
ISR. This leads to a possible condition where a copy is taking place in
userspace and then a buffer swap interrupts it. However, the copy should
always finish before the SPI DMA slave catches up to that place in memory at 10
MHz.
This fixes a common condition where the userspace task (low priority) was not
swapping buffers in time from user space and logs were corrupted.
2012-02-06 08:21:24 -06:00
James Cotton
179e66b754
Refactor how new packets are scheduled to avoid trying to start a transaction
...
from an ISR. This was causing lock ups. It's a bit higher latency probably
(trivially slow) but if we aren't keeping up with the Overo transactions then
using a proper DMA double buffer will be required.
2012-02-04 20:11:31 -06:00
James Cotton
665801662d
In cc3d update sensors add accelbias before scaling to allow more precision in
...
levelinIn cc3d update sensors add accelbias before scaling to allow more
precision in levelingg
2012-02-04 12:12:41 -06:00
James Cotton
4e190f99e2
Improved the revo overosync code to put multiple uavobjects into a packet
2012-02-04 12:06:03 -06:00
James Cotton
c26154f303
Switch back to 256 byte packets and 0xFF pad the end
2012-02-02 11:40:49 -06:00
James Cotton
8b1137c6a0
Align the tx and rx SPI buffers from Overosync
2012-02-02 11:23:40 -06:00
James Cotton
0a71a48c57
Sending all FF finally again
2012-02-02 10:36:09 -06:00
James Cotton
95abb56d5e
Added module to send updates out the SPI port
2012-02-02 09:19:25 -06:00
James Cotton
a778c45d6f
For L3GD20 sensor task run at the sensor speed
2012-01-28 10:11:30 -06:00
James Cotton
13447ac907
Fix the MPU6000 implementation
2012-01-28 00:21:58 -06:00
James Cotton
b4435d0b35
For L3GD20 sensor task on revo update gyro once per physical sample
2012-01-26 23:29:12 -06:00
James Cotton
84dd1dbc40
A bit more lenient settings for CC sensor timings
2012-01-26 13:00:06 -06:00
James Cotton
727f0befc5
Make the gyro go a bit more regularly to stabilization but needs updating
...
regular CC
2012-01-25 22:50:19 -06:00
James Cotton
e4df3202e0
L3GD20: Update sensor task for revo to use the new queue
2012-01-25 22:50:19 -06:00
James Cotton
205aabe895
L3GD20: Make this sensor push data onto a FreeRTOS queue so that the sensor
...
reading task can block according. Also now the gyro data is sent to
stabilization multiple times per update of the attitude loop.
2012-01-25 01:20:07 -06:00
James Cotton
1971ba30dc
No longer hardcode baudrate
2012-01-24 23:42:43 -06:00
James Cotton
104c091590
Correct the range constants for the L3GD20 driver
2012-01-24 19:48:14 -06:00
James Cotton
a25d52785b
Change the bus speed for the L3GD20 to 10MHz and some small cleanups
2012-01-24 19:17:49 -06:00
James Cotton
b6c056fef2
Use the updated L3GD20 format and make attitude.c use the gyro data from the
...
fifo
2012-01-24 15:52:17 -06:00
James Cotton
5efbfb02fa
Make the BMA180 sensor system acquire from the queue. Correct the orientation
...
and speed it up to 10 MHz communications.
2012-01-24 15:09:20 -06:00
James Cotton
8c208412c9
Give the BMA180 a dynamically allocated device structure and also make it
...
properly bind to a SPI and slave number. Temporarily reducing spi bus to
slowest possible speed.
2012-01-24 14:38:00 -06:00
James Cotton
8e79bc2ee2
Temporarily refactor attitude to directly read the sensors instead of pull from
...
their queues until the interrupts are working properly
2012-01-24 11:54:23 -06:00
James Cotton
e9552065a9
Reenable the CC3D sensors
2012-01-24 11:03:33 -06:00
James Cotton
c242ab8b86
Merge branch 'next' into revolution3
...
Conflicts:
flight/AHRS/ahrs.c
flight/AHRS/pios_board.c
flight/Bootloaders/Revolution/Makefile
flight/CopterControl/System/pios_board.c
flight/INS/pios_board.c
flight/OpenPilot/Makefile
flight/OpenPilot/System/openpilot.c
flight/OpenPilot/System/pios_board.c
flight/PiOS/Boards/STM32103CB_CC_Rev1.h
flight/PiOS/Boards/STM32F4xx_Revolution.h
flight/Revolution/Makefile
flight/Revolution/System/inc/pios_config.h
flight/Revolution/test.c
2012-01-24 10:46:35 -06:00
James Cotton
486cdb5dbb
Got CC running again although with altitude and bmp085 disabled as well as the
...
CC3D drivers.
2012-01-24 10:32:42 -06:00
James Cotton
4d3af7afbf
Add ID test to ADXL345
2012-01-24 09:23:12 -06:00
James Cotton
728c05f973
Crude implementation of sensor reading for CC3D
2012-01-24 09:23:12 -06:00
James Cotton
11471ff68b
Update drivers for CC to the new EXTI system and SPI calls
2012-01-24 09:23:12 -06:00
James Cotton
a20d654744
Update the attitude algorithm for CC to use the Gyros and Accels UAVObjects
...
instead of AttitudeRaw
2012-01-24 09:23:12 -06:00
James Cotton
d864b481a1
Fix a few more merge conflicts
2012-01-23 04:47:35 -06:00
Stacey Sheldon
6bb4f0c61d
leds: use boot-time config for PiOS LED layer
...
LEDs are now configured based on a board-specific initialization
in PIOS_BOARD_Init().
LEDs are now named:
PIOS_LED_HEARTBEAT
PIOS_LED_ALARM
2012-01-22 18:22:59 -05:00
James Cotton
bb0bfe0ae4
Merge branch 'next' into revolution3
...
Conflicts:
flight/Bootloaders/CopterControl/Makefile
flight/Bootloaders/PipXtreme/Makefile
flight/Bootloaders/Revolution/inc/pios_config.h
flight/CopterControl/Makefile
flight/INS/inc/pios_config.h
flight/Libraries/taskmonitor.c
flight/Modules/Altitude/altitude.c
flight/Modules/Attitude/attitude.c
flight/OpenPilot/Makefile
flight/OpenPilot/Makefile.posix
flight/OpenPilot/System/inc/pios_usb_board_data.h
flight/OpenPilot/System/inc/taskmonitor.h
flight/OpenPilot/System/pios_board.c
flight/OpenPilot/System/taskmonitor.c
flight/PiOS/Boards/STM32F4xx_Revolution.h
flight/PiOS/STM32F4xx/pios_bmp085.c
flight/PiOS/STM32F4xx/pios_iap.c
flight/PiOS/pios.h
flight/Revolution/System/inc/pios_config.h
flight/Revolution/System/inc/taskmonitor.h
flight/Revolution/System/taskmonitor.c
ground/openpilotgcs/src/plugins/serialconnection/serialplugin.cpp
shared/uavobjectdefinition/systemalarms.xml
shared/uavobjectdefinition/taskinfo.xml
2012-01-21 11:27:03 -06:00
James Cotton
f8e59443b8
If the BMA180 isn't read when an IRQ fires (because the flash chip has claimed
...
the bus) then it won't fire another interrupt until read. For now this is
dealt with in the sensor loop by forcing a read when the fifo is empty.
2012-01-21 10:13:46 -06:00
James Cotton
6d72678086
Add timeout in the sensor task for reading sensors to stop the watchdog firing.
...
All sensors should later be converted to use FreeRTOS queues.
2012-01-21 08:32:41 -06:00
Stacey Sheldon
64202ce092
Merge remote-tracking branch 'origin/stac/i2c_decoupling' into next
2012-01-17 22:35:36 -05:00
Stacey Sheldon
ad141c908a
Merge remote-tracking branch 'origin/stac/usb-composite-device-v2' into next
2012-01-17 22:26:38 -05:00
James Cotton
ce2d0fcbb1
L3GD20 data now running through IRQ -> FIFO
2012-01-17 19:36:32 -06:00
James Cotton
35025303cd
Getting data from gyro.
2012-01-17 19:29:38 -06:00
Stacey Sheldon
b05697c2cf
taskinfo: ensure usage of TaskInfo uavo is covered by DIAG_TASKS
...
OpenPilot platform (and thus sim too) was missed when the
DIAG_TASKS macro was broken out from the DIAGNOSTICS macro.
This allowed accesses to the TaskInfo UAVO even though it hadn't
been initialized.
2012-01-15 18:16:50 -05:00
Stacey Sheldon
0575b45378
usb: make USB usage depend on PiOS config
...
USB is not supported on sim platforms. Let PiOS
config determine when we use it.
2012-01-15 18:16:49 -05:00
Stacey Sheldon
c97b108a1f
bootfault: make IAP usage depend on PiOS config
...
The sim platforms don't support an IAP mechanism. Let
PiOS config control when we try to use it.
2012-01-15 18:16:49 -05:00
Oleg Semyonov
912bea559f
Add stick deadband option for Roll/Pitch/Yaw inputs to firmware
2012-01-15 21:13:22 +02:00
Stacey Sheldon
27ceb7ea92
modules: Allow optional modules to be used as built-in
...
Some modules are written such that they can be included
or excluded at runtime. These are added to the OPTMODULES
list in the makefile for a given board.
This change provides a mechanism to allow a build to force
a given module to be built-in (ie. always initialized)
regardless of the configuration in hwsettings.
The main use case for this is to handle a module being optional
on one platform but essential on another.
All modules added to the MODULES list in the Makefile will
automatically result in a matching #define in the form
MODULE_TheModuleName_BUILTIN
being defined in the CFLAGS for all compiled source.
Note that the capitalization of TheModuleName must match
exactly the capitalization used in the MODULES list.
2012-01-14 16:55:55 -05:00
Stacey Sheldon
53e9ef06b4
altitude: add optional altitude module
2012-01-14 15:38:56 -05:00
Stacey Sheldon
717c1311e6
altitude: allow altitude to be an optional module
2012-01-14 15:38:56 -05:00
Stacey Sheldon
4cb0c41338
bmp085: only use eoc and drdy gpios when available
...
When the bmp085 chip is on an external board, we don't
have access to the eoc and drdy gpio lines. Only use
them when available.
2012-01-14 15:38:56 -05:00
James Cotton
cc47520baa
Checking ID on ST gyro works
2012-01-04 23:23:42 -06:00
James Cotton
0fbcf7723d
Code to disable all gyros. All modules now running.
2012-01-04 22:37:15 -06:00
James Cotton
5ee9c8008e
Temporarily swap serial ports while debugging
2012-01-04 22:19:13 -06:00
James Cotton
0cc18e7dcf
Add files for new L3DG20 sensor
2012-01-04 20:33:54 -06:00
James Cotton
d2ce7761c5
Add derivative term
2012-01-03 12:37:18 -06:00
Stacey Sheldon
025ed0f43c
Merge remote-tracking branch 'origin/stac/usb-composite-device-v2' into next
...
Conflicts:
HISTORY.txt
2012-01-03 00:02:45 -05:00
Stacey Sheldon
8d8715c8c1
copyright: add/correct GPL + copyright boilerplate
...
I missed some of the boilerplate text on some of the
new files I've added recently. Fixed.
2012-01-02 23:28:53 -05:00
Stacey Sheldon
b94f4b49a4
usb: major refactoring of USB descriptors, CDC and HID
...
Summary of changes:
* USB CDC and HID drivers are completely split apart.
* This will allow different max buffer sizes for HID and CDC.
* USB descriptors have been overhauled:
* Proper structs/macros/enums declared for USB (see pios_usb_defs.h)
* Two common descriptor definitions. One for HID+CDC another for HID only.
See pios_usb_desc_{hid_cdc,hid_only}.c for details.
* Long standing bugs in OP USB descriptors became much more obvious with the
new struct definitions.
* Board specific USB initialization is now in pios_usb_board_data.h in each build target.
* Definition of USB descriptors is now entirely indpendent of STM32 libs.
Glue into STM32 libs is provided by pios_usbhook.c.
* Removed a lot of stale/irrelevant USB #defines throughout the tree.
* Improved naming consistency throughout USB code:
* PIOS_USB_HID_* now refers to the HID endpoint code.
* PIOS_USB_CDC_* now refers to the CDC endpoint code.
* PIOS_USB_* now refers to the low-level USB code.
* PIOS_USB_BOARD_* now refers to board-specific USB data
* PIOS_USBHOOK_* is glue between PIOS and STM32 USB libs.
* struct usb_* and enum usb_* and USB_* and HID_* are all types from the USB spec.
* Shrunk the buffer size on the CDC call mgmt endpoint to save some RAM.
* Made a few more USB related variables static to save some RAM.
2012-01-02 14:27:06 -05:00
Oleg Semyonov
77a459af5c
Merge remote branch 'origin/next' into os/TxPID-module
2012-01-02 14:49:54 +02:00
Oleg Semyonov
b01e332e03
CameraStab: rename UAVO field
2012-01-02 14:27:05 +02:00
Oleg Semyonov
65abb8f819
CameraStab: small optimization, freed 8 more heap bytes
2012-01-02 14:27:00 +02:00
Oleg Semyonov
406cff296d
CameraStab: bypass LPF calculation if ResponseTime is zero
2012-01-02 14:26:58 +02:00
Oleg Semyonov
e11904c42f
CameraStab: change ResponseTime type from float to int16
2012-01-02 14:26:56 +02:00
Oleg Semyonov
2eb5130a7c
CameraStab: new camera stabilization mode and low-pass stick input filtering
...
This patch is based on work of Crubier (LPF) and Cossacs (AxisLock mode).
I've just reworked it a bit by adding a dynamic memory allocation for
static module data.
2012-01-02 14:26:54 +02:00
James Cotton
ef05cafaca
Merge branch 'revolution' into altitudehold
...
Conflicts:
flight/Libraries/insgps13state.c
flight/OpenPilot/Makefile
ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
2012-01-01 10:50:35 -06:00
Stacey Sheldon
5c0921e92c
fault: add optional fault insertion module
...
This module and its associated settings uavo can be used
to test various fault conditions during initialization.
To enable the module, add the TEST_FAULTS=YES to your make
command line:
make fw_coptercontrol TEST_FAULTS=YES
Once this module is part of your firmware load, you can
enable it in the hwsettings uavo and then select the
type of fault to insert by editing the faultsettings uavo.
On the next reset, the configured fault will be inserted
into the init sequence to allow you to test the boot fault
recovery code.
With a fault inserted, you should see 3 failed boot attempts
followed by a successful (recovery) boot. You will see the
BootFault alarm set to Critical, and the RAM version of your
hwsettings will be reset to defaults. Since the defaults have
all optional modules disabled, the fault module will be out of
the way during the recovery boot.
You can then "Load" the flash version of the hwsettings uavo
in the object browser, disable the Fault module and then "Save"
the hwsettings module back to the board. The next reset will
boot normally without the fault inserted.
2011-12-30 23:05:39 -05:00
Stacey Sheldon
f886af186d
bootfault: add support for recovery from init failures
...
After 3 failed warm start attempts, the init sequence
will force the RAM version of the HWSettings object
to its defaults. This should allow a user to regain
connectivity to a board that is continually faulting
during init.
This is accomplished by:
- Incrementing a boot counter that is stored in the
STM32 BKP registers. These registers survive a
warm start but are cleared on a cold start (ie. powerup).
- On multiple failures, force hwsettings to defaults
and raise the (new) BootFault alarm to prevent arming.
- Resetting the boot counter whenever the system manages
to successfully run the System Module task.
NOTE: This does not actually change the hwsettings object in
flash. That's up to the user.
This is intended to catch ONLY faults during early initialization.
It should not be used to recover from faults after the application
is up and running.
2011-12-30 23:05:38 -05:00
Stacey Sheldon
1543a6dbd3
hwsettings: allow disabling of USB telemetry entirely
...
The GCS hwsettings config widget now disallows any
configuration that disables both HID and VCP telemetry
over the USB port.
The firmware will allow it if the UAVObj is set manually.
This allows a mechanism to reduce RAM usage by another
500 more bytes if USB telemetry can be sacrificed in
certain configurations.
2011-12-30 23:05:38 -05:00
Stacey Sheldon
7c03875013
diag-tasks: make taskinfo diagnostics a separate enable
...
This allows task stack analysis without turning on all
of the other diagnostics.
2011-12-30 23:05:37 -05:00
Stacey Sheldon
ab135aa00b
com-bridge: Make com-bridge an optional (and configurable) module
2011-12-30 23:05:36 -05:00
Stacey Sheldon
785a7ccd88
uavtalk: convert tx to use blocking send routines
...
The uavtalk layer was previously implementing a poor
version of packet fragmentation based on a hard-coded
max packet size. Since this was hard-coded, there was
no guarantee that it would match the underlying devices.
Now that the COM layer sending routines support fragmentation,
remove fragmentation and use the COM layer directly.
This will support future buffer size reductions in the COM
layer.
2011-12-30 23:05:36 -05:00
Stacey Sheldon
a68f5a4fc9
com-bridge: detect lost characters on transmit
2011-12-30 23:05:36 -05:00
Stacey Sheldon
64f498e48a
com-bridge: add usart to usb vcp bridge
2011-12-30 23:05:34 -05:00
Stacey Sheldon
eebdda6276
usb cdc: make HID/CDC configurable in hwsettings
2011-12-30 23:05:34 -05:00
Stacey Sheldon
617a30c07c
usb cdc: attach telemetry to CDC rather than HID
2011-12-30 23:05:34 -05:00
Stacey Sheldon
c0259dc616
usb cdc: USB composite device with HID + VCP
2011-12-30 23:05:33 -05:00
James Cotton
25dfb5463e
Add option to switch to using the MPU6000 accel instead of BMA180. Disabled by
...
default.
2011-12-29 02:08:13 -06:00
James Cotton
bf98630851
Add streaming the sensor data out of the serial port
2011-12-26 17:52:45 -06:00
James Cotton
9bf06bbd3e
Force the loading of the sensor gains and biases at the beginning
2011-12-24 16:14:28 -06:00
James Cotton
1092ac3184
Use the scale and bias terms for hte mag and accel
2011-12-24 15:58:12 -06:00
James Cotton
5d4da2213f
Accidentally used floating point when parsing NEMA. Lost resolution on
...
position.
2011-12-24 10:37:30 -06:00
Oleg Semyonov
7fbbb0e6af
Merge remote branch 'origin/next' into os/TxPID-module
2011-12-24 15:44:16 +02:00
Oleg Semyonov
495a8f2836
TxPID: initialize the AccessoryDesired object before use its handle
...
Also save few bytes of static RAM and add PIOS_Assert(0) for unhandled cases.
2011-12-24 15:37:14 +02:00
James Cotton
0b00e748a9
OP-565: Added the ability to do a trim flight to compute the accels for level flight
2011-12-21 15:25:00 -06:00
James Cotton
dd89d232ba
Add a magnetometer bias term although currently hardcoded to my board
2011-12-15 00:57:19 -06:00
James Cotton
0432dd450e
Enable the mag to be used in the complimentary filter to stabilize the yaw
...
direction
2011-12-15 00:56:50 -06:00
James Cotton
2240ad924a
Fix the orientation of the magnetometer
2011-12-15 00:46:43 -06:00
James Cotton
43ed6cd89c
Need to initialize the HomeLocation object
2011-12-14 14:08:03 -06:00
James Cotton
9148bb2c65
Make sure the sensors module grabs the sesor biases initially.
2011-12-14 10:38:43 -06:00
James Cotton
09864a8cf6
Get outdoor EKF running although need to add in the ability to swap modes
...
(probably).
2011-12-14 02:07:33 -06:00
James Cotton
fd8899018f
Get EKF running
2011-12-14 01:54:06 -06:00
James Cotton
ed7cbd5a6c
Have to initialize the BaroAltitude object ini the init section for it to show
...
up on telemetry
2011-12-13 23:27:26 -06:00
James Cotton
a37a17a4fb
Created a separate Sensor module and Attitude module for revolution
2011-12-12 21:40:39 -06:00
James Cotton
53cb5b67d1
Make the revo attitude now use the separate gyro object. CopterControl
...
attitude still needs an update.
2011-12-12 13:28:35 -06:00
James Cotton
d22e0e66dd
Create separate UAVOs for the sensors.
2011-12-12 13:05:40 -06:00
James Cotton
7273f87f9b
Fix NMEA parsing for M4 FPU
2011-12-12 09:47:11 -06:00
James Cotton
a9c61845af
Create a separate task for sensors and attitude on revo.
2011-12-12 00:47:16 -06:00