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

3112 Commits

Author SHA1 Message Date
James Cotton
5a6e02a688 Merge remote-tracking branch 'origin/Brian-PipXtreme-V2' into next 2012-05-25 20:37:23 -05:00
Brian Webb
b824c87056 Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2 2012-05-25 06:26:29 -07:00
Brian Webb
701a480f01 Tuning configutation of PipX. 2012-05-24 18:08:29 -07:00
Brian Webb
f48bb90cf6 Updated PipX bootloader USB configuration to match CC. 2012-05-24 18:06:19 -07:00
Brian Webb
a434688b42 Zero out watchdog register on init. 2012-05-24 18:04:42 -07:00
Stacey Sheldon
ac75dd7be1 Revert "bu: remove LED support from bootloader updaters"
This reverts commit 7f03a77492.
2012-05-23 00:46:19 -04:00
Stacey Sheldon
400e529703 bu: add back LED feedback
LED support was dropped from the BU images due to a lack
of proper abstraction for LED definitions between CC and
CC3D HW variants in the CopterControl board family.

Use the new LED abstraction to hide board revision details
from the BU image so it can once again flash some LEDs.
2012-05-23 00:31:08 -04:00
Stacey Sheldon
56dddee56c cc: use defines for board revisions instead of hard-coded numbers 2012-05-23 00:29:12 -04:00
Stacey Sheldon
d2615cac96 hw_defs: hide board-rev differences in LED definitions
Every board has at least one LED (HEARTBEAT).  Not all
users of LEDs need to be directly aware of which LED
configuration to choose when there may be more than one
possible configuration.

Hide the details of the differences between LEDs used in the
different HW revs for CC.  This will allow generic code to
run on CC and CC3D without being exposed to the details of
the different pins used for the LEDs.
2012-05-23 00:22:11 -04:00
Stacey Sheldon
b97aba834a cc3d leds: move pin remapping into led definition
The LED driver supports GPIO remapping.  No need to
do the remapping outside of the LED definition.
2012-05-23 00:12:51 -04:00
Stacey Sheldon
dff43d5156 board_info: add guard for multiple includes of .h file 2012-05-22 21:50:53 -04:00
Corvus Corax
64c1ac3bd6 Stabilization: Bugfix: moved queue initialisation to TaskStart where it belongs 2012-05-22 22:19:31 +02:00
Corvus Corax
7f334a9773 SimPosix: make use of compile time uavobjecto initialization function generation 2012-05-22 22:06:26 +02:00
Corvus Corax
31da29a24b Reenabled full UAVObject initialization for SimPosix 2012-05-22 21:22:59 +02:00
Corvus Corax
3e5741abea SimPosix: Remove unneeded modules from Makefile to allow test run 2012-05-22 18:45:23 +02:00
Corvus Corax
9aca773714 SimPosix: Reenabled File IO for UAVObject saving 2012-05-22 18:32:52 +02:00
Corvus Corax
0d23e78762 PiOS.posix: added missing header definition to use FreeRTOS tasks in udp driver if applicable 2012-05-22 18:32:47 +02:00
Corvus Corax
e16a42b672 SimPosix: Fixed Module Initialisation, added missing UAVObject Initialisations (cause segfaults if not initialised) 2012-05-22 18:32:41 +02:00
Corvus Corax
5727d5714e Created new "SimPosix" board and ported PiOS.posix to revolution API and more "standard like" configuration akin to other "boards" 2012-05-22 18:32:27 +02:00
Corvus Corax
414310fcba test add of SimPosix architecture - doesnt work yet 2012-05-22 18:28:42 +02:00
Brian Webb
8b98d48fc4 Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2 2012-05-22 06:27:45 -07:00
Stacey Sheldon
3b0508e753 bu: check compatibility btw BL and HW before installing
CC and CC3D boards share the same FW image.  This is accomplished
by checking the BOARD_REVISION field in the board_info_blob
that is stored in the BL partition in flash as we init the FW.

Make sure that the BU image only writes a BL image that has
the same BOARD_TYPE and BOARD_REVISION fields in the embedded
image as the ones currently in flash on the board.

This ensures that we never write a CC3D BL image onto a CC board
and vice versa.  This check should prevent "bricking" a board.
2012-05-22 00:33:40 -04:00
Stacey Sheldon
e063bb0490 bl: use new USB "cable connected" API to halt in BL
BL only cares about the physical cable being connected.
Use the newly provided API that matches this intent.
2012-05-22 00:24:16 -04:00
Stacey Sheldon
dab400c80d usb: decouple "available" from "cable connected"
The bootloader needs to understand whether the USB cable
is connected.  The HID and CDC drivers need to know if
the cable is connected _and_ the device has been enumerated
already.  Separate these two concepts in the API.

Combining these was resulting in the BL not properly
detecting that the cable was plugged in, and trying to boot
the firmware image immediately.  This effectively bricked
the board if you ever had an invalid firmware image.

It also happens to be the case that the BU images automatically
invalidate themselves after updating the BL so they don't run
again.  The cable detect bug + this intended behaviour of the
BU image resulted in a bricked board after upgrading the BL.
2012-05-22 00:21:24 -04:00
Brian Webb
6e359c5933 Added PipX to Windows .inf file and updated ppm port definitions. 2012-05-21 19:22:46 -07:00
Brian Webb
e57543ec29 Updated USB on PipX to latest CDC changes. 2012-05-20 19:34:43 -07:00
Brian Webb
6cb13aa2ba Fixed failed merge with next. 2012-05-20 18:36:08 -07:00
Brian Webb
2f1a9e3e7d Added PPM input to the PipXtreme. Also added configurable GCSReceiver timeout. 2012-05-20 18:30:37 -07:00
Stacey Sheldon
d7d670036b usb: make sure USB device is off limits until it has been init'ed
USB device was being accessed prior to being initialized.
This resulted in a hard-fault or NMI when using any endpoint
beyond 0 or 1 which are init'ed by the BL.  This broke VCP which
is on endpoint 2 (control) and 3 (data).

This bug was introduced in 5ad37e69 which stopped checking the
transfer_possible variable.
2012-05-20 13:28:16 -04:00
Stacey Sheldon
7e6a222a8e usb serial: refactor serial number construction
Use new PIOS_USB_UTIL_AsciiToUtf8() function to compose the
USB serial number rather than repeating that code for each
board.

All boards now append "+FW" or "+BL" to their USB serial numbers
to allow the descriptors to differ between FW and BL images.
2012-05-19 16:15:47 -04:00
Stacey Sheldon
698ea8e86e usb util: Add common utility functions for USB descriptors
Make a home for generic functions related to USB.
2012-05-19 16:14:10 -04:00
Stacey Sheldon
3e0a9bc47e usb: Change supported LANGID in USB descriptor to be English US
Some versions of Windows will ignore the USB device serial number
if the string is not delivered with LANGID = English US 0x0409.

This is true regardless of the configured locale of the machine.
2012-05-19 16:12:34 -04:00
Stacey Sheldon
19367730c0 usb: remove null termination on serial number string
The serial number string descriptor was incorrectly null
terminated.  The standard clearly states that there should
not be a null terminator.

Use new #defines to ensure that our strings are sized
properly.
2012-05-19 16:06:49 -04:00
Stacey Sheldon
b905607dc7 serial: use defines for serial number lengths
Use #defined sizes for returned serial number lengths instead
of hard-coded values.
2012-05-19 16:06:48 -04:00
Stacey Sheldon
ba8d60301c usb: remove run-time selectable device descriptors
BL images now always use hid-only.

FW images can use hid-only or hid+vcp but this is selected
ONLY at compile time based on whether PIOS_INCLUDE_USB_CDC
is defined.

CC uses HID+VCP by default now.
2012-05-19 16:06:48 -04:00
Stacey Sheldon
d4b0475f6a usb-descriptors: add +BL or +FW suffix to serial number string
This makes the BL and FW images distinct devices with unique
serial numbers.

Windows (and maybe Mac) remembers the device descriptors and
the associated drivers based on this serial number.  Providing
unique serial numbers for the BL and FW images allows us to
provide different sets of descriptors for the BL and FW images
without confusing these OSes.

BL version number is now also bumped to reflect the new
serial number generation algorithm.
2012-05-19 16:06:44 -04:00
Stacey Sheldon
461d4a2ddd hid+vcp: Add Windows INF file for CDC on OpenPilot boards 2012-05-19 16:06:43 -04:00
Stacey Sheldon
48cb20dc81 hid+vcp: change default USB descriptor to HID+VCP
Now that we have a USB descriptor for HID+VCP that works
on Ubuntu 11.10, MacOS 10.7.3, Win7-SP1-32bit,
WinXP-SP3-32bit, Win7-SP1-64bit.

VCP is known to not work on WinXP without service pack 3.
2012-05-19 16:06:30 -04:00
zedamota
eb83afdcf1 Working compliant VCP+HID descriptors for Windows. 2012-05-19 15:40:46 -04:00
Brian Webb
6a7179120d Fixed setting of PipX description, and changed gcs receiver object to be update on change on flight side so that it works on the PipX. 2012-05-19 09:25:11 -07:00
Brian Webb
00a83f3984 Reverted change to link_STM32103CB_PIPXTREME_memory.ld 2012-05-18 19:08:44 -07:00
Brian Webb
c25884bcaf Cleanup on the PipX branch. 2012-05-18 17:42:25 -07:00
Brian Webb
68d66d4181 Fixed firmware description in PipX status. 2012-05-17 20:35:17 -07:00
Brian Webb
6fbc3339d5 Fixed processing of UAVTalk packets when in transparent com mode. 2012-05-17 18:37:45 -07:00
Brian Webb
44a1663eb9 Fixed transparent comm on PipX. 2012-05-16 19:02:53 -07:00
Brian Webb
7082eda175 Fixed returning status for currently paired modem. 2012-05-15 20:11:52 -07:00
Brian Webb
93ec7c11a6 Fixed race condition on getting packets. 2012-05-15 19:38:14 -07:00
Corvus Corax
badf509d1d UAVObjects: switched around order of update modes to give each bit semantic meaning - important to allow usage of a bitfield type later 2012-05-15 18:21:27 +02:00
James Cotton
af8d65616e Comment out some unused variables in the PIOS_ADC structure for now since they
were consuming lots of memory.  Probably should make a simple adc version that
just queries the line when needed since we are only using this data at 500 ms.
However, the accumulator scheme in place is quite good for averaging over time.
2012-05-15 03:48:32 -05:00
James Cotton
bbb14f5f14 Trying to get F4 PIOS_ADC working. Changed from previous implementation timed
by another timer to running continuously.  May go back to the previous since no
need to get tons of data.
2012-05-15 03:19:44 -05:00
James Cotton
39ce3cea17 Clean up the battery module 2012-05-15 03:08:18 -05:00
James Cotton
0a7f5fd5d3 Enable battery code again 2012-05-15 00:38:11 -05:00
Brian Webb
bb491b8a3f Fixed bootloader on PipX. 2012-05-14 06:57:16 -07:00
Brian Webb
31069d8858 Small mod to flash saving. 2012-05-13 20:20:17 -07:00
Brian Webb
563b454693 Fixed compiling of PipX bootloader. 2012-05-13 20:19:04 -07:00
Brian Webb
a3269aaf2f Reverted some file permission changes. 2012-05-13 14:24:57 -07:00
Brian Webb
68d12b1b2f Fixed some bugs with setting PairIDs in GCS. 2012-05-13 14:24:00 -07:00
Brian Webb
dd03b0b159 Added reporting of stats from the remote modem. 2012-05-13 09:34:21 -07:00
Brian Webb
ec67742ff6 Added configuration of COM ports on PipX. 2012-05-12 13:16:36 -07:00
James Cotton
46fc5fa4fb Create a PathPlannerSettings object and move the PathMode setting to there.
Also add a (temporary) field to allow storing some custom paths to select on
the fly.  Later will be replaced with some code to fetch from the flash chip.
2012-05-12 13:12:57 -05:00
James Cotton
836e34a483 Change revo sensors to update at 500 Hz and make sure in all cases it waits for
the relevant queue to provide data.  Also disable the quaternion stabilization
flag.
2012-05-12 13:12:56 -05:00
James Cotton
65065f2588 Fix the ADC code on the BL for revolution 2012-05-12 13:12:56 -05:00
James Cotton
c660dd17f0 Correct comment in CC settings for MPU6000 and disable I2C support 2012-05-12 13:12:55 -05:00
James Cotton
848f1b0e29 For some reason the gyro needs 300 ms after reset in order to work after the
bootloader jumps to code.  Nothing in datasheet to imply what.
2012-05-12 13:00:51 -05:00
James Cotton
2ca3cde83f Improve EKF initialization. For some reason we must read an extra mag sample
when power up value of attitude algorithm is EKF.  I don't understand why the
first mag value is bad.
2012-05-12 13:00:51 -05:00
James Cotton
98655aacc8 Fix initialization of the complimentary filter where it didn't get the right
initial dT
2012-05-12 13:00:50 -05:00
zedamota
817ce9327f flight - fix pipxtreme bootloader compile 2012-05-12 12:57:15 +01:00
Brian Webb
1f5dbcf57c Mostly complete PipX configuration GUI. 2012-05-11 17:51:18 -07:00
James Cotton
406b5a00f5 Make OSX simulator more efficient 2012-05-08 03:12:35 -05:00
James Cotton
4ec4edd15c When enabling position hold altitude mode take the throttle from before as the
"hover" throttle
2012-05-08 03:12:14 -05:00
James Cotton
2857b58f8e Migrate path planner from position desired to path desired 2012-05-08 03:04:44 -05:00
James Cotton
37bb2cfb77 Finish getting rid of PositionDesired in favor of PathDesired and add the
ability to move the magic waypoint with the transmitter
2012-05-08 02:42:58 -05:00
James Cotton
a8bdd4a44a Coalescene PositionDesired and PathDesired into PathDesired and add a mode
field to indicate how it should be interpreted.
2012-05-08 02:29:58 -05:00
James Cotton
27d1c4be93 Extend list of airframe types for VTOL guidance 2012-05-08 02:29:58 -05:00
James Cotton
c723ae3720 Reduce the CPU usage of OSX simuluator 2012-05-08 02:29:58 -05:00
James Cotton
cbedb5b53b Move Guidance to VtolPathFollower to make room for FWPathFollower 2012-05-08 02:29:50 -05:00
James Cotton
0f2c41ac5d Merge branch 'revolution' into navigation
Conflicts:
	flight/Modules/ManualControl/manualcontrol.c
	flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/project.pbxproj
2012-05-07 21:53:10 -05:00
James Cotton
6aa7142f5e When guidance finds an incorrect airframe, delay 100ms to avoid hammering the
alarms
2012-05-07 12:55:35 -05:00
Sambas
dedbbec8f0 Make guidance support my Y6, also caused telemetry/usb RXdatarate go thru the roof (Guidance Warning). Almost impossible to change dataframe type to supported one with clean board.
USB interrupt fix.
Heap warning critical sizes backwards.
2012-05-07 12:51:07 -05:00
Oleg Semyonov
a3906aa7ea Merge remote-tracking branch 'origin/hhrhhr/AeroSimRC_plugin' into os/aerosimrc 2012-05-07 16:09:35 +03:00
James Cotton
d8c288f223 Disable LEDs on the bootloader update as without knowing the particular
hardware revision it cannot know which pios_led_cfg_ structure to use.
Possibly this should be abstracted further into board_hw_defs to create
functions like board_init_led.

Also the BU should probably compare the hw_revision of the original and new
bootloader to make sure the user doesn't break their board.
2012-05-07 01:59:38 -05:00
James Cotton
a40a0b0e31 Small fix to be able to build CC for Revo branch and to include revo in
package.
2012-05-07 01:55:52 -05:00
Brian Webb
454144f46c Pairing and saving settings working. 2012-05-06 20:47:21 -07:00
Brian Webb
352471857f Reverted USB configuration and switched all non-blocking COM calls to blocking, which appears to help prevent lockups now that all sends are in a different thread. 2012-05-06 15:07:07 -07:00
Brian Webb
ef4828032b Fixed failed merge with next. 2012-05-06 12:38:13 -07:00
Brian Webb
3cf4fe6512 Reverted some USB changes. 2012-05-05 10:10:40 -07:00
Brian Webb
480371a43e Resolving merge with origin/next 2012-05-05 09:53:54 -07:00
Brian Webb
e83fec0463 Merged latest origin/next. 2012-05-05 09:40:44 -07:00
James Cotton
6c0dc80978 Shuffle more stack sizes around 2012-05-05 11:33:47 -05:00
Werner Backes
22df8310c4 Fixed typo in comment 2012-05-05 11:10:53 -05:00
Werner Backes
f52f5b3d83 Don't process RMC sentences that are flaged as 'void' 2012-05-05 11:10:45 -05:00
Werner Backes
6b463e5c9e Check GGA NMEA sentence for no/invalid fix flag 2012-05-05 11:10:38 -05:00
Werner Backes
217860c187 Check for empty fields during lat/lon conversion (invalid GPS fix) 2012-05-05 11:10:32 -05:00
James Cotton
513c36f19a Update the F4 ADC to compile again. Still not fully compliant with API but
then again API is not great and unused currently so no rush.
2012-05-04 21:37:46 -05:00
James Cotton
3ef01569b8 Merge remote-tracking branch 'origin/kenz/PT_UI_fixes' into next
Conflicts:
	flight/OpenPilot/System/openpilot.c
	shared/uavobjectdefinition/positionactual.xml
	shared/uavobjectdefinition/positiondesired.xml
	shared/uavobjectdefinition/velocityactual.xml
	shared/uavobjectdefinition/velocitydesired.xml
2012-05-04 13:21:23 -05:00
James Cotton
a9b8e74b0d Disable LEDs on the bootloader update as without knowing the particular
hardware revision it cannot know which pios_led_cfg_ structure to use.
Possibly this should be abstracted further into board_hw_defs to create
functions like board_init_led.

Also the BU should probably compare the hw_revision of the original and new
bootloader to make sure the user doesn't break their board.
2012-05-04 08:53:14 -05:00
James Cotton
d93bf5d2a2 Clean up the XCode project 2012-05-03 22:20:00 -05:00
Brian Webb
44d95003f3 Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2 2012-05-03 17:56:08 -07:00
James Cotton
3155324384 Merge branch 'next' into cc3d
Conflicts:
	Makefile
	ground/openpilotgcs/src/plugins/config/configahrswidget.cpp
	shared/uavobjectdefinition/ahrscalibration.xml
	shared/uavobjectdefinition/ahrssettings.xml
	shared/uavobjectdefinition/attituderaw.xml
2012-05-03 16:31:49 -05:00
James Cotton
07a5d98020 Merge remote-tracking branch 'origin/Brian-Metadata-Mods' into next 2012-05-03 08:50:24 -05:00
Brian Webb
249ededcfd Added responding to OBJ_REQ and sending ACK/NACK on PipX. 2012-05-02 20:51:29 -07:00
Brian Webb
22f48ce8b0 Exposed the Send ACK/NACK function in UAVTalk. 2012-05-02 20:42:37 -07:00
Brian Webb
30d63b5b12 Merged USB CDC updates. 2012-05-02 06:45:24 -07:00
Brian Webb
8da4b9c745 Merge remote-tracking branch 'origin/stac/pt-win-vcp-fix' into Brian-PipXtreme-V2 2012-05-02 06:42:30 -07:00
Brian Webb
290acf0398 Fixed watchdog timeouts. 2012-05-01 20:48:35 -07:00
Brian Webb
217aad8c37 Now using read and write threads for both radio and com ports on PipX. Also cleaned up UAVTalk message handling. 2012-05-01 19:14:58 -07:00
James Cotton
3f63051df8 PiOS ADC: This could still use a lot of cleanup and needs to be implemented in
the non-FreeRTOS case but now the ADC device is allocated dynamically which
means CC3D won't waste heap on it.
2012-05-01 11:11:31 -05:00
James Cotton
311cbe37d2 Reenable PIOS_ADC for coptercontrol 2012-05-01 00:30:41 -05:00
Brian Webb
84a19ebeab Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2 2012-04-28 19:30:35 -07:00
Brian Webb
25ffb99cee Added initialization of flash eeprom for saving settings to PipX. 2012-04-28 19:29:56 -07:00
Brian Webb
1048eb7e2c Added pios_eeprom for saving settings. 2012-04-28 19:29:25 -07:00
James Cotton
fb53d5621a Change the magKp term (hardcoded still) for revo complimentary filter so it
tracks magnetic north when homelocation is set.
2012-04-22 19:01:41 -05:00
James Cotton
2890fcdc9f When in complimentary filter mode use GPSVelocity so event system doesn't have
warning.
2012-04-22 19:01:18 -05:00
Corvus Corax
b97b0617aa bugfix, use correct variance parameter on z velocity 2012-04-22 18:43:17 -05:00
James Cotton
f06439ecf5 Fix a bug in calculating air temperature in baro sensor when it goes below 20
deg C.
2012-04-22 18:43:07 -05:00
Stacey Sheldon
63285ea451 bu: remove LED support from bootloader updaters
Bootloader updaters were all broken due to recent
changes in LED configuration handling.  Removing
LED support from the BU loads allows them to build
again, but they provide no feedback about when they're
finished writing flash.
2012-04-22 18:42:58 -05:00
Stacey Sheldon
2ec197298b gpio: stop enabling pull-ups on all GPIOs in bootloader
The bootloader has been enabling pull-ups on all GPIO
pins during early init.  These pull-ups are disabled
immediately before jumping to the firmware.  This transition
results in all servos seeing a wide pulse as the board
resets making them jerk sideways aggresively and then snap
back to neutral.
2012-04-22 18:42:53 -05:00
Stacey Sheldon
14cc9ef57c ppm: adjust min frame pulse width for 8ch x 18ms frames
All channels at max when using the FrSKY 4ch D4FR in PPM
mode results in the frame pulse shrinking well below our
threshold of 3800us and we lose frame.

With all 8 channels at max, the frame pulse becomes
indistinguishable from the other channels.  Using all 8
channels with the FrSKY in PPM mode is NOT recommended
even after this change.

Recommend using at most 7 active channels in this mode so
we can still find the frame pulse.
2012-04-22 18:42:45 -05:00
Brian Webb
aab47d6ed4 Final updates to throttled mode and further memeory reduction in the object manager and event dispatcher to reflect smaller data sizes in metadata. 2012-04-22 14:56:26 -07:00
Brian Webb
ed1937958e Changed PipX UAVTalkProcessInputStream calls to UAVTalkProcessInputStreamQuiet. 2012-04-22 08:45:01 -07:00
Brian Webb
fb6dedad2b Added UAVTalkProcessInputStreamQuiet function, which is a version of UAVTalkProcessInputStream that only processes (does not sens or receive). 2012-04-22 08:43:51 -07:00
Brian Webb
f726cc6a9d Added a RTC supervisor timer to RFM22B driver. 2012-04-21 18:31:49 -07:00
Brian Webb
5a2a3ad49b Fixed changes to UAVTalkProcessInputStream. 2012-04-21 16:54:35 -07:00
Brian Webb
eb6f175af4 Fixed metadata settings in object browswer, and removed update mode never from all uavobjects that used it (changed to manual). 2012-04-21 11:59:14 -07:00
Laura Sebesta
6feb198437 Improved comment message, aimed at beginners. 2012-04-20 17:10:16 -04:00
Stacey Sheldon
b255e7caaa hid+vcp: Add Windows INF file for CDC on OpenPilot boards 2012-04-20 09:02:40 -04:00
Stacey Sheldon
41d4ba4b1a hid+vcp: change default USB descriptor to HID+VCP
Now that we have a USB descriptor for HID+VCP that works
on Ubuntu 11.10, MacOS 10.7.3, Win7-SP1-32bit,
WinXP-SP3-32bit, Win7-SP1-64bit.

VCP will is known to not work on WinXP without service pack 3.
2012-04-20 08:39:04 -04:00
zedamota
4968df183a Working compliant VCP+HID descriptors for Windows. 2012-04-20 08:38:24 -04:00
Brian Webb
19166cc830 Added UPDATEMODE_THROTTLED to UAVObjects update modes. 2012-04-18 18:47:13 -07:00
Corvus Corax
1c3dc9c9e1 Airspeed: fixed calculation math - no more zero zone 2012-04-18 14:41:41 +02:00
Corvus Corax
d125abf335 Baro calibration 2012-04-18 10:48:31 +02:00
Brian Webb
62c5036220 Added PipXStatus and PipXSetting UAVobjects and some initial support for them. 2012-04-17 17:36:05 -07:00
Corvus Corax
3da88601a1 Airspeed module works, needs conversion 2012-04-17 20:32:56 +02:00
Corvus Corax
317cff10dd debug code added - revert this when no longer needed 2012-04-17 18:59:46 +02:00
Corvus Corax
edf26d15e6 Airspeed: some more fixes 2012-04-17 16:38:53 +02:00
Corvus Corax
c5a6ed7486 add missing headers and makefile entries 2012-04-17 16:25:39 +02:00
Corvus Corax
cf3f0b4226 Merge branch 'james/revolution' into stac/etasv3 2012-04-17 15:57:37 +02:00
Corvus Corax
5159d2029b new airspeed module - still needs matching PIOS driver from stac 2012-04-17 15:54:05 +02:00
Stacey Sheldon
ad75e354eb etasv3: Add etasv3 driver to revolution 2012-04-17 09:39:47 -04:00
Stacey Sheldon
6a37e433b6 etasv3: Add driver for Eagle Tree Airspeed Sensor v3 2012-04-17 09:39:00 -04:00
Stacey Sheldon
853600a2ef i2c: enable flexiport i2c on revolution 2012-04-17 09:38:27 -04:00
Brian Webb
78c7416bda Added returning of UAVTalk state from UAVTalkProcessInputStream 2012-04-16 20:21:00 -07:00
Stacey Sheldon
7f03a77492 bu: remove LED support from bootloader updaters
Bootloader updaters were all broken due to recent
changes in LED configuration handling.  Removing
LED support from the BU loads allows them to build
again, but they provide no feedback about when they're
finished writing flash.
2012-04-16 15:09:10 -04:00
Stacey Sheldon
62fb009acd gpio: stop enabling pull-ups on all GPIOs in bootloader
The bootloader has been enabling pull-ups on all GPIO
pins during early init.  These pull-ups are disabled
immediately before jumping to the firmware.  This transition
results in all servos seeing a wide pulse as the board
resets making them jerk sideways aggresively and then snap
back to neutral.
2012-04-16 14:41:25 -04:00
Stacey Sheldon
5ca4ec7934 ppm: adjust min frame pulse width for 8ch x 18ms frames
All channels at max when using the FrSKY 4ch D4FR in PPM
mode results in the frame pulse shrinking well below our
threshold of 3800us and we lose frame.

With all 8 channels at max, the frame pulse becomes
indistinguishable from the other channels.  Using all 8
channels with the FrSKY in PPM mode is NOT recommended
even after this change.

Recommend using at most 7 active channels in this mode so
we can still find the frame pulse.
2012-04-16 14:33:28 -04:00
James Cotton
ad074aee4b Fix nasty bug in guidance where I missed some breaks 2012-04-16 08:59:25 -05:00
James Cotton
a7ba6d96c1 Allow guidance to run purely off raw GPS data 2012-04-15 16:23:34 -05:00
James Cotton
050c756d54 Merge branch 'revolution_path' into testing 2012-04-15 12:34:31 -05:00
James Cotton
4928cbba44 Merge branch 'sim' into testing 2012-04-15 12:34:27 -05:00
James Cotton
59da9deffb Merge remote-tracking branch 'revo/D-Lite/ubx-parser' into sim 2012-04-15 12:33:54 -05:00
James Cotton
6a094ac326 Increase stack for the path planner 2012-04-15 12:31:50 -05:00
Corvus Corax
88f7567247 change to GPS: do not update UAVObject more than 1ce per cycle 2012-04-15 19:17:03 +02:00
James Cotton
85852df00b Make simulation produce data asynchronously for testing and add random accel
bias
2012-04-15 11:51:42 -05:00
James Cotton
08fd08deb8 Fix some compiler warnings in guidance code 2012-04-15 11:51:26 -05:00
James Cotton
1559eeb2e1 Use GPSVelocity updates when they are available instead of timing based on
GPSPosition
2012-04-15 11:50:56 -05:00
James Cotton
6e215bd029 Updating INS Pos/Vel variance includes the vertical velocity 2012-04-15 11:50:11 -05:00
James Cotton
b71e9fc9dc Create simulated OveroSync module which simply drops updates to log file 2012-04-14 22:01:33 -05:00
unknown
0b7538c3fe Constants changed to float for better portability. 2012-04-15 01:28:31 +02:00
James Cotton
9a2e0b071c Revert "Allow simulated quadcopter to include GyroBias in the artificial sensor data."
This reverts commit 212a10bcd4.
2012-04-14 17:20:01 -05:00
James Cotton
212a10bcd4 Allow simulated quadcopter to include GyroBias in the artificial sensor data. 2012-04-14 14:52:56 -05:00
James Cotton
af02eb6517 Merge branch 'sim' into testing
Conflicts:
	ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro
2012-04-14 14:40:43 -05:00
James Cotton
267e9fa87c Merge branch 'revolution' into testing 2012-04-14 14:40:11 -05:00
James Cotton
a86e75bc99 Merge branch 'revolution' into sim 2012-04-14 14:12:03 -05:00
James Cotton
deb3336729 Make sure for revolution all the GPS objects are always initialized even if
there is no GPS port.  Otherwise connecting to relevant queues will fail.
2012-04-14 14:02:20 -05:00
James Cotton
b7c3b1fdd1 Make the simulation provide GPSVelocity object since this is critical for EKF
now
2012-04-14 14:01:42 -05:00
James Cotton
ce6def870b Add feedforward component to guidance 2012-04-14 13:38:10 -05:00
James Cotton
be21ec441e Add ability to run guidance based on raw GPS velocity instead 2012-04-14 13:34:30 -05:00
James Cotton
1a98a46606 Merge branch 'revolution_ubx' into sim 2012-04-14 12:10:23 -05:00
James Cotton
5d160860a3 Fix from Corvus for gyro bias from EKF 2012-04-14 12:09:12 -05:00
James Cotton
3e2feb64cf Fix bug limiting maximum velocity desired 2012-04-14 10:49:54 -05:00
James Cotton
b0ef456ccb Kickstart MPU6000 if there is no data 2012-04-13 20:29:41 -05:00
James Cotton
a0d1b00ade Cover an edge condition for the MPU6000 IRQ not firing 2012-04-13 19:37:30 -05:00
Brian Webb
4936cd8fd2 Added PipXStatus and PipXSettings UAVObjects and added support the sending/receiving UAVTalk objects on the PipX. 2012-04-10 20:22:53 -07:00
James Cotton
a1351fcdbe Make the path velocity come from the waypoint. 2012-04-10 02:56:10 -05:00
James Cotton
a42d756b3e Add path navigation mode to the path planner module. I don't like how this is
done because the mode is in the settings so can't be command from path planner.
I.e. it would be nice to be able to say do these paths then go to position hold
mode.
2012-04-10 02:51:50 -05:00
James Cotton
dfa18eaef1 Deal with the case where path start and endpoints are the same to avoid NAN. 2012-04-10 02:49:19 -05:00
James Cotton
1aec5b8deb Add altitude control to the path navigation 2012-04-10 01:59:26 -05:00
James Cotton
26b73e3c8b Add path navigation mode to guidance. Works well in simulation. 2012-04-10 01:48:03 -05:00
James Cotton
136bbe3814 Update the EKF code to use the GPSVelocity 2012-04-09 19:03:21 -05:00
James Cotton
dbcb47e249 Merge branch 'D-Lite/ubx-parser' into revolution_ubx 2012-04-09 17:34:34 -05:00
Werner Backes
4ede7a8af6 Experimental u-blox binary data format parser. See "u-blox 6
Receiver Description" for reference. Currently supports NAV-VELNED
message only and populates it to the GPSVelocity UAVObject.
2012-04-09 23:14:34 +02:00
Werner Backes
422944ce29 Experimental extension to the GPS stream parser to extract u-blox
binary data format. See "u-blox 6 Receiver Description" for
reference. GPS data stream may carry mixed NMEA and UBX data.
2012-04-09 23:12:24 +02:00
Werner Backes
56108b5381 Introduced GPSVelocity UAVObject 2012-04-09 22:59:38 +02:00
Brian Webb
3914d22b09 Turned off watchdog timer, which was crashing on real PipX. 2012-04-07 19:56:12 -07:00
Brian Webb
e639d173a0 Create ID from a hashed CPU serial number. 2012-04-07 19:41:23 -07:00
Brian Webb
7b49a6b820 Added watchdog to radio com bridge in PipXtreme. 2012-04-07 19:12:49 -07:00
Brian Webb
f4d886de75 Added support for determining when the radio->com link is between UAVTalk packets. This is required to inject UAVTalk messages into the message stream. 2012-04-07 18:17:57 -07:00
Brian Webb
0f9f897870 Added PPM packet to packet handler, created replacement system module for PipXtreme (PipXtreme module), removed all UAVObjects from PipXtreme, and added parsing of incoming (over USB/COM) UAVTalk stream. 2012-04-07 18:17:32 -07:00
James Cotton
414e62f14e Revert "Disable baro updates into INSGPS for now. Seems to cause issues."
This reverts commit 04591309770679e7b01c53a6cb54cac1c043f8b6.
2012-04-07 00:58:36 -05:00
James Cotton
fcb9193d25 Disable baro updates into INSGPS for now. Seems to cause issues. 2012-04-07 00:58:36 -05:00
James Cotton
aa6c8a451d Shrink some stack sizes 2012-04-07 00:58:36 -05:00
James Cotton
81fcfd45c4 Some work on the code to initialize the INSGPS and allow setting the variance
of the baro
2012-04-07 00:37:42 -05:00
Brian Webb
56a2006fd8 Reconfigured to run on the real PipX board. 2012-04-06 18:44:31 -07:00
Brian Webb
eeb96955f9 Fixed ADC configuration 2012-04-06 17:43:43 -07:00
Brian Webb
253de47967 Merge remote-tracking branch 'raid/Brian-PipXtreme-V2' into Brian-PipXtreme-V2 2012-04-06 17:37:31 -07:00
Brian Webb
bc1adb2519 Some cleanup of rfm22 driver. 2012-04-06 17:36:35 -07:00
James Cotton
345b6578b1 Fix a possible race condition for complimentary filter on L3GD20 attitude
estimation where the accel queue wouldn't immediately have data available.
Added 1 ms timeout on queue.
2012-04-06 13:59:12 -05:00
James Cotton
e60c70251f Slow down update rate for the altitude hold smoothed EKF 2012-04-06 13:58:46 -05:00
James Cotton
6c004678d5 Need a really big telemetry queue size on revo for object manager not to choke.
Probably should slow down how quickly AltHoldSmoothed is set.
2012-04-06 13:22:30 -05:00
James Cotton
ea13536da0 Take quidance settings from simulation and make the INSGPS pick up the GPS
noise from a setting.
2012-04-06 12:59:49 -05:00
Brian Webb
fff93910e2 RFM22B device now fully interrupt driven. Packet handeling moved to RadioComBridge module. 2012-04-05 20:24:50 -07:00
James Cotton
3071f77d59 Add Baro offset to the simulation 2012-04-03 10:58:48 -05:00
James Cotton
c988685293 Simulate GPS noise drift 2012-04-03 09:17:55 -05:00
James Cotton
f491c924d6 Start updating the OSX UDP simulation to use a separate thread for receiving
but it needs two - one as a task (where the com callback occurs) and another
for the physical process stuff that doesn't need to suspend (like teh TCP
thread does)
2012-04-03 09:17:55 -05:00
James Cotton
5d0e513678 Fix small deg/rad issue in generating gps data 2012-04-03 09:17:55 -05:00
James Cotton
df6bc4deff Enable guidance on simulation and add wind model 2012-04-03 09:16:31 -05:00
James Cotton
fdfaac6559 More tweaks to OSX simulator 2012-04-03 09:16:31 -05:00
James Cotton
ca535c2632 Fix bugs in simulated sensor data. Now works well with INSGPS. 2012-04-03 09:16:31 -05:00
James Cotton
84040d25b4 Add attitudesimulated object to capture the simulated state 2012-04-03 09:16:30 -05:00
James Cotton
09ce6e1ab4 Restore the original Revolution FreeRTOSConfig and make the osx simulation
scheduler not start high priority tasks when they are created because I can't
reliably get the starting task to stop (because currently in a swapping mutex I
think).
2012-04-03 09:16:30 -05:00
James Cotton
6df9691609 Bring back the original module files and remove comments from FreeRTOS
debugging
2012-04-03 09:16:30 -05:00
James Cotton
82a2987b2c More improvements to the osx simulation FreeRTOS port. Only tick the tick
handler when we have confirmed the running thread has halted.  This is more
like what would happen on a single core machine.
2012-04-03 09:16:30 -05:00
James Cotton
543500ed78 Improve the simulated sensors to produce (I think) consistent data now 2012-04-03 09:16:30 -05:00
James Cotton
0b342ea3d6 Changing the tick counter to only happen after current thread is suspended
seems to fix stability issues
2012-04-03 09:16:30 -05:00
James Cotton
fbd8695d7d Check in WIP for osx simulation 2012-04-03 09:16:30 -05:00
James Cotton
c1726e30e5 Make pios_tcp uses two threads - one for the socket stuff and another within
FreeRTOS to receive the data.
2012-04-03 09:16:30 -05:00
James Cotton
75262b400a More osx simulation work 2012-04-03 09:16:29 -05:00
James Cotton
da294384b6 Getting closer on osx simulation 2012-04-03 09:16:29 -05:00
James Cotton
a2bc7b8668 Osx Simulator Not running quickly but at least it's staying up 2012-04-03 09:16:29 -05:00
James Cotton
898a595d81 Delete old files 2012-04-03 09:16:29 -05:00
James Cotton
adad006530 More work on OSX simulation 2012-04-03 09:16:29 -05:00
James Cotton
99e246f151 More of the 7.0 files for OSX simulation 2012-04-03 09:16:29 -05:00
James Cotton
356802b5ac Update to FreeRTOS 7 for OSX sim 2012-04-03 09:16:28 -05:00
James Cotton
0d3a6d94d8 Delete some old files 2012-04-03 09:16:28 -05:00
James Cotton
491df5d130 Small update to the osx wdg 2012-04-03 09:16:28 -05:00
James Cotton
51f0c3453b More work on osx simulation engine 2012-04-03 09:16:28 -05:00
James Cotton
3c0b65fbf8 Implement a simulated watchdog to catch when the chip would have reboot 2012-04-03 09:16:28 -05:00
James Cotton
28cab678ce Simulate a more complete QC model. 2012-04-03 09:16:28 -05:00
James Cotton
9d5dbe4bfe Create stub for TCP connection of simulation 2012-04-03 09:16:28 -05:00
James Cotton
6aa1f1e344 Had some debugging outputs (logged to file) still enabled 2012-04-03 09:16:28 -05:00
James Cotton
f1aa3b658e Add a new sensor simulation mode that essentially has a gyro rate that is rate
desired and the accel based on the current attitude.
2012-04-03 09:16:28 -05:00
James Cotton
ce54c4205d Disable a print from the port that was causing rashes 2012-04-03 09:16:27 -05:00
James Cotton
6df2df6eec Get rid of the mutex when enabling/disabling soft IRQs. This isn't ideal but
it seems to be triggering deadlocks.
2012-04-03 09:16:27 -05:00
James Cotton
6adc74f6f9 Check in the fake sensor data module 2012-04-03 09:16:27 -05:00
James Cotton
dee17f8fd4 Enable task run time monitoring in osx simulation 2012-04-03 09:16:27 -05:00
James Cotton
0e815540ff Patch from Stac that processes module names without using sed. Also enable
diagnostic stuff for simulation.
2012-04-03 09:16:27 -05:00
James Cotton
2391385788 Remove the pauase in the idle task. Increases load but also stability. 2012-04-03 09:16:27 -05:00
James Cotton
e97c1bc016 Include the module include file before any uavo ones 2012-04-03 09:16:27 -05:00
James Cotton
dfa39b59bf Rename the pios_config file for simulation 2012-04-03 09:16:26 -05:00
James Cotton
cb7b475d03 Remove the need ot have two ways of listing the modules for simulation 2012-04-03 09:16:26 -05:00
James Cotton
76bdd09795 Rename the pios_config file for simulation 2012-04-03 09:16:26 -05:00
James Cotton
e79a6e292b Add watchdog flag for simulated sensor task 2012-04-03 09:16:26 -05:00
James Cotton
e0fbdaf9fe Move the pios_board_posix file to something more general 2012-04-03 09:16:26 -05:00
James Cotton
c8a64ccbc7 Need to use slightly different code to generate the InitMods.c function for
simulation because of the Attitude/Revolution format.
2012-04-03 09:16:26 -05:00
James Cotton
1763d0c72c Switch to conditional signaling. Seems more robust. 2012-04-03 09:16:26 -05:00
James Cotton
f0e84088c1 Simulated LED now flashing. 2012-04-03 09:16:26 -05:00
James Cotton
5589ca60db Check in compilation files for OSX simulation. Update to work on revolution
tree.
2012-04-03 09:16:26 -05:00
James Cotton
ea5b733ac8 Fix the soft timing in pios_delay. Also disable LED printing messages. 2012-04-03 09:16:26 -05:00
James Cotton
dd5a71c48d Add watchdog flag for simulated sensor task 2012-04-03 09:16:25 -05:00
James Cotton
ae2f1e95f6 Move the pios_board_posix file to something more general 2012-04-03 09:16:25 -05:00
James Cotton
5fd569829c Need to use slightly different code to generate the InitMods.c function for
simulation because of the Attitude/Revolution format.
2012-04-03 09:16:25 -05:00
James Cotton
5901a07eb1 Switch to conditional signaling. Seems more robust. 2012-04-03 09:16:25 -05:00
James Cotton
99b81c7159 Simulated LED now flashing. 2012-04-03 09:16:25 -05:00
James Cotton
4e64b27034 Disable matlab simulation for now 2012-04-03 09:16:24 -05:00
James Cotton
cfd92de87a Add explicit casts in manualcontrol to avoid compiler warnings/errors 2012-04-03 09:16:24 -05:00
James Cotton
7ba32f8735 Check in compilation files for OSX simulation. Update to work on revolution
tree.
2012-04-03 09:16:24 -05:00
James Cotton
5827e3f565 Add box around logo path 2012-04-03 03:42:37 -05:00
James Cotton
bfb0c6935e Make pathplanner use callbacks on the waypoints and their index to pick up
changes from the GCS while flying
2012-04-03 03:42:37 -05:00
James Cotton
c26cceb47b If the waypoint index is changed then update teh position desired. This should
probably be done with change callbacks because currently changing the waypoints
themselves doesn't update position desired.
2012-04-03 03:42:36 -05:00
James Cotton
6d1c36680f Scale the max velocity as a magnitude on teh vector instead of independently on
each direction
2012-04-03 03:42:36 -05:00
James Cotton
5b3cc4876e In simulations a higher GPS noise is required for the INS 2012-04-03 03:42:35 -05:00
James Cotton
32f76db8ae Only update position desired when you change waypoints active 2012-04-03 03:42:35 -05:00
James Cotton
ba1ade33cb Get navigation working and program hardcoded flight path 2012-04-03 03:42:34 -05:00
James Cotton
62117430cf Flip the sign of throttle in the guidance altitude control 2012-04-03 03:42:34 -05:00
James Cotton
7f226867c6 Some bug fixes for revo attitude estimation. 2012-04-03 03:42:33 -05:00
James Cotton
d4488512c0 Add RTH waypoint action 2012-04-03 03:42:33 -05:00
James Cotton
3eac69e953 Create stub for waypoint navigation 2012-04-03 03:42:32 -05:00
James Cotton
c8ceea72e6 Increase the telemetry queue size from revolution 2012-04-03 03:42:32 -05:00
James Cotton
af9f36d7df Improve the attitude initialization for all of the modes 2012-04-03 03:42:32 -05:00
James Cotton
3888d6ff69 Changed settings that makes updates smoother 2012-04-03 03:42:31 -05:00
James Cotton
319b53a342 Make sure full initialization routine for INSGPS occurs each time it is
restarted.
2012-04-03 03:42:31 -05:00
James Cotton
372f959c37 Refine some stack sizes 2012-04-03 03:42:30 -05:00
James Cotton
54880c83a0 Fix some task sizes and the memory limits 2012-04-03 03:42:30 -05:00
James Cotton
a83fb019f6 When in complimentary filter mode pass the GPS information straight
through to Position Actual
2012-04-03 03:42:29 -05:00
James Cotton
98b1a21921 Fixup: Shouldn't update gps until home location is set 2012-04-03 03:42:29 -05:00
James Cotton
7a3ec3e173 Some code cleanup to get rid of some warning messages 2012-04-03 03:42:29 -05:00
James Cotton
23625904c5 Remove the now unused ECEF and Rne fields from HomeLocation. Also reenable
calculation of the WMM and HomeLocation from the GPS code for revolution.
2012-04-03 03:42:28 -05:00
James Cotton
71d0180d45 Use the sensor variances from object 2012-04-03 03:42:28 -05:00
James Cotton
ce2d1f94f6 Better hardcoded constants for INS variances 2012-04-03 03:42:27 -05:00
James Cotton
de7fc81795 Fixes to the GPS LLA to NED translation 2012-04-03 03:42:27 -05:00
James Cotton
e32ab9342c Shuffle some stack sizes around 2012-04-03 03:42:26 -05:00
James Cotton
4cadb7ec0e Forgot to initialize revo settings object 2012-04-03 03:42:26 -05:00
James Cotton
337d5b7079 Enable guidance in revo. Update manual control to set the position desired
when the switch is flipped.
2012-04-03 03:42:25 -05:00
James Cotton
0eedaa1250 Change how we convert LLA to NED. Now it is done with a taylor expansion
around the home LLA coordinate to avoid the conversion into ECEF coordinates.
This has the benefit of not requiring double precision math and uses less
operations.

Now we should remove the Rne and ECEF fields from HomeLocation as they are
unused
2012-04-03 03:42:25 -05:00
James Cotton
e8cc7748af Clean up some unused variables in attitude code 2012-04-03 03:42:24 -05:00
James Cotton
a9aa6b696b Add object for setting the fusion algorithm 2012-04-03 03:42:24 -05:00
James Cotton
1911c7360d New NEDPosition object which is the transformed GPS location 2012-04-03 03:42:24 -05:00
James Cotton
e3c36ac99a Change requires for GSP updated to be set to true (wrong sign on PDOP check) 2012-04-03 03:42:23 -05:00
James Cotton
1630267324 Some small updates to 16 state INS 2012-04-03 03:42:23 -05:00
James Cotton
9e4651ab80 INS working on Revo 2012-04-03 03:42:22 -05:00
James Cotton
7e36d086de More work on INS algorithm to force constants to single 2012-04-03 03:42:22 -05:00
James Cotton
137429d92d More work for the simulation 2012-04-03 03:42:22 -05:00
James Cotton
96edea9d4b Some fixes to GPS parsing 2012-04-03 03:42:21 -05:00
James Cotton
55ee568fe2 Work on the INS algorithm 2012-04-03 03:42:21 -05:00
James Cotton
7034a45e44 Force more calculations to explicitly being float 2012-04-03 03:42:20 -05:00
James Cotton
8c8224c122 Use a bigger event queue for overo logging to avoid event system warnings, and
add code to shortcircuit formatting a packet if it will not fit.
2012-04-03 03:42:19 -05:00
James Cotton
e82323af32 Make revolution work with the FreeRTOS queue based MPU6000 driver 2012-04-03 03:41:52 -05:00
James Cotton
bb41bc1472 Add no for DIAG_TASKS to make file to make it easier not to miss. 2012-04-03 02:07:04 -05:00
James Cotton
d7cb232315 Add MPU6000 accel range to config structure. Also put in correct values. 2012-04-03 02:07:04 -05:00
James Cotton
3346e848e0 Attitude error timeout was 2 ms when sensors at 500 Hz. Caused lots of errors
and overwhelmed event system.
2012-04-03 02:07:04 -05:00
James Cotton
3f22ef8c66 Slow MPU6000 on CC3D to 500 Hz 2012-04-03 02:07:04 -05:00
James Cotton
35854b35f6 MPU6000 accel value coming out twice as high as it should. Need to store scale
in cfg structure to fix this properly.
2012-04-03 02:07:04 -05:00
James Cotton
8032130769 Slow down gyro a bit on CC to give the CPU some breathing room. Might need to
come down more.
2012-04-03 02:07:03 -05:00
James Cotton
a960f3d07e Switch the MPU6000 driver to using a FreeRTOS queue. Need to update Revo code
to take advantage of this.
2012-04-03 02:07:03 -05:00
James Cotton
1415728762 Get the MPU6000 CC3D working. Right now the ADC system is commented out, which
will break regular CC.
2012-04-03 02:07:03 -05:00
James Cotton
a0b7453580 Make the firmwareIAP variable not a global 2012-04-03 02:07:03 -05:00
Stacey Sheldon
9b33be5d65 ef: pad any gaps between the BL bank and the FW bank
The Entire Flash (EF) image for revo has a gap between
the end of the BL bank and the start of the FW bank.
This fills the gap with 0xFF and properly aligns the
FW image in flash.
2012-04-01 22:39:27 -04:00
Brian Webb
df0a1c2ac1 Upgraded Brian-Metadata-Mods to current next. 2012-04-01 12:25:13 -07:00
Brian Webb
496a323b7f Fixed indentaion. 2012-03-31 07:59:44 -07:00
Stacey Sheldon
eab923fee0 revo: move fw image into 128KB sectors
This saves the more versatile 16KB and 64KB sectors
for other purposes.
2012-03-28 21:52:43 -04:00
Stacey Sheldon
f971fc14d5 openocd: update to latest git snapshot (f1c01333) 2012-03-27 00:53:27 -04:00
Stacey Sheldon
91cffb1809 f4 usb: don't skip yield from ISR
Function was returning prior to the code that might
need to yield from within the ISR.
2012-03-27 00:18:44 -04: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
Brian Webb
23f6c8af73 Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2 2012-03-23 20:49:12 -07:00
Stacey Sheldon
730defb698 f4 flash: fix flash voltage range setting in bl_helper
F4 boards are powered by 3.3V which corresponds to
VoltageRange_3.  Fix this to match actual VDD so we
get faster erase/write times.
2012-03-22 22:37:31 -04:00
James Cotton
8059004755 Make sure if an event has a null handle and the queue is full we don't try and
query UAVObjID
2012-03-22 10:46:30 -05: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
e7ca02c038 Initialize mag before mpu6000. Seems more reliable but I don't know why. 2012-03-21 03:42:15 -05:00
James Cotton
e4290d678b Reenable the pressure sensor and other modules 2012-03-21 00:49:29 -05:00
James Cotton
720684c248 Flag to enable pressure/mag 2012-03-21 00:49:04 -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
fc2d81cd8c Added optional ADC initialization to PipXtreme (turned off). 2012-03-19 17:59:05 -07:00
Brian Webb
fdf853a2fe Cleaned up the PipXtreme makefile. 2012-03-18 19:26:18 -07: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
346ae1bc6e Removed crc from PipXtreme build. 2012-03-18 10:29:28 -07:00
Brian Webb
620e862022 Moved unused crc.c/h back to PipXtreme directory. 2012-03-18 10:26:47 -07:00
Brian Webb
ecdf150946 Moved RFM22B code from PipXtreme to pios_rfm22b.c driver. The radio is now passing data. 2012-03-18 10:22:05 -07:00
Brian Webb
41c68a6f6b Updates to PipX configration. 2012-03-15 19:51:46 -07:00
Brian Webb
78b622a8d8 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into PipXtreme 2012-03-15 19:31:18 -07:00
Brian Webb
b34b849453 Added start at a modified PipX packet handler. 2012-03-15 19:29:54 -07:00
James Cotton
a319a6b14c Flags to disable mag/baro init 2012-03-14 22:35:09 -05:00
James Cotton
0d42303d37 Fix some compilation errors/warnings in attitude.c 2012-03-11 16:30:18 -05:00
James Cotton
c8d1534b87 Convert inline functions to static, let the compiler figure it out. Also some
formatting since code was probably written with tabstop = 2 :)
2012-03-11 13:18:08 -05:00
James Cotton
bbbca319d8 Merge commit 'c4df0c0ceff8ba985bb20d815f27910b9e59d992' into revolution 2012-03-11 13:14:06 -05:00
Alessio Morale
c4df0c0cef Support for port remapping on serial ports
Support for receiver configuration (PPM, PWM and DSM)
There are still problems with Flexi port (not sure if related to a problem with my board) and Uart/SBUS that has the input always inverted.
2012-03-11 18:38:49 +01:00
Stacey Sheldon
3782cdc58e bu: drop CC and PipX from BU targets since they don't build
The CC and PipX bootloader updater (BU) builds don't currently
work due to some recent changes in how LEDs are handled.

Remove them from the default BU targets so that the all_flight
target can build clean again.

Also fix a linker warning in OP build.
2012-03-10 20:41:15 -05:00
Stacey Sheldon
6038bfcb40 revo servo: swap servo pins 3 and 4 definitions to match schematic
Note non-standard pin numbering on JP3 on the schematic.
2012-03-10 15:06:21 -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
James Cotton
690f1b5f29 Enable camera stabilization 2012-03-08 01:37:34 -06:00
Stacey Sheldon
3210bd3f9c f4 usb_dcd: disable FIFO empty IRQ while waiting for tx completion
CPU was being hammered with FIFO empty IRQs if we queued data but
the host wasn't actively draining the FIFO.

This was entirely unexpected so this hack should probably be
removed once we can figure out why this was happening.

This is almost certainly hiding some other issue.
2012-03-07 20:36:37 -05:00
Stacey Sheldon
c4bd286739 f4 usb_hid: track whether we have buffers queued on endpoints
Make sure we don't clobber our endpoint configuration by
double configuring an Rx or Tx buffer against it.  Wait for
the completion of the previous operation before allowing
endpoint configuration again.
2012-03-07 20:36:36 -05:00
Brian Webb
d73895de7d Working PipX com relay. 2012-03-07 18:05:42 -07:00
Stacey Sheldon
65fc6104e6 f4 usb_hid: ignore upper layers if USB IF not yet enabled
Upper (COM) layer was calling down into the HID layer before
the HID interface had been enabled.  This was leading to
interacting with the endpoint Rx and Tx FIFOs prior to init.
The FIFO config was then being clobbered when we the USB IF
was eventually enabled.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
1f37806eab f4 usb_hid: fix typo in EP IN registration call
Code was using the size of the Rx buffer instead of the Tx
buffer when registering.  Buffers are currently the same
size so wasn't causing any issues.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
bc3ee6209c f4 usbhook: drop in/out bit from EP numbers before using as index
USBHOOK endpoint callback arrays should not be indexed with the
0x80 (in/out) bit set.  Oops.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
6832a62872 f4 bl_helper: clear all flash errors as we unlock the flash
Error flags being set were causing flash erase operations to
fail.  Not sure why these flags were set though so this might
be hiding some other problem.
2012-03-07 19:53:18 -05:00
Stacey Sheldon
4ea1156e7b f4 bl_helper: teach bl_helper about f4 flash sector map 2012-03-07 19:53:17 -05:00
Stacey Sheldon
d1d123e4f6 revo bl: turn on USB and add support for OP DFU protocol 2012-03-07 19:53:17 -05:00
Stacey Sheldon
b8fcbad297 revo bl: remove unneeded code from revo BL
Clean up BL source tree and makefile.
2012-03-07 19:53:17 -05:00
Stacey Sheldon
c854c3f4a4 usbhook: add support in API for deactivating USB 2012-03-07 19:53:17 -05:00
Stacey Sheldon
cb9c3a9b7e usbhook: delete dead code
Remove old code left-over from porting from F1 to F4.
2012-03-07 19:53:17 -05:00
Stacey Sheldon
e2ab662b5d sysclk: pass in correct definition for HSE_VALUE
The code in RCC_GetClocksFreq() uses HSE_VALUE to determine
the tick rate of the SYSCLK.  This in turn is used by the
code in PIOS_DELAY_* to compute delays.

ST Library defaults this to 25MHz for the F4.  Our board
actually has an 8MHz oscillator so delays were way off.

Mostly affects the bootloaders since most FW code uses RTOS
delays rather than busy-waiting using PIOS_DELAY_*.
2012-03-07 19:52:54 -05:00
Stacey Sheldon
fdf54ab86c hid: fix response to HID descriptor
HID driver was incorrectly giving back the HID interface
descriptor when asked for the HID descriptor.  This should
let OP boards interact better with generic HID layer drivers
and also gives us nicer output in lsusb once the HID descriptor
is read.
2012-03-07 19:52:54 -05: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
Alessio Morale
637af911ef Merge remote-tracking branch 'origin/james/revolution' into amorale/revolution 2012-03-04 12:31:13 +01: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
b3f620af7c Merge remote-tracking branch 'revo/stac/openocd' into revolution 2012-03-03 11:52:09 -06:00
James Cotton
f20e5da9ed Merge branch 'next' into revolution
Conflicts:
	ground/openpilotgcs/src/plugins/config/config.pro
	ground/openpilotgcs/src/plugins/config/configrevowidget.h
	ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp
2012-03-03 11:41:41 -06:00
Stacey Sheldon
0684a42fac build: use board-specific JTAG interface for openocd
Removes hard-coding of JTAG interface config in the
<board>_program make macros.

This allows the use of STLINKv2 for F4 boards while
continuing to use the FOSS JTAG revB on F1 boards.
2012-03-03 08:43:01 -05:00
Stacey Sheldon
d78c5d2a9a openocd: reenable flash commands on f4 boards 2012-03-03 08:43:01 -05:00
Stacey Sheldon
c0c38609ec openocd: move to newer openocd (dec6b913)
This update fixes flash writing on F4 chips
2012-03-03 08:43:01 -05:00
Alessio Morale
226cd09a13 Merge branch 'james/revolution' into amorale/revolution 2012-03-02 21:24:56 +01: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
James Cotton
72a93dbae5 Fix from PT for OSX/Windows F4 USB HID to send the full report size even if not
all used.
2012-03-02 11:11:36 -06:00
Alessio Morale
e8880d7271 Removed duplicate InitClock for tim_4 2012-03-02 00:55:50 +01:00
Alessio Morale
691e8760bc Updated OpenPilotOSX.xcodeproj to include Flight as a reference to the actual folder 2012-02-29 23:13:02 +01:00
Brian Webb
a0bdc58e5b Added framework for rfm22b com device. 2012-02-28 21:30:06 -07:00
Brian Webb
992aa3bec6 Updated PipX branch to use CDC device with a VCP (not working yet). 2012-02-25 09:07:37 -07: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
Brian Webb
01f314724b Updates to USB configuration on the PipXtreme. 2012-02-24 15:54:26 -07:00
Brian Webb
483a96c31d Some more cleanup to PipXtreme codebase. 2012-02-24 07:49:41 -07:00
Brian Webb
b69b285f58 Fixed PipXtreme bootloader. 2012-02-23 20:40:24 -07:00
Brian Webb
182f285e60 Added missing startup file for PipXtreme. 2012-02-23 20:06:34 -07:00
Brian Webb
cf34baec69 Some cleanup on PipXtreme codebase. 2012-02-23 19:58:23 -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
Brian Webb
f0dfba6fc0 Re-baslined the PipX codebase using the experimental Transmitter codebase. 2012-02-21 20:29:06 -07: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