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

470 Commits

Author SHA1 Message Date
James Cotton
72c84fc49c Upgrade to FreeRTOS 7.2.0 2012-10-09 09:48:02 -05:00
James Cotton
519e3e2e3a PIOS_EXTI: Make the line task macro now take in the xHigherTaskPriority variable name 2012-09-28 00:40:36 -05:00
James Cotton
1ba40ee9b0 PIOS_EXTI: Make sure to use pdTRUE instead of true where appropriate. 2012-09-27 14:41:38 -05:00
James Cotton
a021659b75 Merge remote-tracking branch 'origin/lilvinz/exti_end_switching_isr' into next 2012-09-27 14:31:16 -05:00
Stacey Sheldon
215ff56fe8 usbcdc: fix handling of CDC SET_LINE_CODING request
The SET_LINE_CODING request contains data and must be
handled as such.

Previously, the only requests that had data were IN
requests.  SET_LINE_CODING is an OUT request so it
required additional changes to support a new type of
data request.
2012-09-24 00:56:25 -04:00
Stacey Sheldon
c056ac5261 usbcdc: don't assert on calls when CDC is not initialized
The CDC interface is always advertised in the FW USB
descriptors.  It is NOT always enabled/initialized at
runtime.  Specifically, it can be Disabled in HwSettings.

Previously, any CDC-related query that the host would send
resulted in an assert and a watchdog.

Now, a suitable return code indicating that the request is
unsupported is returned in this scenario.
2012-09-24 00:53:12 -04:00
lilvinz
a6a7ed8157 pios_exti: added returnvalues to exti handlers which allows to use portEND_SWITCHING_ISR 2012-09-16 21:44:09 +02:00
lilvinz
718062ed6e pios_led: added support for active_high connected leds 2012-09-16 18:19:27 +02:00
Stacey Sheldon
97882dbef9 pipx: ensure pipx BL image is padded to fill its bank
This padding is required in order to properly align all
of the sections in the EF images.
2012-09-05 22:17:04 -04:00
Stacey Sheldon
29ab1d8cf3 actuator: factor out settings updates from main loop 2012-08-11 19:46:00 -04:00
Stacey Sheldon
49c153003c hid joystick: use linearly scaled channels
Scales each channel only based on max and min calibrated values.
The neutral value is now ignored so the joystick sees a linear
range between min and max.

This is particularly useful to allow the full range of values for
throttle to be passed through to the joystick.
2012-08-10 23:36:06 -04:00
Stacey Sheldon
017d8c79c9 hid joystick: add missing .c file
This time for sure...
2012-08-06 11:49:03 -04:00
James Cotton
ce6bebceb6 Also strex needs to not clobber it's register to have predictable results.
OPReview-227
2012-07-14 19:47:03 -05:00
Michael Hope
fa3aa20e05 ld: make sure current pointer never goes backwards
Fixes linking on ld version 2.22.  Identical to 3cbf4499.
2012-07-14 19:47:03 -05:00
Michael Hope
0efb24a54b The destination register of an exclusive store must be
different from both the value and address register.  Fix building with
recent binutils by marking the result as early clobber.
2012-07-14 19:47:03 -05:00
Brian Webb
a434688b42 Zero out watchdog register on init. 2012-05-24 18:04:42 -07:00
Brian Webb
8b98d48fc4 Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2 2012-05-22 06:27:45 -07: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
6cb13aa2ba Fixed failed merge with next. 2012-05-20 18:36:08 -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
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
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
00a83f3984 Reverted change to link_STM32103CB_PIPXTREME_memory.ld 2012-05-18 19:08:44 -07:00
Brian Webb
1f5dbcf57c Mostly complete PipX configuration GUI. 2012-05-11 17:51:18 -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
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
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
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
Brian Webb
84a19ebeab Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2 2012-04-28 19:30:35 -07:00
Brian Webb
1048eb7e2c Added pios_eeprom for saving settings. 2012-04-28 19:29:25 -07: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
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
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
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
Brian Webb
78b622a8d8 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into PipXtreme 2012-03-15 19:31:18 -07: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
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
182f285e60 Added missing startup file for PipXtreme. 2012-02-23 20:06:34 -07:00
Brian Webb
f0dfba6fc0 Re-baslined the PipX codebase using the experimental Transmitter codebase. 2012-02-21 20:29:06 -07:00
Stacey Sheldon
e2939dae2a revo usb: Add support for USB to Revo 2012-02-07 02:25:31 -05:00
Stacey Sheldon
4fafbb13ed makefile: Add EF (Entire Flash) targets for all boards
These new build targets will construct a flash image that
includes both a bootloader as well as a firmware image all
in one.  Examples:
  make ef_coptercontrol
  make ef_revolution

This also adds support for a new target for writing this EF
image to boards that support a DFU interface (only F4-based
boards).  This can be done by running:
  make dfuutil_install
  # Boot board with SBL asserted to activate STM32 DFU ROM
  # Attach USB cable
  make ef_revolution_dfu

Bootloader images are also now padded out to occupy the full
BL flash region.
2012-02-03 00:59:36 -05:00
James Cotton
20670d049b Update pios_led for F4 targets to match the new F1 implementation. Also fix
type for F1 in GPIO labels.
2012-01-25 22:50:19 -06:00
James Cotton
5ad37e691c USB: Update the USB configuration structure to include the GPIO that is used
for sensing and then load different config for CC and CC3D.  Updated the
bootloader as well.  Also changed the PIOS_USB_CheckAvailability function to
only return the sense signal and not the transfer_possible flag as this is not
set in time for the bootloader on CC3D for some reason.
2012-01-24 22:15:43 -06:00
James Cotton
bc3703ce33 Need more irq stack for CC3D 2012-01-24 19:48:52 -06:00