Commit Graph

39 Commits

Author SHA1 Message Date
Gautier Hattenberger 62646d68de Modules recommends and suggests (#3005)
Add two new items in module's dependency:
- recommends: a recommended module tells the sorting algo that if the module is found, it should be sorted accordingly. It is useful for optional dependencies, like shell or mission in some modules
- suggests: if a functionality is not provided by the user, a module can suggest a list of modules that can provide them. It is a convenient way to have "default" modules.

As a result the former autoload node is removed and replaced by suggested modules.
2023-03-07 17:14:15 +01:00
Fabien-B 9eebb1747a [chibios] usb serial (#2878)
* Add ChibiOS USB Serial.
* do not terminate shell thread on read error.
* build usb serial
* Condition for building usb_ser_hw.c
* match UART buffer size
* include USB serial in uart module.
* Shell dependency on uart.
* Add missing attribute in DTD.
* Add setting to enable USB storage.
* Allows to use USB serial with logger.
* Allow defining USB_RX_BUFFER_SIZE.
2022-05-19 23:50:17 +02:00
Gautier Hattenberger e436d78c84 [autopilot] merge AP and FBW in normal operation (#2828)
There is no longer a separated FBW in normal operation for fixedwing,
only a single AP task/thread.
The code for main_ap is now factorized for all firmwares.
Dual MCU support (separated AP and FBW) is still possible, based on the
rotorcraft implementation and intermcu pprzlink messages. Relevant code
is also factorized and available in all firmwares.
The recovery mode (in case of hard fault) is still available for
fixedwing with ChibiOS implementation.
Only intermcu_uart is supported at the moment. Other options (spi/can)
might be added back in the future if really used.

Some other evolution are made:
- in the radio_control and actuators modules, now integrated to AP and
using ABI messages
- the message parsing on datalink event (defined in module) that is now
properly filtering the messages based on their class and allowing to
have multiple callbacks for the same message
- cleaning the part of code that were using the old intermcu fixedwing
interface
2022-03-10 14:21:04 +01:00
Gautier Hattenberger d02ec5ba98 [modules] update modules XML for proper dependcies and tasks 2021-07-27 13:34:23 +02:00
Gautier Hattenberger e4d9e10492 [modules][ocaml] implement module dependency (#2669)
- support depends, conflicts and provides nodes, all under a 'dep' node
- autoload are kept for now and are not moved yet
- modules are updated for new dep format
- it is now required that module's name and filename are the same
2021-03-16 17:47:34 +01:00
Gautier Hattenberger 494e3f3ad9 [tests] add a compilation test node to modules (#2653)
When adding a test node to a makefile section, with required compilation
flags, include and other options, all the files (not arch dependent
files) can be compiled with a TAP compatible program, included in the
standard tests of the CI servers.
Not all module's XML files are converted, but a large part of the most
important parts are already covered. More will be added later. The
number of tested airframes (full compilation of all targets) have been
reduced to speed the CI compile time but still covers the relevant
architecture and boards.
The main benefit is that the overall coverage is already better than
before as previous test aircraft were compiling more or less the same
part of the airborne code, while this new mechanism is more efficient to
test modules not included in any config.
2021-02-08 17:24:19 +01:00
Gautier Hattenberger 46bec882f3 [modules] start adding MCU periph modules (#1989)
Modules for MCU peripherals. Previous subsystems or direct definition in firmware makefile are kept for now, until dependencies are properly handled.
2017-01-26 22:09:55 +01:00
Gautier Hattenberger bf3def687d [modules] convert radio_control subsystems to modules
- calling init functions will be done later, it needs to be attached to
  the FBW part
- add 'cond' attribute option to more nodes in module makefile section
2017-01-15 13:48:46 +01:00
Gautier Hattenberger 4316871b63 Telemetry modules (#1835)
* [modules] convert telemetry subsystems to modules
* [modules] add init and event functions to modules
* [datalink] remove old datalink lib export
* [datalink] drop audio_telemetry code
* [modules] generate modules functions grouped into tasks
2016-10-07 14:35:07 +02:00
Felix Ruess 17d32772c0 [imu] convert imu subsystems to modules (#1788)
* [imu] convert imu subsystems to modules

Also
- get rid of explicit imu init|event|periodic calls in main
- each imu implementation has their own imu_x_init/event/periodic

* [imu] fix some imu modules

* [imu] fix bad paths

* [imu] add imu_common module that every implementation autoloads

and put body_to_imu settings in imu_common module

* [imu] fix imu_ardrone2

* [conf] add imu_common settings module in conf_example and conf_tests
2016-08-12 12:02:38 +02:00
Felix Ruess 19a0ad30ca [modules] header node in module xml is optional 2016-06-17 15:41:01 +02:00
Gautier Hattenberger 5b44eb8d2f [modules] autoload modules from an other module 2016-06-15 18:22:23 +02:00
Gautier Hattenberger 1fdea9387b [modules] split define and include
also reuse 'type' attribute for string flags
2016-03-31 22:40:46 +02:00
Felix Ruess e56fd4eae5 Revert "allow xml in module description"
This reverts commit a2c9587165.

Somehow the OCaml XML/DTD parser doesn't like it if the description contains CDATA...
2016-03-31 12:02:06 +02:00
Felix Ruess a2c9587165 allow xml in module description 2016-03-31 11:52:09 +02:00
Gautier Hattenberger d76887c062 [build] add firmware option to modules' makefile section
- allow to make a single module with specific firmware support
- example with telemetry_transparent module
2016-02-10 19:06:58 +01:00
Gautier Hattenberger 904507a4e6 [build] add case modifier to modules' makefile
- this allow to use lower and upper version of a makefile variable.
- can also be use to provide default value to some variables.
2016-02-10 18:05:43 +01:00
Gautier Hattenberger f8145a2ba1 [settings] filter modules' settings with target attribute like regular settings 2016-02-02 18:26:38 +01:00
Felix Ruess 58db7fafab [conf][modules] require doc and description 2015-12-10 14:34:44 +01:00
Gautier Hattenberger bcd241a0c7 [generators] allow conditions on modules' defines 2015-02-10 17:55:52 +01:00
Felix Ruess 8be5c426b6 [modules] start pimping dependencies
Start working on #940

This replaces
```xml
<depend require="foo|bar" conflict="baz"/>
```
with
```xml
<depends>foo,bar</depends>
<conflicts>baz</conflicts>
```

and now allows to specify OR dependencies with | (pipe) similaro to Debian depends:
```xml
<depends>foo,bar,this|that</depends>
```
which would depend on: foo AND bar AND (this OR that)
2014-12-08 10:33:28 +01:00
Gautier Hattenberger 170e5b6843 [settings] allow several groups of settings in modules 2014-09-30 18:49:28 +02:00
Gautier Hattenberger 7230aa4a92 [settings] add settings directly inside modules files 2014-09-30 13:57:17 +02:00
Gautier Hattenberger e39292c77b [settings] improve settings in pprzcenter
- check box for faster enable/disable
- loading from modules
2014-09-16 22:17:35 +02:00
Gautier Hattenberger 50b51ce513 [modules] use VPATH to make it easier to load external modules 2014-06-26 17:20:58 +02:00
Felix Ruess c4d0104196 [modules] allow unit in define node 2014-03-10 23:04:12 +01:00
Gautier Hattenberger 6abd9087c5 [dtd] some fixing in module and flight_plan DTD 2012-05-26 00:15:09 +02:00
Gautier Hattenberger bcaba7c720 [modules documentation] Add a doc node to module
modules developpers can provide
- a description of the module
- a list of the configuration variables and flags (configure and define)
- a list of sections to add to the airframe file
2012-04-24 09:29:12 +02:00
Gautier Hattenberger 28e26cb7c5 ir adc and i2c are available as modules and subsystems 2010-12-29 12:23:09 +01:00
Gautier Hattenberger 12ea204e33 unified definition for config of modules and subsystems 2010-12-20 12:51:53 +01:00
Gautier Hattenberger 63e4b6954b add the possibility to choose the directory name independent of the module name
only the directory "modules" is included now
2010-08-23 14:52:16 +00:00
Felix Ruess f666194e7e add jsbsim to default targets of modules 2010-07-16 16:28:25 +00:00
Gautier Hattenberger f56bc86683 add attribute in modules makefile section in DTD 2010-03-02 10:39:58 +00:00
Gautier Hattenberger 93edc8c37c add a new enose module 2009-07-24 15:35:48 +00:00
Gautier Hattenberger 5b2d917218 add datalink message parsing by modules 2009-07-24 12:19:05 +00:00
Gautier Hattenberger ade6d90b65 add freq option to periodic function in modules 2009-07-24 10:54:39 +00:00
Gautier Hattenberger db39851632 add a LOCK option to periodic autorun (now default) 2009-07-21 13:55:32 +00:00
Gautier Hattenberger 8ae94465ea add new flags for the modules makefiles 2009-07-21 12:24:50 +00:00
Gautier Hattenberger bf8683a6ed add DTD for modules and a demo file 2009-03-11 17:06:28 +00:00