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

50 Commits

Author SHA1 Message Date
Brian Webb
e83fec0463 Merged latest origin/next. 2012-05-05 09:40:44 -07:00
Stacey Sheldon
6bb4f0c61d leds: use boot-time config for PiOS LED layer
LEDs are now configured based on a board-specific initialization
in PIOS_BOARD_Init().

LEDs are now named:
  PIOS_LED_HEARTBEAT
  PIOS_LED_ALARM
2012-01-22 18:22:59 -05:00
Stacey Sheldon
b05697c2cf taskinfo: ensure usage of TaskInfo uavo is covered by DIAG_TASKS
OpenPilot platform (and thus sim too) was missed when the
DIAG_TASKS macro was broken out from the DIAGNOSTICS macro.

This allowed accesses to the TaskInfo UAVO even though it hadn't
been initialized.
2012-01-15 18:16:50 -05:00
Stacey Sheldon
c97b108a1f bootfault: make IAP usage depend on PiOS config
The sim platforms don't support an IAP mechanism.  Let
PiOS config control when we try to use it.
2012-01-15 18:16:49 -05:00
Stacey Sheldon
f886af186d bootfault: add support for recovery from init failures
After 3 failed warm start attempts, the init sequence
will force the RAM version of the HWSettings object
to its defaults.  This should allow a user to regain
connectivity to a board that is continually faulting
during init.

This is accomplished by:
 - Incrementing a boot counter that is stored in the
   STM32 BKP registers.  These registers survive a
   warm start but are cleared on a cold start (ie. powerup).
 - On multiple failures, force hwsettings to defaults
   and raise the (new) BootFault alarm to prevent arming.
 - Resetting the boot counter whenever the system manages
   to successfully run the System Module task.

NOTE: This does not actually change the hwsettings object in
      flash.  That's up to the user.

This is intended to catch ONLY faults during early initialization.
It should not be used to recover from faults after the application
is up and running.
2011-12-30 23:05:38 -05:00
Stacey Sheldon
7c03875013 diag-tasks: make taskinfo diagnostics a separate enable
This allows task stack analysis without turning on all
of the other diagnostics.
2011-12-30 23:05:37 -05:00
James Cotton
b110e9c549 Style suggestions to cleanup GPS from Stac 2011-11-12 21:31:01 -06:00
Corvus Corax
aa69027cb2 Merge branch 'next' into CC_GPS 2011-11-11 11:44:11 +01:00
Corvus Corax
e03e3c2ed8 removed "special code" to start optional modules 2011-11-11 11:22:54 +01:00
Oleg Semyonov
8f77d07119 System Module: fix stupid out of memory detection bug 2011-11-07 19:14:55 +02:00
Oleg Semyonov
f71361ca83 Merge branch 'next' into os/GPS-on-CopterControl_next_v2
Conflicts:
	flight/Modules/System/systemmod.c
2011-10-22 23:00:47 +03:00
Corvus Corax
cb8d9c791c PiOS.posix: fixed missing defines in pios_config. removed platform specific inclde from Systemmod (pios_config.h gets included from pios.h) 2011-10-19 22:28:39 +02:00
Corvus Corax
b00751af91 Systemmod bugfix: UAVObject used without Initialization 2011-10-19 22:28:08 +02:00
Oleg Semyonov
53c098dd08 Merge branch 'next' into os/GPS-on-CopterControl_next_v2
Conflicts:
	flight/OpenPilot/System/pios_board.c
	flight/OpenPilot/UAVObjects.inc
	shared/uavobjectdefinition/hwsettings.xml
2011-09-28 22:02:02 +03:00
Corvus Corax
658ae3f809 Modules/System: removed comment line 2011-08-25 16:26:46 +02:00
Corvus Corax
4bd72923e5 Merge branch 'CorvusCorax_unidirectional-GPS-com' into CC_GPS
Conflicts:
	flight/Modules/GPS/GPS.c
	flight/Modules/GPS/GTOP_BIN.c
	flight/Modules/GPS/NMEA.c
	shared/uavobjectdefinition/hwsettings.xml
2011-08-25 15:33:23 +02:00
Stacey Sheldon
edc0caf521 heap: set memory critical alarm on malloc failures
Activate the FreeRTOS malloc failed hook and use it
to set the memory critical alarm.
2011-08-21 23:14:32 -04:00
James Cotton
368323fd59 Merge remote-tracking branch 'origin/james/erase_settings' into next 2011-08-20 13:07:01 -05:00
Corvus Corax
1ad65e0718 Fixed include in sysstemmod. pios_config.h should not be included explicitly. 2011-08-20 15:04:00 +02:00
Corvus Corax
dfd301571a HWSettings: Allow late Initialization and Start of Modules as defined in Makefile(available modules) and UAVObject(actually started modules) 2011-08-20 01:24:06 +02:00
James Cotton
35eef66bfe OP-557: Add a UAVO access method to erase the entire flash chip. Normally not
needed by users because if too much changes I change the FS magic and trigger a
wipe.

Possibly the erase should require a particular "magic" object id value to
execute?  This would make it harder to do manually through UAVOs though.
2011-08-15 10:33:27 -05:00
James Cotton
96c2d24253 Merge branch 'next' into camera_stabilization
Conflicts:
	flight/CopterControl/Makefile
	flight/CopterControl/System/coptercontrol.c
	flight/Modules/Actuator/actuator.c
	flight/Modules/GPS/GPS.c
	flight/Modules/ManualControl/manualcontrol.c
	flight/Modules/Stabilization/stabilization.c
	flight/Modules/System/systemmod.c
	shared/uavobjectdefinition/manualcontrolsettings.xml
	shared/uavobjectdefinition/stabilizationdesired.xml
2011-07-30 10:06:10 +09:00
Mathieu Rondonneau
612a439199 OP-423: simplify the MODULE_INITCALL macro and remove the ordering loops 2011-07-12 20:44:32 -07:00
Mathieu Rondonneau
9b9b5a1367 OP-423: remove ';' at the end of macro 2011-07-05 19:44:54 -07:00
Mathieu Rondonneau
6683ce8570 OP-423: Make it more obvious that MODULE_TASKCREATE_ALL and MODULE_INITIALIZE_ALL are macro (for now):
- remove the ;
  - also encapsulate the macro by {} in his own scope.
2011-06-25 11:40:01 -07:00
Mathieu Rondonneau
de55c56427 OP-423: Change capital on macro to be uppercase for consistency. 2011-06-24 22:03:03 -07: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
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
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
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
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
5d28276c49 Reshuffle memory allocation on CC after FlightStatus object introduced 2011-05-11 17:35:52 -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
80c839d5bb OP-475: Starting to use the new FlightStatus object 2011-05-07 13:17:21 -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
peabody124
48c20d37a9 OP-349 CC-32: Added a Completed operation that is returned after successful
save or load

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3093 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-28 19:16:50 +00:00
FredericG
baf0850690 OP-336 CPU usage calculation incorrect when armed - no measure the time between calculations
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2987 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-06 11:50:54 +00:00
scott
f1ee47dcff Added #include "pios_config.h" to make sim_posix build again. Some alarm constants were missing.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2945 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-03 05:09:11 +00:00
peabody124
672b9ce961 Convert failure to mount SD card to an error so you can't arm with an
unconfigured quad

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2929 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-02 01:25:23 +00:00
osnwt
899c1fe0bf Moved CPU and heap alarm thresholds into pios_config.h.
Fixed heap thresholds for the CC (prevented arming).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2886 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-26 11:46:39 +00:00
FredericG
42cf204dcd correctly detect 100% load
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2836 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-21 21:50:10 +00:00
sambas
8d6f320fca Handle I2C defines better, needed in CC for now
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2815 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-20 07:14:02 +00:00
peabody124
f93ed5f01f CC Module memory: Make it clean for CC to override the stack sizes of modules
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2668 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-01 02:18:35 +00:00
peabody124
bcdd87689a OP-295 Modules/SystemMod: Get the internal CPU temperature sensor and store in
system stats when available

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2511 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-21 17:18:24 +00:00
peabody124
2d9f7f32d1 OP-291 PiOS/Servo: Converting output to use driver system
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2499 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-21 03:40:21 +00:00
cwabbott
7f8ea5e55a PiOS.win32: updates to get it compiling again.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2462 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-17 00:00:41 +00:00
peabody124
9cf3ee9fb3 OP-267 Flight/UAVObjectManager: Make all references to DFS function depend on
PIOS_USD_SDCARD.  However, this needs to be cleaned up and abstracted out of
the UAVObjectManager who shouldn't care about the storage layer.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2417 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:27 +00:00
peabody124
940792db5c OP-265 CopterControl: Fork main OpenPilot directory
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2416 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:24 +00:00
peabody124
fc54159369 OP-265 Flight reorganization of UAVObjects and Modules up a directory
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2415 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 01:38:19 +00:00