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

43 Commits

Author SHA1 Message Date
Mathieu Rondonneau
03b243fe31 OP-1079 - Update to FreeRTOS v7.5.2 2013-09-04 20:26:23 -07:00
Brian Webb
e246ecf536 Moves pios_led functionality to pios_gpio and makes pios_led a thin layer over pios_gpio. Supports configuring multiple sets of GPIOs. 2013-07-28 07:01:08 -07:00
Alessio Morale
11bc7804d0 Merge branch 'amorale/OP-994_adc_cleanup' into next 2013-07-16 12:23:25 +00:00
Brian Webb
7c10623615 OP-932 Adds a semaphore to PPM input to signal when a new frame has been received. This can be used to process a new frame with as low a latency as possible. 2013-06-26 17:56:10 -07:00
Alessio Morale
0b8d18ae49 OP-994 Move common defines to architecture specific header
+review OPReview-506
2013-06-24 18:50:44 +02:00
Alessio Morale
51a7f27b99 OP-994 Add an API to PIOS_ADC to get directly the Voltage value 2013-06-08 13:36:54 +02:00
Sexy Pony
900f643bbd Reformat source code with 'make uncrustify_all' run twice. NO CODE CHANGES 2013-05-19 17:37:30 +03:00
Alessio Morale
ab7af16be3 Merge branch 'amorale/OP-901_lib_udates-usb_fixes' into HEAD
Conflicts:
	flight/pios/stm32f10x/library.mk
	flight/targets/boards/revoproto/firmware/pios_board.c
2013-05-19 15:01:08 +02:00
Alessio Morale
37eabb0931 Pointed type is explicitly used with sizeof when dealing with struct pointers.
+review OPReview-474
2013-05-19 12:00:16 +02:00
Alessio Morale
c1f767b12d Merge remote-tracking branch 'origin/amorale/OP-954_logfs_settings_in_internal_flash' into next
Conflicts:
	flight/pios/common/pios_flashfs_logfs.c
2013-05-18 15:53:25 +02:00
Alessio Morale
aba64689a6 OP-901 removed stale core_cm3.c file 2013-05-18 14:25:37 +02:00
Alessio Morale
448e98b336 OP-901 Updated F1 StdPeriph Driver Library to v3.5.0 2013-05-18 13:55:43 +02:00
Brian Webb
bc4f615c25 Adds setting HSE_VALUE on all F1 targets (should only be necessary if the HSE clock is not 8MHz).
Moves the CMSIS system_stm3210x.c from library.mk to the individual Makefiles for the F1 targets.  This allows for custom SystemInit functions where necessary.
2013-05-17 22:01:48 -07:00
Alessio Morale
67e41c34fc Merge remote-tracking branch 'origin/next' into amorale/usb_fixes 2013-05-17 22:46:42 +02:00
Alessio Morale
2735f8a620 OP-901 Updated common CMSIS files 2013-05-17 22:41:34 +02:00
Richard Flay (Hyper)
a6aedee9fa Merge branch 'next' into brian/support_inverted_USB_vsense 2013-05-17 05:54:42 +09:30
Richard Flay (Hyper)
031ea3e069 Merge branch 'next' into brian/code_cleanup_130514 2013-05-17 05:49:38 +09:30
Richard Flay (Hyper)
ae14c13195 Merge branch 'next' into hyper/OP-951_add--Wshadow-to-flight-CFLAGS
Conflicts:
	flight/modules/ManualControl/manualcontrol.c
2013-05-16 06:28:56 +09:30
Brian Webb
156109bb88 Added support for an active low USB vsense line. 2013-05-14 20:37:13 -07:00
Brian Webb
1608d11416 Cleans up some compiler warnings/erros and adds missing ifdefs around some e.g. WDG calls. 2013-05-14 20:22:54 -07:00
Alessio Morale
8d57d8ff76 Internal flash settings for F1
Conflicts:
	flight/pios/stm32f10x/pios_flash_internal.c
2013-05-14 22:58:05 +02:00
sambas
da23fd6784 Added F1 internal flash driver
Conflicts:
	flight/pios/stm32f10x/pios_flash_internal.c

Conflicts:
	flight/pios/stm32f10x/pios_flash_internal.c
2013-05-14 22:56:12 +02:00
Richard Flay (Hyper)
ed68fbe68d OP-951: Adds -Wshadow to flight CFLAGS and fixes resulting compilation breakage.
+review OPReview
2013-05-14 07:01:45 +09:30
Stacey Sheldon
c22daec1b0 usb cdc: avoid need for ZLP by using tx buffers smaller than max
USB CDC uses BULK endpoints to send/receive data.  Typically,
a USB host will enqueue large buffers on its IN (device-to-host)
URBs.  These buffers are larger than the max packet size for the
bulk endpoint.

The USB standard requires that an IN transfer ends when one of
these is true:
 * a short packet (ie. less than max packet size) is sent by the
   device
 * a zero length packet (ZLP)
 * enough packets that the entire host buffer is filled

Our device implementation never sends ZLPs.  We sometimes send
packets that are exactly max-packet-size bytes long.  This would
result in partially filling a host buffer without signalling (via
ZLP) that the transmission had finished.  The host would then wait
until the next transfer had taken place before processing the first
data, thus delaying the first data.

This change simply forces all of our transfers to be short packets
and avoids the need to worry about zero length packets.  This is
at the cost of some efficiency on the host side since its large
buffers will only ever be partially filled.

Conflicts:
	flight/PiOS/STM32F30x/pios_usb_cdc.c
2013-05-11 22:41:01 +02:00
Stacey Sheldon
b56f5206bd com/usart/cdc: ensure that device structs are memset before use
CDC and USART device drivers were not all clearing their
device structs before using them.

This specifically caused crashes in the case where the upper
COM layer was binding only a Tx path.  The Rx path callback
in the lower driver was uninitialized random data and would
result in the lower driver faulting when it tried to call the
callback.

Conflicts:
	flight/PiOS/STM32F30x/pios_usart.c
	flight/PiOS/STM32F30x/pios_usb_cdc.c
	flight/PiOS/STM32F30x/pios_usb_hid.c
2013-05-11 22:40:59 +02:00
Stacey Sheldon
e16be98224 usb cdc: ensure com buffer is drained when no DTE is attached
The CDC layer on F1, F3 and F4 now always acts like an
infinte data sink whenever *either* there is no DTE present
(ie. no terminal program listening) *or* the USB cable is
disconnected.

F1 and F4 were previously checking the cable but not the DTE.
F3 didn't check anything.  The COM layer didn't even ask the
lower layers.

All of this used to mean that any time a caller did a blocking
send to a CDC device without a DTE, it would eventually block
for up to a 5s timeout waiting for space in the Tx buffer.

Conflicts:
	flight/PiOS/STM32F30x/pios_usb_cdc.c
2013-05-11 22:40:58 +02:00
Stacey Sheldon
590feefd9b f1 usb cdc: ensure uart state is transmitted on control endpoint
Previously, the IN stage on the CTRL interface would write (and
send) its data via the buffer owned by the DATA endpoint.  This
would probably have overwritten any data being sent at that
moment.  This may have caused data corruption from FC -> GCS.
2013-05-11 22:35:19 +02:00
Richard Flay (Hyper)
04f59d5910 OP-950: Adds "higher priority task woken" logic to SPI and SPI bus resident
sensor device drivers. Based partly on code contributed by lilvinz.

+review OPReview
2013-05-11 16:18:34 +09:30
Alessio Morale
93bad2e8c2 Merge branch 'amorale/OP-917_f4_bootloader_updater' into next
***** PLEASE NOTE  ***** From this revision all F4 based boards (Revolution/OSD) needs bootloader version  5 to boot properly

Conflicts:
	flight/pios/stm32f4xx/libraries/CMSIS2/Device/ST/STM32F4xx/Source/osd/system_stm32f4xx.c
	flight/targets/boards/osd/board-info.mk
	make/boot-defs.mk
	make/common-defs.mk
2013-05-07 21:02:41 +02:00
Richard Flay (Hyper)
a2d8544931 OP-931: adds -Wextra compiler option for the flight code, and makes the bazillion code changes required
to make the flight code compile again. Needs careful review, particularly all the fixes for the
signed vs unsigned comparisons.

+review OPReview-459
2013-05-05 16:32:24 +09:30
Richard Flay (Hyper)
87fcf9fa8b Merge branch 'next' into hyper/OP-931_extra_compiler_warnings and update as necessary.
Hopefully properly fixes conflicts:
	flight/modules/Attitude/attitude.c
	flight/modules/ManualControl/manualcontrol.c
	flight/modules/Osd/WavPlayer/wavplayer.c
	flight/modules/Osd/osdgen/osdgen.c
	flight/modules/System/systemmod.c
	ground/uavobjgenerator/generators/flight/uavobjectgeneratorflight.cpp
2013-05-04 11:12:44 +09:30
Sambas
f7b9223827 Merge remote-tracking branch 'remotes/origin/next' into sambas/diffnext
Conflicts:
	flight/modules/System/systemmod.c
	shared/uavobjectdefinition/taskinfo.xml
2013-05-02 09:00:12 +03:00
Oleg Semyonov
654dd051c7 Merge remote-tracking branch 'origin/next' into os/debug-pins 2013-05-01 11:13:30 +02:00
Brian Webb
39c6e81d07 OP-924: Ensures that the PPM pulse turns off between PPM frames. 2013-05-01 02:48:48 +01:00
Brian Webb
76e4638b8f OP-924: Added back setting of Tracking to true when a new sample is set. 2013-05-01 02:48:46 +01:00
Brian Webb
56a524ab9e OP-924: Completely turn off PPM output when it's not being refreshed. Also fixed testing of PPM input on the OPlink that was broken when the return values were changed to negative values. The PPM values were being stored in an unsigned datatype, which made detecting negative error returns impossible. 2013-05-01 02:48:45 +01:00
Brian Webb
ab926da507 OP-924: Added a supervisor timeout to the PPM output driver. This is based on the code in the PPM input driver. A (minor) uninitialize variable bug was also fixed in the PPM input driver. 2013-05-01 02:48:44 +01:00
Richard Flay (Hyper)
7937ae6296 OP-931: Makes flight code compile with -Wfloat-equal and -Wunsuffixed-float-constants enabled.
Also fixes warnings (and bugs) in F4 STM32_USB_OTG_Driver code, allowing -Werror to be enabled for all flight code.
Fixes all other compiler warnings that would otherwise cause the flight code to not compile with -Werror enabled.
Along the way, this also adds some uses of isnan() to various places rather than questionable tests for x != x and
x == x to check for NaNs.

+review OPReview
2013-04-30 20:36:42 +09:30
Alessio Morale
41ecc09c3f OP-917 Various review fixes:
-Fixed casing for PIOS_BL_HELPER_FLASH_ERASE_BOOTLOADER
-fixed wrong condition in f1 bl_helper
-other cosmetic changes and use of stdbool in f1 pios_bl_helper
-remove now unused macros

+review OPReview-456
2013-04-28 10:19:08 +02:00
Alessio Morale
78498910cf OP-917 Moved all the flash architecture related code to pios_bl_helper, get the flash addresses from board defines, major cleanup.
+review OPReview
2013-04-27 15:15:28 +02:00
Oleg Semyonov
45f456580f Fix pios debug pin functions and defines (thanks to Mathieu for the patch) 2013-04-26 18:18:31 +03:00
Oleg Semyonov
e2fd821e97 Merge remote-tracking branch 'origin/next' into sambas/diffnext
Conflicts:
	make/common-defs.mk
2013-04-26 16:31:19 +03:00
Oleg Semyonov
b6e1331e5d Rename flight/PiOS->flight/pios 2013-04-25 13:13:41 +03:00