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
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
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