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

1761 Commits

Author SHA1 Message Date
James Cotton
373689207a Add a 1-tap IIR filter into the gyros in the feedback path. This will make the
stabilization output a bit more resilient to the high frequency noise from
gyros.  However this value shouldn't be too high as it will increase the phase
delay of the feedback loop and decrease stability.  Default is 5 ms.

Note: this resests the stabilizationsettings object.  Sorry guys.
2011-06-24 10:38:25 -05:00
Stacey Sheldon
d1104d3fdc alarms: lower heap warning and critical thresholds for CC
Free heap on CC is currently 160 bytes so the current thresholds
were causing a continual alarm condition, thus preventing arming.
2011-06-24 10:38:25 -05:00
Mathieu Rondonneau
dcd2774103 OP-423 Fix some comment from code review:
- update example module
- use module init macro for POSIX and WIN to make code cleaner.
2011-06-24 06:59:51 -07:00
Corvus Corax
f52f6d30c6 VTalk (flight): Buffers allocated dynamically with size calculated by UAVObjGenerator. Support for tx packet sizes < object size.i 2011-06-24 02:08:20 +02:00
James Cotton
f6312c7798 OP-410 OP-333: Created an Axis-lock setting for stabilization 2011-06-23 14:51:18 -05:00
James Cotton
9aba787b02 OP-193: Check for instance read success was backwards 2011-06-23 03:01:37 -05:00
James Cotton
368d5b649a OP-193: Output mixer should read from up to 6 accessory channels (may add more
in future).
2011-06-23 01:47:55 -05:00
James Cotton
493fcaef2a OP-193 OP-511: Add settings to scale the camera input output range 2011-06-23 00:47:27 -05:00
Mathieu Rondonneau
703919daf4 OP-423 Reduce IRQ stack limits (CC onlyt) 2011-06-22 06:32:27 -07:00
Mathieu Rondonneau
0ff5e9a46f Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint 2011-06-21 22:02:13 -07:00
James Cotton
9c1e523260 Drop 8 bytes per PID of unecessary information. Also trying to compute
integral in ms instead of seconds to avoid rounding errors.
2011-06-21 17:54:03 -05:00
James Cotton
8976d22fad Merge remote-tracking branch 'origin/OP-159_os_sbus' 2011-06-21 17:51:22 -05:00
Oleg Semyonov
fba201c8b3 usart: move default port numbers from pios_config.h to pios_board.c 2011-06-22 01:32:18 +03:00
Mathieu Rondonneau
74e5e2015e Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint 2011-06-20 20:28:12 -07:00
Stacey Sheldon
80709f356f alarms: lower heap warning and critical thresholds for CC
Free heap on CC is currently 160 bytes so the current thresholds
were causing a continual alarm condition, thus preventing arming.
2011-06-20 22:31:05 -04:00
unknown
9e632b532e Fix win32 SiTL by adding PiOS CRC and another missing function. 2011-06-20 15:48:05 -04:00
Mathieu Rondonneau
fc1e3f574c OP-423: Split task create and module init in order to postpone task creation once the full heap is available.
Also implement some ordering (quite ugly still) in the module init and task creation order so we can decide which module to start/init first
and which module to start/init last.
This will be replaced/adapter with the uavobject list later (once it's implemented).
reserving some space for module init and task create parameters to customize module/task creation (this will be usefull once we get the list and customization from customer).

Changes have been made for OP and CC. Tested comped with CC,OP, sim_posix.
Only ran on bench with CC for couple of minutes (code increase expected but no dropping of stack which is good).

This gives task creation at the time wherethe all heap is available.
2011-06-19 22:35:40 -07:00
James Cotton
17fa227d1f Fixed typo, thanks Os 2011-06-19 16:51:54 -05:00
Oleg Semyonov
6272210df7 sbus: some code cleanup (no functional changes) 2011-06-19 14:30:13 +03:00
Mathieu Rondonneau
2b11395a67 OP-423 just move stack from systemmod back to heap (200 bytes) that are not needed anymore. 2011-06-18 17:31:29 -07:00
Mathieu Rondonneau
5e3e7cc4e3 OP-423 Fix issue with init not properly started in the right order endup up object thinking other where not init. 2011-06-18 17:28:37 -07:00
Oleg Semyonov
59da5055cd usart: make USART ports configurable from make command line
For CopterControl the following make options are available:

USE_TELEMETRY=[YES|NO|1|3]    (default is YES, USART1)
USE_GPS=[YES|NO|1|3]          (default is NO, USART3)
USE_SPEKTRUM=[YES|NO|1|3]     (default is NO, USART3)
USE_SBUS=[YES|NO|1]           (default is NO, USART1 only)
2011-06-18 23:54:32 +03:00
Oleg Semyonov
311902f1f2 sbus: implemented S.Bus stream decoding 2011-06-18 23:19:57 +03:00
James Cotton
724016ffb0 When erasing flash at the end start flashing LED to indicate it is done 2011-06-18 14:32:09 -05:00
James Cotton
2218ff6fe9 Change to object template so when they are already registered it doesn't
initialize them a second time (which causes the handle to get lost)
2011-06-18 14:21:14 -05:00
James Cotton
5044ea36de Start initializing objects in the modules that consume them. Shouldn't affect
OP yet but not tested.
2011-06-18 14:20:51 -05:00
Mathieu Rondonneau
b67a38661e OP-423: merge master into that branch, resolve conflicts and test with CC and bl_CC
heap reamining is low (about 500) but stacks can be ajusted (specially the 200 bytes from system) to give the level close to 1Ko if needed.

Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint

Conflicts:
	flight/CopterControl/System/inc/FreeRTOSConfig.h
	flight/CopterControl/System/inc/pios_config.h
2011-06-17 19:04:09 -07:00
James Cotton
9720a8444f Make a few things optional if they are mostly for diagnostics to keep memory
down
2011-06-17 21:00:21 -05:00
Mathieu Rondonneau
693c6bc5b0 OP-423: fix bl and bu, also fix compiler problems encountered with make all 2011-06-17 18:54:25 -07:00
Mathieu Rondonneau
65cf467ca4 OP-423: move the module initialize funtion into a specific section for OP and CC.
- create linker section for those <module>Initialize()
- later this list will incorporate parameters as well. (this probably will be more a OP feature to swap/remove/delete module on the fly.
- this is not done at compile time anymore by Makefile.
- this will allow us to have control on the module start at run-time (not implemented but build the ground for it).
- this simplify the startup (Part of code re-org).
- this change does not affect sim_posix and win32 (since they don't need that)
- ensure it's compiling for PiOS.posix
- port to PiOS.win32 but not tested (not compiled)
- tested on CC
- compile on OP.
- this free ~200 bytes.
- current avalable bytes (is we keep the same remaining bytes on the stack than before) is easily passed the 1.2Ko mark on CC with new gcc (4.5.2)
- this does not include init-reorg for each module (I still think more can be freed)
2011-06-16 22:13:19 -07:00
Corvus Corax
926246b402 UAVTalk: Make UAVTalk object oriented, allowing multiple UAVTalk instances 2011-06-16 16:35:37 +02:00
Oleg Semyonov
aeda61d252 usart: serial telemetry can be disabled to free USART
It was tested being merged with OP-472_CorvusCorax_CopterControl-Guidance_v3
branch, Spektrum on USART3 and GPS on USART1 and seems to work.

Currently defaults mimic original behavior, that is, if USE_SPEKTRUM
is not defined - define USE_PWM and USE_GPS. Thsi should be refactored
later to make it configurable from the Makefile.

Also it was not ported to the OP MB: it currently does not support the
S.Bus hardware and still has original behavior with the patch. But this
is one more step to dynamic configuration of ports.
2011-06-16 15:06:01 +03:00
Mathieu Rondonneau
e8cdf22427 OP-423 Port to OP: Claim (at run-time) the remaining un-used bytes (between heap and end of RAM) that are for data growth (needed at compile time).
CAREFULL: the heap section need to be the last section in RAM to avoid overwritting data...

also move address into linker (CC and OP)
2011-06-15 18:54:35 -07:00
Oleg Semyonov
50e819192b usart: make CC USART ports compile-time configurable
TODO: This should be dynamic in the future.
But for now define any compatile combination of:
   USE_I2C (shared with USART3)
   USE_TELEMETRY
   USE_GPS
   USE_SPEKTRUM
   USE_SBUS (USART1 only, it needs an invertor)
and optionally define PIOS_PORT_* to USART port numbers

Defaults are:

#define PIOS_PORT_TELEMETRY 1
#define PIOS_PORT_GPS       3
#define PIOS_PORT_SPEKTRUM  3
#define PIOS_PORT_SBUS      1

#define USE_TELEMETRY
#define USE_GPS

Telemetry, GPS and PWM input are enabled by default.
2011-06-15 22:37:44 +03:00
Oleg Semyonov
d8201ec45b sbus: provide a stub based on Spektrum driver (for CC only) 2011-06-15 22:35:21 +03:00
James Cotton
7d7d03cfd0 OP-193 OP-511: Basic code for camera stabilization. Currently tune range with
the servo endpoints and neutral.
2011-06-15 11:18:29 -05:00
Mathieu Rondonneau
ab4e15e9aa OP-423 also claim (at run-time) the remaining un-used bytes (between heap and end of RAM) that are for data growth (needed at compile time).
CAREFULL: the heap section need to be the last section in RAM to avoid overwritting data...

Tested with GCC 4.5.2 this gives 1K of free bytes usable in heap right away (including the 200 bytes saved just by using the new gcc).
This does not include any code re-org yet!
2011-06-14 22:13:30 -07:00
Mathieu Rondonneau
3780de8d3e OP-423 port to OP (heap2) the previous changes done in CC (heap1) (see c95b199166)
I managed to test CC with heap2 changes and the init stack claimed back to heap once scheduler starts.

the changes of this commit are OP related (just cleanup on CC side):
Arch specific stuff (in reset vector) to hide this from portable code:
     - switch back to MSP stack before starting the scheduler so that the sheduler can use the IRQ stack (when/if needed).
     - call the C portable function in heap2 to claim some stack back (the number to claim is taken from linker file).
     - start the scheduler from reset vector (I move this here from main because it make sense to not go back to C (so that I don't need to copy the rolled stack in case the sheduler returns). This make it more clean.
     - Also I have added the call to the mem manager if sheduler return. that way, we don't reset indefinitely if memory runs out. We will go to this handler and figure things out (right now, it's just looping but at least not rebooting. Probably trap NMI would be better (later improvement).
2011-06-14 20:10:53 -07:00
James Cotton
144f36dfb7 Merge branch 'bugfix-flight' 2011-06-14 10:02:55 -05:00
Mathieu Rondonneau
c95b199166 OP-423 do the arch specific stuff (in reset vector) to hide this from portable code:
- switch back to MSP stack before starting the scheduler so that the sheduler can use the IRQ stack (when/if needed).
 - call the C portable function in heap1 to claim some stack back (the number to claim is taken from linker file).
 - start the scheduler from reset vector (I move this here from main because it make sense to not go back to C (so that I don't need to copy the rolled stack in case the sheduler returns). This make it more clean.
 - Also I have added the call to the mem manager if sheduler return. that way, we don't reset indefinitely if memory runs out. We will go to this handler and figure things out (right now, it's just looping but at least not rebooting. Probably trap NMI would be better (later improvement).

The part missing for this part is the weak attribute for the function in heap1.c so that we don't have to update everything with empty stub.
I think the weak atrribute for C function called in assembly is arch dependent so I am not sure if this is possible (will look into it, maybe somebody outthere nows).
Right now, it's heap1 dependent and won't work with heap2. I will clean that up the next couple of days.

I did some test and it looks good.
this is without init code re-organization so we don't free as much as we will be it's good starts.

This compile with sim_posix (since it does not affect portable code) so this is really clean.
I only tested this with CC. I will port it for OP when I will work on heap2.
2011-06-13 21:49:17 -07:00
Mathieu Rondonneau
1f54e32ea9 OP-423 also add changes to OP. (I can not test it because I don't have a board so only compile test) 2011-06-13 17:10:14 -07:00
James Cotton
404c026188 Patch from Zippe to use cycle timer for CPU monitoring. 2011-06-13 00:24:30 -05:00
Mathieu Rondonneau
7598e898fa OP-423 Step-1: split system stack and implement water mark for IRQstack:
- use IRQStack for ISRs (at begening of SRAM) (let's call it the irq stack)
- use end of heap for stack needed during initialization (let's call it the init stack).
- the systemStats in GCS indicate the remaining bytes in the IRQ stack (this is realy usefull to monitor our (nested) IRQs.

This is the base ground to provide as much memory as possible available at task creation time.

Next step is to re-organize the initialization in order to move all the init out of the thread's stacks onto the init stack.
This will provide as much memory as possible available at task creation time.
Basically the stack during initialization will be destroyed once the scheduler starts and dynamic alloc are made (since the init stack is at the end of the heap). We will need to make sure we don't clobber the heap during initialization otherwise this will lead to stack corruption.
2011-06-12 20:23:00 -07:00
James Cotton
0f5fe54329 FlashFS: Should clear the 0 sector when wiping flash chip, not 10 bytes in. 2011-06-11 22:31:51 -05:00
Oleg Semyonov
5d0c7fe42e Merge branch 'master' into heli_improvements 2011-06-11 12:19:07 +03:00
Corvus Corax
a7841a523a bugfix: forgot to add header file (pios.posix) 2011-06-10 22:04:54 +02:00
Corvus Corax
47a6643318 PiOS.posix: ported PiOS_CRC to PiOS.posix to fix compilation error on OpenPilot introduced by new dependency 2011-06-10 17:16:15 +02:00
James Cotton
4a59c03b0e OP-493: Unfortuantely have to change stack alarms for this to work :( 2011-06-07 10:31:40 -05:00
James Cotton
bdc9094975 OP-493 OP-505 OP-511: Make up to 6 accessory channels so some can go from
ManualCommand to a camera module and some could go from that camera module to
output (i.e. mixing of inputs to pan tilt with stabilization)
2011-06-06 10:56:31 -05:00
James Cotton
1ecd244aff OP-493 OP-505 OP-511: Fixed bug with the direct mapping where it looked at throttle curve
source instead of directly bypassing
2011-06-06 10:53:55 -05:00
James Cotton
6c6906d61e OP-493: Switch to using Accessory0:2 to match the InstId 2011-06-05 15:38:58 -05:00
James Cotton
99b3a629a8 OP-493: Force three AccessoryDesired objects to always exist. Routing to
Mixing channel now works.  However Accessory desired instances do not show up
in GCS.
2011-06-05 15:38:58 -05:00
James Cotton
a1336e4d03 OP-493: Make sure accessory desired is not a single instance object 2011-06-05 15:38:57 -05:00
James Cotton
8ebd6a83d6 OP-493: Add support to bypass the mixer and route accessory data straight to
outputs.  Warning: This has no failsafes like arming.  We should discuss if
this is appropriate.

In addition accessory objects can be routed throught the mixer for collective
or flaperon.
2011-06-05 15:38:57 -05:00
James Cotton
a1d60cb77d OP-493: Use multiple instances when using multiple accessory channels 2011-06-05 15:38:57 -05:00
James Cotton
1365542103 OP-493: Populate the Accessory Desired from TX 2011-06-05 15:38:57 -05:00
James Cotton
4f47c06547 Merge branch 'saving_crc' into bugfix-flight 2011-06-05 15:37:44 -05:00
James Cotton
624baeda5c Merge branch 'OP-423_Mathieu_GetSet_Uavobjects' into bugfix-flight 2011-06-05 09:48:22 -05:00
James Cotton
0a56129b35 OP-452: Made the CRC calculation run in chunks to balance efficiency and ram
usage, because Stac caught me being lazy :)
2011-06-05 09:05:59 -05:00
James Cotton
56faad594e OP-423: Make sure to unlock semaphore before returning from error condition 2011-06-05 08:41:21 -05:00
James Cotton
599483d5ac OP-152: Save CRC for object and header into flash and only load object if CRC
matches.  Read the flash first bytewise to compute CRC instead of buffering
which is more RAM efficient but very inefficient as it sets up many one byte
SPI transfers.

Also incremented the filesystem magic flag to trigger an automatic flash wipe
on this upgrade.
2011-06-04 18:36:38 -05:00
James Cotton
3e5d02cbaf OP-152: Abstract the CRC code out of uavtalk to allow it to be reused (PT -
feel free to test moving this to the hardware CRC unit)
2011-06-04 18:36:26 -05:00
dankers
3013a092d9 Merge branch 'OP-519_Mathieu_Upgrade_FreeRTOS' into bugfix-flight 2011-06-04 16:42:15 +10:00
Mathieu Rondonneau
7b8d09371b fixing minor compiler error/warnings when compiling OP with DEBUG=NO 2011-06-03 21:47:43 -07:00
Mathieu Rondonneau
31a06a5ae7 OP-423 add set/get uavobjects functions to access objects fields separately. 2011-06-02 21:18:34 -07:00
Mathieu Rondonneau
6e64a546df Remove un-used code 2011-06-02 20:21:26 -07:00
Mathieu Rondonneau
071a684248 OP-519 upgrade to FreeRTOS-7.0.1
- only affect flight/PiOS (no change for posix and win32)
- tested on recent master (some runtime on CC with GCS)
- the new timer feature is not compiled-in since we don't use it yet.
- NO TEST FLIGHT
2011-06-01 21:46:28 -07:00
Oleg Semyonov
f770870af7 Merge branch 'bugfix-flight' 2011-06-01 14:53:31 +03:00
Oleg Semyonov
6e418735cf OP-509: fix for ld symbol reference (also fixes build with 4.5.2 gcc) 2011-06-01 00:31:27 +03:00
James Cotton
efe50012cb Merge branch 'spektrum_rtc_supervisor' 2011-05-29 17:19:48 -05:00
sambas
17fb31a7fa Spektrum rtc supervisor working, tested on CC and all outputs are activated. Needs review and testing before merge. 2011-05-29 14:52:22 +03:00
sambas
86d02e2d34 Merge branch 'master' of ssh://git.openpilot.org/OpenPilot into spektrum_rtc_supervisor 2011-05-29 10:40:17 +03:00
Stacey Sheldon
5be27fda83 coptercontrol: Increase stack size for system module
When running flight software from master (cf74908), my
config was pushing the system module stack usage to within
16 bytes of its limit.  This triggers a stack overflow
alarm which prevents the quad from arming/flying.

This change increases the available stack size such
that there are 72 bytes of stack free (a previously stated
safe margin) when my quad is sitting idle and unarmed on
the bench.
2011-05-29 00:12:26 -04:00
Stacey Sheldon
ac0eb3a5c7 Merge remote branch 'origin/stac_build-opf-image' 2011-05-26 21:29:53 -04:00
James Cotton
66b85acebd Merge branch 'bugfix-flight' 2011-05-26 20:07:58 -05:00
James Cotton
4bc763dafc Extend PiOS DELAY to allow querying the time value in uS 2011-05-26 12:19:04 -05:00
Oleg Semyonov
36d2a467e0 manualcontrol: fix copy/paste error 2011-05-26 00:16:36 +03:00
Stacey Sheldon
4da671fc82 build: change firmware files from .opf to .opfw extensions 2011-05-25 00:20:02 -04:00
Oleg Semyonov
66804076b8 build: fix release/Makefile for *.opf files and changed targets 2011-05-24 23:49:51 -04:00
Stacey Sheldon
8bd08e381a build: add support for EE bank on pipx boards
The pipxtreme boards use a sector of the on-board flash
for configuration storage.  Adjust the memory maps to
reflect this.

The board_info_blob is also extended to include the EE
bank definitions.  This should be used by the pipxtreme
firmware rather than determining it based on chip size.
2011-05-24 01:10:40 -04:00
Stacey Sheldon
91cb294730 build: remove redundant PHONY for size target 2011-05-24 01:10:40 -04:00
Stacey Sheldon
0eb92fad91 build: refactor jtag program and add jtag wipe target
Macros for JTAG program and wipe for each target are now
provided in firmware-defs.mk.

The _wipe target for each firmware and bootloader image will
erase either the bootloader (bl_*_wipe) or firmware (fw_*_wipe)
bank.
2011-05-24 01:10:31 -04:00
Stacey Sheldon
9973fda23b build: define bootloader and firmware bank spans
The board-info.mk files now define the start and size
of the bootloader and the firmware banks.
2011-05-24 01:03:01 -04:00
Stacey Sheldon
504fe7a664 dfu: fix typo WRITABLA -> WRITABLE 2011-05-24 00:58:10 -04:00
Stacey Sheldon
96827eecff build: Make all flight sw use pios_board_info_blob
Now that every bootloader build has a board info blob,
make all fw and bl images use it.

The following MACROS are removed:
  BOARD_TYPE, BOARD_REVISION, BOOTLOADER_VERSION,
  START_OF_USER_CODE, HW_TYPE

These values are now ONLY available from the bootloader
flash via the pios_board_info_blob symbol.  These values
must not be #defined or otherwise hard-coded into the
firmware in any way.  The bootloader flash is the only
valid source for this information.

NOTE: To ensure that we have an upgrade path from an
      old bootloader (without board_info_blob) to a
      new bootloader (with board_info_blob), it is
      essential that the bu_* targets do not depend
      on (or validate) the board_info_blob being present
      in the bootloader flash.
2011-05-24 00:58:10 -04:00
Stacey Sheldon
2d47427b05 link: Use alternate declaration of pios_board_info_blob
Make use of a shorter notation to allow the linker to provide
the correct address for pios_board_info_blob.
2011-05-23 18:21:42 -04:00
Stacey Sheldon
6e406c0232 build: remove all remaining use of -DUSE_BOOTLOADER
The USE_BOOTLOADER compile flag was only being used
to determine where the ISR vector table was located.

Provide this explicitly from the linker since it knows
exactly where it is putting the ISR vector table.
2011-05-23 18:21:42 -04:00
Stacey Sheldon
0a67730d0f build: refactor fw, bl and bu rules
- New macros for fw, bl and bu rules in top-level make
- Per-board info factored into make/board/*/board-info.mk
- Per-board info now shared btw. fw, bl and blupd for each board
   - BOARD_TYPE, BOARD_REVISION, BOOTLOADER_VERSION, HW_TYPE
   - MCU, CHIP, BOARD, MODEL, MODEL_SUFFIX
   - START_OF_BL_CODE, START_OF_FW_CODE
- blupd_* goals renamed to bu_*
- all_blupd goal renamed to all_bu
- firmware goals renamed to fw_*, board name goals are preserved
- bu_*_program now writes updater to correct address for all boards
- BL updater firmware builds now produce .opf format including
  version info blob.
- BL updater firmware name now includes board name.
- INS makefile brought up to date w.r.t. linker scripts
2011-05-23 18:21:42 -04:00
Stacey Sheldon
6ec6425f5e build: build opf images including firmware + version blob 2011-05-22 10:55:13 -04:00
James Cotton
460cc1adc9 Merge remote-tracking branch 'origin/stac_add-bootloader-info-blob' 2011-05-19 16:08:58 -05:00
James Cotton
dd1e10a15d PiOS/Spektrum: Start swapping to using RTC and calls to PIOS_Spektrum_Get() to
monitor when call Spektrum watchdog
2011-05-18 01:46:00 -05:00
James Cotton
bdf862a712 PIOS/RTC: Add functions to get the rate. Also changed Start to Init to be more
consistent with pios.
2011-05-18 01:45:21 -05:00
dankers
5f32803763 Changed accelKp = 1; in 3C filter when calibrating bias when arming. Increase default yaw by 0.005 2011-05-17 04:15:28 +10:00
Stacey Sheldon
2044d777e6 coptercontrol: always enable -g debug symbols
This does not affect the size of the image or the RAM
used by the firmware image.  All debugging symbols are
stripped from the elf file during the conversion to a
.bin file.
2011-05-16 08:35:41 -04:00
Stacey Sheldon
575010169a build: add pios_board_info_blob struct to bootloader flash image
The board info blob is stored in the last 128 bytes of the
bootloader's flash bank.  You can access this data from the
application firmware like this:
  #include <pios_board_info.h>

  if (pios_board_info_blob.magic == PIOS_BOARD_INFO_BLOB_MAGIC) {
    /* Check some other fields */
  }

DO NOT link pios_board_info.c into your application firmware.
Only bootloaders should provide the content for the board info
structure.  The application firmware is only a user of the data.
2011-05-16 08:30:30 -04:00
Oleg Semyonov
39d4f23b67 Merge branch 'master' into OP-483_os_release-packaging 2011-05-15 21:32:20 +03:00
James Cotton
ae2759a957 Merge branch 'bugfix-flight' 2011-05-15 12:50:45 -05:00
James Cotton
eb2d094a66 Merge branch 'OP-499_216_Saving' 2011-05-15 10:09:29 -05:00
dankers
71d582495e On arm bias calibration terms now matches boot calibration terms 2011-05-16 00:16:19 +10:00
James Cotton
886f36dca1 Merge branch 'master' into OP-499_216_Saving 2011-05-15 03:58:30 -05:00
James Cotton
feb9c02780 OP-216: Small typo in flashfs code (thanks Zippe) 2011-05-15 00:18:15 -05:00
Oleg Semyonov
0005729056 OP-500: fix PyMite dependencies on autogenerated files
This is done by separating PyMite-dependent sources and making them
dependent on autogenerated python code. This was tested with make -j
on Windows and worked fine. It failed with errors otherwise:

In file included from ../Libraries/PyMite/vm/class.c:28:
../Libraries/PyMite/vm/pm.h:198: fatal error: pmfeatures.h: No such file or directory
2011-05-15 04:14:17 +03:00
James Cotton
b01e897e36 Merge branch 'OP-488_NeverHaltWhileArmed_James' 2011-05-14 17:21:05 -05:00
James Cotton
d312e876c4 OP-216: Some small bugs where things were stored 2011-05-14 16:11:30 -05:00
Oleg Semyonov
bac95dae11 OP-483: get rid of -D install switch (doesn't work on Mac) and use mkdir -p instead 2011-05-14 23:17:08 +03:00
James Cotton
d883c8af9f Whitespace and line endings 2011-05-14 15:15:33 -05:00
James Cotton
934addfdcc OP-216: Silly typo 2011-05-14 15:11:33 -05:00
dankers
84e09031a7 Faster attitude calc, be much more aggressive with working out bias.
Change AccelkP to 0.05 to give accels more influence, just balacing out the 3C filter.

Change stab setting to be a better default fopr most Quads.
2011-05-15 05:58:58 +10:00
James Cotton
c689d97961 OP-216: Improved error handling 2011-05-14 14:28:11 -05:00
James Cotton
0438f5cf66 OP-216: Check for existence of file table in flash and wipe sector and create
it if missing.
2011-05-14 14:23:23 -05:00
James Cotton
2087441006 OP-216: Make the object manager use new flash fs for objects 2011-05-14 14:23:02 -05:00
James Cotton
7e6e7bb391 OP-499 OP-216: Simple list of objects saved in flash to prevent objId
collision.  Note, this will wipe ALL your settings.
2011-05-14 14:05:02 -05:00
zedamota
a38fbe6cea Make CopterControl firmware non functional when using the ERASE_FLASH=YES compile flag 2011-05-14 19:03:31 +01:00
dankers
52fd23a3b9 Merge remote-tracking branch 'origin/bugfix-flight' 2011-05-14 00:28:42 +10:00
dankers
8e436eb2ac Merge remote-tracking branch 'origin/bugfix-flight' 2011-05-14 00:28:19 +10:00
James Cotton
dbf8a77a94 Now there are other attitude settings (like rotation angle) make sure these are
loaded right away at power up
2011-05-13 07:24:44 -05:00
Oleg Semyonov
a7833e0120 OP-483: add install target for bootloader updater 2011-05-13 11:25:35 +03:00
Oleg Semyonov
45c609100a OP-483: add install target for bootloaders 2011-05-13 11:25:33 +03:00
Oleg Semyonov
37868a4c10 OP-483: add install target for firmware
make INSTALL_DIR=dir INSTALL_PFX=pfx INSTALL_SFX=sfx install
installs binary file into specified install directory adding
optional prefix and/or suffix.
2011-05-13 11:25:32 +03:00
Oleg Semyonov
bf8939eb30 OP-483: cleanup: remove unneeded test.bin from BootloaderUpdater 2011-05-13 11:25:30 +03:00
James Cotton
3d5244c4b8 Fix small typo THRSHOLD to THRESHOLD in gps.c 2011-05-12 18:57:16 -05:00
James Cotton
612cd4ff55 Merge branch 'bugfix-flight' 2011-05-11 20:10:38 -05:00
James Cotton
338d363289 When a channel is disabled in the mixer force the channel to have a 0 us pulse
duration.  The default before was neutral in failsafe.
2011-05-11 20:09:28 -05:00
James Cotton
5d28276c49 Reshuffle memory allocation on CC after FlightStatus object introduced 2011-05-11 17:35:52 -05:00
James Cotton
fdd591b700 OP-488: If the FirmwareIAP receives a halt signal but system is not disarmed
abort the halt.
2011-05-10 14:40:21 -05:00
James Cotton
163d41fb60 OP-466: Make the test output panel work when there is not a valid mixer
configured.  However unlike previous patch keeps alarms showing so you will be
unable to arm normally.
2011-05-10 02:43:55 -05:00
James Cotton
d140d9c1fc Fix from Ivan for BootloaderUpdater not building with 4.5.1 2011-05-10 02:11:34 -05:00
elafargue
f904e09353 Merge branch 'master' into OP-307_Firmware_Description_Packaging 2011-05-10 08:31:25 +02:00
James Cotton
808e3c8ea2 Fix bug I made where guidance didn't look at new flight status object 2011-05-09 11:37:06 -05:00
James Cotton
fb8417a0ff Merge remote-tracking branch 'origin/op_475_476_calibrate_during_arming' 2011-05-09 09:23:16 -05:00
elafargue
c4c9be37c6 Fix typo 2011-05-09 15:30:02 +02:00
elafargue
437d33526a Add command line arguments to versionblob.py so that it is easier to use. 2011-05-09 10:54:29 +02:00
elafargue
adb1e77869 Merge branch 'master' into OP-307_Firmware_Description_Packaging 2011-05-09 10:18:00 +02:00
Stacey Sheldon
b2b1c184de stopwatch: Add support for timers 5-8
This fixes the OP bootloader getting stuck in the
bootloader forever when USB is plugged in.

This also fails hard on being passed an unsupported
timer value so that this can be caught more easily
in the future.
2011-05-08 12:41:02 -04:00
Stacey Sheldon
965867de7a gdb: add config file for coptercontrol bootloader 2011-05-08 12:40:29 -04:00
Stacey Sheldon
29ec2f198b build: convert all app loads to require bootloaders
This change is made up of a number of tightly coupled
changes:
 - Deprecate the use of the USE_BOOTLOADER command-line
   option.  It is now hard-coded in each Makefile.
   Overriding it on the command line is not allowed.
 - Split apart the memory declaration and the section
   declaration in all linker files (*_memory.ld and
   *_sections.ld).
 - Describe the split between bootloader and app sections
   of flash in each board's _memory.ld file.
 - Change program target to selectively erase flash so
   that the installed bootloader is preserved across even
   JTAG programming operations.
 - All elf files are built with debug symbols and are not
   stripped.  This should help debugging with gdb.  The
   images programmed on the boards are all .bin files now
   which do not include symbols.
2011-05-08 12:40:29 -04:00
Stacey Sheldon
465034cf94 bootloaders: always build with debug symbols enabled
This makes it easier to use gdb to debug issues.  This does
not change the -O flags, only makes -g always on and does
not strip the .elf files.
2011-05-08 12:40:28 -04:00
Stacey Sheldon
18ea93119f build: Add support for BL_Updaters to top-level makefile
New targets:
 - make blupd_all_clean
 - make blupd_all
 - make blupd_openpilot
 - make blupd_ahrs
 - make blupd_coptercontrol
 - make blupd_pipxtreme

These targets are also included in the 'all_flight' target.
2011-05-08 12:40:28 -04:00
elafargue
a2656ed589 Merge branch 'master' into OP-307_Firmware_Description_Packaging 2011-05-08 00:08:09 +02:00
Stacey Sheldon
2301600f11 Make missing definitions for essential macros more obvious 2011-05-07 18:05:50 -04:00
Stacey Sheldon
7e99419c8a build: Add support for %.bin.o generation
The .bin.o rule places the contents of a raw .bin file
into an .o file wrapped within fixed symbols for start
and end.  This can be used to embed a binary file inside
of an executable.

The symbols for the embedded binary blob are:
 _binary_start
 _binary_end
 _binary_size

NOTE: The way the .bin.o rule is currently written, you
can only embed one binary blob in an executable since the
symbol names will collide if you add multiple blobs.  This
limitation is easily removed later if necessary.
2011-05-07 18:05:50 -04:00
Stacey Sheldon
58a2c71532 line-end changes only 2011-05-07 18:05:50 -04:00
James Cotton
4ec0263dfc OP-476: If AttitudeSettings.ZeroDuringArming is true, then while arming (1
second) it will speed up the estimate of gyro bias.
2011-05-07 15:29:21 -05:00
James Cotton
8e06eb3162 Get the "IDLE_NO_LOAD" level closer for CC with optimizations on, but it would
be great if someone actually calibrated this for me!
2011-05-07 15:07:14 -05:00
James Cotton
10e55c25bc OP-475: More changes to get the FlightStatus object to work for Armed and
FlightMode
2011-05-07 15:06:04 -05:00
James Cotton
80c839d5bb OP-475: Starting to use the new FlightStatus object 2011-05-07 13:17:21 -05:00
James Cotton
ae841d57cb OP-475: New FlightStatus object. Removed from ManualControlCommand. Won't
build yet.
2011-05-07 12:45:35 -05:00
James Cotton
e2819c6815 Restructure the ManualControlCommand code to be much more readable. Also
facilitates the new FlightMode object.
2011-05-07 12:43:27 -05:00
James Cotton
d1fb254a41 Merge branch 'master' into bugfix-flight 2011-05-07 06:56:54 -05:00
James Cotton
d3247c9946 Remove unused code from coptercontrol.c 2011-05-07 06:56:20 -05:00
James Cotton
fef1e2dc2e Merge remote-tracking branch 'origin/OP-174_Sambas_BaroAlt_to_ETOSD' 2011-05-07 04:41:13 -05:00
elafargue
98c38a4e5e Bugfix 2011-05-07 09:25:27 +02:00
elafargue
a216d050ab Prototype 'version blob' python script to generate a binary description file to append to end of firmware before uploading. 2011-05-06 21:46:36 +02:00
Corvus Corax
5f749dda7e Modules/ManualControl: bugfix GCS Control was broken due to connection state and arming being checked outside of the "object_writable()? {}" if clause 2011-05-06 01:26:34 +02:00
Corvus Corax
39a9087c98 Merge branch 'master' into bugfix-flight 2011-05-06 00:29:31 +02:00
James Cotton
7e418866be Update the AttitudeSetting object to make the board rotation more human
readable and update the GCS fields appropriately.
2011-05-05 13:04:56 -05:00
Corvus Corax
59dd0637a3 PiOS_posix: Add support for pios_debug API, to allow building of GPS module in x86 environment 2011-05-05 14:57:30 +02:00
James Cotton
dd36192e37 Merge branch 'bugfix-flight' 2011-05-05 00:36:55 -05:00
James Cotton
93d8449814 OP-474: When throttle < 0 and "spin while armed" mode enabled don't take into
account stabilization or stick - stay at neutral
2011-05-05 00:32:15 -05:00
James Cotton
21a71e5294 Merge branch 'master' into spin_while_armed
Added back the "Spin arming" button to output panel and made it work
Conflicts:
	ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp
	ground/openpilotgcs/src/plugins/config/output.ui
2011-05-05 00:23:51 -05:00
James Cotton
05684e966b OP-470: Make arm/disarm threshold 50% instead of 90% 2011-05-04 22:53:00 -05:00
James Cotton
7e98bb42c9 OP-462: Patch from OS to override the debug flag for bootloaders 2011-05-03 12:54:11 -05:00
James Cotton
401a989c63 OP-474: Add option to ActuatorSettings to allow people to request their propellers always spin an neutral when armed (I don't recommend this). 2011-05-03 00:08:39 -05:00
James Cotton
9daca1ac41 OP-469: Wasn't paying attention and missed a line 2011-05-02 22:22:57 -05:00
James Cotton
2e552f767e OP-469: Wasn't paying attention and missed a line 2011-05-02 22:22:16 -05:00
Corvus Corax
8d8144f233 OP-441 Prevent double alarm set ( setFailsafe() already sets alarm to CRITICAL ) 2011-05-02 18:00:12 +02:00
James Cotton
9afedc0139 OP-469: Fix a bug I wrote where MaximumRate instead of ManualRate was used to
scale sticks in rate mode.
2011-05-02 04:33:32 -05:00
James Cotton
d9221fac06 Merge remote-tracking branch 'origin/OP-452_InputConfiguration' 2011-05-02 03:40:59 -05:00
James Cotton
1f36e00287 Merge remote-tracking branch 'origin/OP_442_OP_437_PT_Dreamer' 2011-05-02 03:34:09 -05:00
David Carlson
341dbd7ad9 Change blink rate to Hz rather than 1/2 Hz. As per comments in review OPReview-18. 2011-05-02 00:50:42 -07:00
David Buzz Carlson
edd5ad8a78 Update Stat LED blink rate when armed to 5 Hz from its current 1 Hz. This allows a more drastic change in LED behavior to highlight that the aircraft WILL NOW CUT YOUR FINGER OFF IF YOU DON'T RESPECT IT!! 2011-05-02 00:50:42 -07:00
David Buzz Carlson
c93ab7e723 Change CC, OP MB, and AHRS to use bootloader by default.
Also change AttitudeActual to update at 10Hz rather than 2 Hz.  The increased bandwidth is minimal and the resulting "polish" that it adds to the look-and-feel of the GCS is signifcant.
2011-05-02 00:50:42 -07:00
zedamota
5dd8a3eea2 Fix a silly mistake on the CC erase_flash compile flag. 2011-05-01 20:10:27 +01:00
elafargue
6b00ed3866 NACKs implemented on both ground and flight side, connect time goes under a few seconds now. 2011-04-30 19:32:42 +02:00
zedamota
3d209f2166 Fix to erase option. Erase must be performed after board initialization. 2011-04-30 14:17:44 +01:00
James Cotton
62e3d35a97 OP-452 Read the channel times even if a bad mixer is configured 2011-04-29 17:57:04 -05:00
zedamota
8dd46e1465 Should fix the CC showing as OP.
Added a compile flag to make a CC fw version that will erase flash.

Signed-off-by: zedamota <josembarros@hotmail.com>
2011-04-29 23:38:26 +01:00
zedamota
6172e45c0d Should fix CopterControl showing as Openpilot on DropDown box. 2011-04-29 21:42:59 +01:00
zedamota
1cc152b4dd More cleaning, moved stopwatch files to library folder, code formatting. 2011-04-29 20:48:13 +01:00
zedamota
3132de4e48 Fixes download being slow issue. Made some cleaning also 2011-04-29 19:22:21 +01:00
Sambas
2413fd451f OP-174 ET OSD: barometric altitude works now, units must be set metric with E-Logger 2011-04-29 19:08:28 +03:00
James Cotton
5f776f0b58 Merge branch 'master' into OP-439_CorvusCorax_Bootloader-Makefile-and-OpenOCD-config-for-Linux 2011-04-27 23:41:35 -05:00
James Cotton
819bc9d441 Merge branch 'master' into OP-430_Ligi_UAVTalk-Code-Review 2011-04-26 12:49:32 -05:00
Corvus Corax
8c7f3e2720 OP-435 #ifdef covered one command too many - bugfix 2011-04-25 18:37:28 +02:00
Corvus Corax
eb9ccc2f9b OP-383 Review 11 : Removed commented out unused variables as directed by review 2011-04-25 16:36:23 +02:00
Corvus Corax
cdb6b65e64 Merge branch 'master' into OP-383_Edouard_CPUSerial_in_FirmwareIAP 2011-04-25 02:36:44 +02:00
James Cotton
69d03ca101 OP-439: Simplify further. Abstract most of the OOCD flags into the common
firmware include and delete all the extra foss-jtag config files.  There is now
a legacy file for the revA board a second for AHRS that changes the port
2011-04-24 10:19:00 -05:00
Corvus Corax
ee7179bd53 OP-439 unified OpenOCD config for mac os x and Linux, Makefiles adapted accordingly 2011-04-24 12:10:33 +02:00
marcus bueschleb
06ac71b784 do not force telemetry update when alarm is changed - this was bypassing the MetaData of the UAVObject and seem to be a relict from times where no metadata existed - now doing it the MetaData way with onchange as updatemode - see http://forums.openpilot.org/topic/4208-systemalarms-bypassing-updatemode-from-metadata/ and OP-431 2011-04-24 03:43:05 +02:00
Corvus Corax
5d952f81e3 PIOS: BL_HELPER: refactored function names 2011-04-23 21:11:17 +02:00
Corvus Corax
150464344d BL_HELPER: call CRC_Ini() from within CRC check function 2011-04-23 20:55:21 +02:00
Corvus Corax
0a05896146 CopterControl: Added dependency: pios_bl_helper 2011-04-23 19:56:48 +02:00
Corvus Corax
357bc369db PIOS: Bootloader Helper functions should sit in HAL, not duplicated in every single architecture. 2011-04-23 19:40:41 +02:00
Corvus Corax
192e31986d PIOS, Modules/FirmwareIAP: Use correct HAL for CPU serial 2011-04-23 18:30:32 +02:00
Corvus Corax
2bf7ea2271 Modules/GPS: Make code to deal with home location optional to allow a sleeker GPS module for RAM challenged systems 2011-04-23 16:49:07 +02:00
marcus bueschleb
b7eba1f9b9 made all periods unsigned 2011-04-20 12:33:16 +02:00
elafargue
e4112e210f Reduce size of FirmwareIAPObj to 40 bytes: only takes the 40 first bytes of the firmware description, ignores the rest. Makes the FWIAP UAVObject more decent size-wise, and does not break USB TX anymore. 2011-04-19 20:45:49 +02:00
elafargue
45e92d654e Implemented support for the Unique STM32 CPU serial number in the firmwareIAP object. 2011-04-19 00:31:20 +02:00
corvus
08eabd21e4 Fixed files with mixed line endings
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3168 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-15 12:03:20 +00:00
peabody124
3afdc7e41c CC-24: Rotate the CC board at any angle relative to "flat and level" with GCS
config plugin updates.  Has not been tested in flight yet although seems
sensible so please be careful when using this code.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3166 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-15 06:37:16 +00:00