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

3566 Commits

Author SHA1 Message Date
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
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
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
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
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
elafargue
9d89f1e180 OP-528 Make the manual and maximum RPY rates available in the config gadget 2011-06-09 13:12:03 +02: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
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
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
elafargue
56b63613ba Merge branch 'master' into bugfix-ground 2011-06-05 22:58:03 +02:00
elafargue
851bb61d6f Merge branch 'master', remote-tracking branch 'origin' 2011-06-05 22:57:29 +02:00
James Cotton
b011dcd035 Merge branch 'bugfix-flight' 2011-06-05 15:37:58 -05:00
James Cotton
4f47c06547 Merge branch 'saving_crc' into bugfix-flight 2011-06-05 15:37:44 -05:00
elafargue
ac7216946a Now use the ".uav" extension for exporting settings in XML format. Dormant feature: if you use a .xml extension manually, will export in full format. 2011-06-05 19:02:43 +02:00
elafargue
3077dec24d Merge branch 'bugfix-ground' into OP-369_Edouard_UAVSettings_ImportExport 2011-06-05 18:42:39 +02:00
elafargue
3d676d05df Merge branch 'bugfix-ground' of git.openpilot.org:OpenPilot into bugfix-ground 2011-06-05 18:41:46 +02:00
elafargue
e5e85fa47a Get rid of the "Request" button on the config gadget: it now tracks object updates and automatically keeps its state synchronized with UAVOBject changes. 2011-06-05 18:40:52 +02:00
James Cotton
483deb2bfc Changed the default values for manual control settings to none to avoid
problems with channel mappings being different by brand.

You will need to recalibrate your transmitter.
2011-06-05 11:01:00 -05:00
James Cotton
2e089e2816 Changed text when using test output mode to remove deprecated comment about
arming.
2011-06-05 10:58:08 -05:00
James Cotton
8bec19f4a5 Merge branch 'bugfix-flight' 2011-06-05 09:48:43 -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
e02aa1b818 OP-152: Make the zeroing of LSB of has occur after hash is computed so that the
LSB of individual field values still influences the hash

Note: This update changes ALL object IDs.  A new GCS is required to match the
firmware.
2011-06-04 18:36:44 -05:00