21 Commits

Author SHA1 Message Date
CaFeZn
963a776fa6
feat(heater): Add multi-instance support for heaters (#26325)
* heater: add multi-instance support, refactor parameter handling, remove legacy params file

This change introduces multi-instance heater support to allow independent temperature control for multiple IMUs.

Main changes:
- Add support for multiple heater instances
- Refactor parameter handling to use per-instance parameters
- Remove the legacy parameter file and migrate to the updated parameter structure

This improves scalability and makes heater configuration consistent across setups with multiple sensors.

* Refactor heater configuration across multiple boards

- Updated heater GPIO definitions to introduce a new naming convention for better clarity and consistency.
- Replaced `GPIO_HEATER_OUTPUT` with `GPIO_HEATER1_OUTPUT` and adjusted the corresponding output enable macros.
- Changed parameter names from `SENS_TEMP_ID` to `HEATER1_IMU_ID` in various board default configurations to reflect the new heater setup.
- Ensured all affected board configurations are updated to maintain functionality with the new heater definitions.

* heater: fix missing HEATER1_OUTPUT_EN control

* heater: fix more missing HEATER1_OUTPUT_EN control

* heater: tidy config, docs, and instance handling

- Remove unused controller period member and use CONTROLLER_PERIOD_DEFAULT
- Improve HEATER${i}_IMU_ID description and instance-related logging/behavior
- Add a guard when HEATER_NUM exceeds HEATER_MAX_INSTANCES

Note: drop intermediate/reverted change around the 'celsius' spelling.

* heater: refactor constructor to remove unused parameter and add instance name function

- Remove unused ModuleParams argument from Heater constructor
- Add heater_instance_name() helper to provide per-instance work queue task names
- Use instance-specific parameter lookup (HEATER{n}_*) during initialization

Use heater_instance_name() to label each instance (heater_1/2/3) in work queue.
Also drop unused ModuleParams argument from constructor and keep per-instance
parameter handle lookup in initialization.

* format

* board: update GPIO configuration for multiple heater instances, add HEATER_NUM for boards using PX4IO

* heater: update heater control to use HEATER1_OUTPUT_EN when using PX4IO for consistency

* heater: add a TODO for px4io multi-instance

* heater: update missing GPIO_HEATER1_OUTPUT in  sky-drones

* heater: fix multiple newlines at EOF (resolve CI check failure)

* heater: switch to PublicationMulti for heater_status and log multi-instance

- Changed _heater_status_pub from Publication to PublicationMulti to support independent per-instance publications without overwriting.
- Updated logged_topics.cpp to use add_optional_topic_multi("heater_status")

This fixes the issue where multiple heater instances were writing to the same heater_status topic, causing data overwriting and incorrect update rates in logs.

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-03-02 12:13:08 -09:00
Silvan
d1eff16ad7 Navigator: remove define for RAM_BASED_MISSIONS
Since we have SYS_DM_BACKEND, the user has to option on all boards
to store the mission on the RAM, thus thus define got obsolete.

Signed-off-by: Silvan <silvan@auterion.com>
2025-03-20 11:45:26 +01:00
BazookaJoe1900
4d83badba1
fix files tags on the header comments (#23564) 2024-09-19 09:25:18 +03:00
Matthias Grob
1bd65f8beb mantis-edu: remove duplicate RC define 2024-03-04 13:30:28 -05:00
Daniel Agar
2cb4ef0629
NuttX 10.3+ upgrade (#20190)
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Co-authored-by: David Sidrane <David.Sidrane@NscDg.com>
Co-authored-by: alexklimaj <alex@arkelectron.com>
2022-11-20 20:28:07 -05:00
Igor Mišić
4b503c310e Merge PR #19575 (changes to pr-extendend_hw_ver_rev_format)
- 4096 of 3 hex digits each for rev and ver is enough.
    #defines used in SPI versions do not be long format, use use the macro
 - Board provides a prefix and the formatting is sized and built in
 - No need for funky board_get_base_eeprom_mtd_manifest interface
    Original mft is used where the abstraction is done with the MFT interface

Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2022-07-05 09:29:26 +02:00
Igor Mišić
ec1614d156 boards: update id string from V5X{0-a}{0-a} to V5X{xxxx}{xxxx}
boards: new format for hwtypecmp string
boards: update manifest.c to follow the new hw_ver_rev format
2022-07-05 09:29:26 +02:00
Julian Oes
b3d830dd11 Mantis: move power off tune to commander
This way we don't allocate inside the interrupt context.
2022-01-10 23:04:10 -05:00
Julian Oes
f3a278dce5 Mantis: add comment about boot order.
The boot order is now:
1. The PX4 bootloader boots, and starts the camera.
2. The camera starts and sends the boot command to the PX4 bootloader.
3. PX4 starts.
2022-01-10 23:04:10 -05:00
Julian Oes
e4763f15f6 Mantis: add RC hacks
This changes the way RC is handled for the Mantis:
- The RC values are re-written when arriving over MAVLink. They are
  rescaled from 0..4095 to 1000..2000 and the channel bits added to
  separate channels. This makes the downstream handling easier.
- Gimbal pitch is moved from Aux1 to Aux2 as that should be the default.
- Aux3 and Aux4 are used for the photo and video trigger.
- The speed button is used as the FLTMODE channel and set to switch
  between POSCTL and ALTCTL.
2022-01-10 23:04:10 -05:00
Julian Oes
1754e25920 vmount: add param to use RC input for angular rate
Until now RC input was translated to angles only. I added the param
MNT_RC_IN_MODE which allows the RC input to be used for angular rate.
2022-01-10 23:04:10 -05:00
Julian Oes
cb15728536 Mantis: save mission in RAM
This is using a reduced number of mission items of 1000 instead of 2000
in order to fit in RAM.
2022-01-10 23:04:10 -05:00
Julian Oes
4a43155e69 Mantis: remove duplicate define 2022-01-10 23:04:10 -05:00
Julian Oes
7759ffb00e Mantis: reduce power button hold time
This is more intuitive and matches the tune.
Hopefully, it's still long enough to prevent any false positives.
2022-01-10 23:04:10 -05:00
Julian Oes
6960600c28 Mantis: play power off tune
To play a power off tune, I needed to convert the file to C++, so that I
could use the uORB::Publication.

The current implementation starts playing the power off sound but then
stops it as soon as the button is released.

The problem is mostly that we only get an interrupt when the button is
pressed or released but we don't seem to be able to poll it, at least
not in the current state.
2022-01-10 23:04:10 -05:00
Daniel Agar
daa925137c boards: move default battery calibration defines to parameter defaults 2022-01-10 09:49:36 -05:00
Daniel Agar
8185e2a384 boards: board_app_initialize() don't return early on failure
- depending on the situation we're more likely to get actionable user
feedback by allowing boot to complete rather than silently failing
2021-12-09 20:41:54 -05:00
Daniel Agar
bbfaa4694c
boards: cleanup serial RX DMA hrt_call_every
- remove ts_to_abstime dependency
2021-10-06 14:39:59 -04:00
Daniel Agar
2e02ad7c4e atl_mantis-edu front and rear status LEDS 2021-08-04 17:15:24 -04:00
Daniel Agar
6ab8153f32 drivers/tap_esc: Advanced Technology Labs (ATL) Mantis EDU ESC support
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-08-04 17:15:24 -04:00
Daniel Agar
e900f2ea54 boards: Advanced Technology Labs (ATL) Mantis EDU support and airfarme (SYS_AUTOSTART 4061)
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-08-04 17:15:24 -04:00