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

3589 Commits

Author SHA1 Message Date
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
Mathieu Rondonneau
506125af14 OP-423: fix problem in GCS when the config files get deleted.
GCS aborts on a table overflow when trying to set the axes with wrong number of channels.
2011-06-18 15:55:11 -07: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
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
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
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
James Cotton
d7e08e5686 Merge branch 'heli_improvements' 2011-06-14 09:13:52 -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
0e6abd4f39 Merge branch 'master' into OP-423_Mathieu_Change_Init_To_Reduce_Memory_Footprint 2011-06-13 18:51:22 -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
elafargue
8807d6bf0f OP-534 Disable arming completely when staring calibration procedure. Tells user to reconfigure arming manually afterwards. 2011-06-13 12:14:40 +02: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
dankers
9c6f2e0aea New deluxe linear dials, new files and not used by default so commiting to master. 2011-06-11 23:24:59 +10:00
Oleg Semyonov
5d0c7fe42e Merge branch 'master' into heli_improvements 2011-06-11 12:19:07 +03:00
Oleg Semyonov
a13c8470d3 Merge branch 'master' of ssh://git.openpilot.org/OpenPilot 2011-06-10 23:14:16 +03:00
Corvus Corax
a7841a523a bugfix: forgot to add header file (pios.posix) 2011-06-10 22:04:54 +02:00
Oleg Semyonov
52d9438847 Merge remote branch 'origin/bugfix-ground' 2011-06-10 23:02:45 +03: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
dankers
d9607c44d8 Minor update from London flyer, readability on smaller screens improvement 2011-06-10 23:51:01 +10:00
dankers
314f596940 Update to Ed's PFD from London Flyer, adds slight look and feel improvments and removes the orange look.
Uses some look and feel from Guy's work also.
2011-06-10 21:40:30 +10:00
elafargue
c79cc1eb1a OP-376 Make all dialogs more dynamic to cope with smaller screens & resizes. 2011-06-09 18:03:19 +02:00
Oleg Semyonov
bc3b23a4a2 Merge branch 'bugfix-ground' into heli_improvements 2011-06-09 15:58:11 +03:00
elafargue
9d89f1e180 OP-528 Make the manual and maximum RPY rates available in the config gadget 2011-06-09 13:12:03 +02:00
Oleg Semyonov
f766642f0d Merge branch 'master' into heli_improvements
Conflicts:
	shared/uavobjectdefinition/manualcontrolsettings.xml
2011-06-09 10:11:27 +03:00
elafargue
1ac92643b7 Fix 'smart' throttle/flight mode channel assignment, it works now. Someone please test & report.
OP-522
2011-06-08 22:15:10 +02:00
James Cotton
3a3c88cefa OP-522: When you unchecked Run Calibration it forces the Throttle neutral to 5%
of the range and the FlightMode to 50%.

Sorry there's also some indentation changes mixed into this patch.
2011-06-08 12:21:43 -05:00
James Cotton
5aa8224181 Merge branch 'bugfix-flight' of ssh://git.openpilot.org/OpenPilot into bugfix-ground 2011-06-08 12:02:52 -05:00
James Cotton
f361603a10 OP-521: Fixed reversal of flight mode in GCS properly now I have hardware to
test it :)
2011-06-08 12:01:47 -05:00
dankers
0b59c34afb Change Accel kP default to 0.03
Lots of testing with this but would like more thoughts as well.
2011-06-09 00:47:09 +10:00
James Cotton
68d6e7deba OP-521: Fixed dangerous UI bug that reversed flight mode switch on GCS relative
to flight when flight mode switch input range was reversed.  Also switche to
using static field method technique for compiler error checking (preferrable
when possible)
2011-06-07 17:35:21 -05:00
James Cotton
0b78ae07bb OP-521: Match the flight logic for processing flight mode switch position on
GCS so the slider should always match what hte internal logic says.
2011-06-07 17:04:36 -05:00
Oleg Semyonov
268488a5b8 config: relax the CCPM mixer disclaimer (it has been used already) 2011-06-07 19:46:46 +03:00
Oleg Semyonov
b1d945c6f2 OP-369: remove completed TODO list, unify capitalization 2011-06-07 19:41:52 +03:00
James Cotton
4a59c03b0e OP-493: Unfortuantely have to change stack alarms for this to work :( 2011-06-07 10:31:40 -05:00
elafargue
9b572407a7 Small compilation warning fixed and small typos 2011-06-07 17:15:16 +02:00
elafargue
dbba0afe0d OP-369 Last improvements to import option. 2011-06-07 17:06:50 +02:00
elafargue
a7dccb6648 OP-502 If a board is not connected, the "Save" button is grayed out. The "Apply" button is still enable, which enables creating configurations purely offline. 2011-06-07 16:56:16 +02:00
elafargue
81b29c2b51 Merge branch 'master' into bugfix-ground 2011-06-07 14:59:43 +02:00
elafargue
8ac5399c1d OP-527 Implemented as requested: will load the default settings if no settings found, without asking. 2011-06-07 13:54:38 +02:00
elafargue
4f248172a3 Fix flight mode dial SVG to show the complete status. 2011-06-07 13:50:24 +02:00
elafargue
b6326b855d OP-369 Implement help button and keyboard shortcuts as requested. 2011-06-07 07:01:58 +02: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
83916f3a4e Fix bug in UAVTalk where the expected packet length check was incorrect for
instances of objects
2011-06-06 10:37:57 -05:00
elafargue
2a5ff0b36a OP-369 : in case there is an objectID mismatch, still try to update the object if we found the name, but place it in "warning" mode. If during update some fields do not exist, then place in "Error" mode and prevent automated saving (will still try to update as many fields as possible) 2011-06-06 10:44:21 +02:00