33 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
Daniel Agar
15fece7e14 delete SYS_CTRL_ALLOC 2022-09-09 09:14:09 -04:00
Daniel Agar
5dd1e5a018 delete systemcmds/mixer 2022-09-09 09:14:09 -04:00
Daniel Agar
6d0339ba0c I2CSPIDriverBase: sensor start failure ERROR if internal, WARN if external 2021-12-28 11:05:35 -05:00
Daniel Agar
6d78054f50
mavlink USB auto start/stop on boards with VBUS
- no longer start sercon or mavlink usb by default
 - on USB connection (VBUS) monitor serial USB at low rate and start Mavlink if there's a HEARTBEAT or nshterm on 3 consecutive carriage returns
 - the mavlink USB instance is automatically stopped and serdis executed if USB is disconnected
 - skipping Mavlink USB (and sercon) saves a considerable amount of memory on older boards
2021-10-03 15:32:54 -04:00
Daniel Agar
9e0fa8e82b boards: set SENS_TEMP_ID defaults 2021-09-01 15:16:00 -04:00
Daniel Agar
c5b1fe86ca delete deprecated BAT_* parameters 2021-07-08 22:19:12 -04:00
David Sidrane
5b9201e5b4 cuav:Nora X7 Pro:Camera trigger is on 13/14 2021-06-11 15:13:23 +02:00
CUAV_gitfishup
c61c1a15ee
cuav/x7pro: fix syntax error in rc.board_sensors 2021-06-08 09:18:20 +02:00
honglang
5672af4299 CUAV X7pro and Nora: use icm42688p instead of bmi088 2021-06-02 09:11:37 -04:00
CUAVcaijie
ffe9f8a942
boards: CUAV Nora/X7Pro ICM20649 on SPI6 bus will be replaced by ICM20689 2021-05-18 18:49:25 -04:00
Daniel Agar
565c644b2e boards: CUAV keep Nora and X7pro in sync 2021-04-05 12:54:41 -04:00
Daniel Agar
631d1647d3 boards: minimize unnecessary differences in default variants 2021-03-28 14:46:47 -04:00
David Sidrane
644794d134 Revert "boards: CUAV x7pro disable SPI6 IMU until NuttX BDMA is fixed"
This reverts commit 0b4006ae863fa5b10c2893a0dc2fc4578725f094.
2021-03-23 05:52:27 -07:00
Daniel Agar
1429423876 gyro_fft: support sensor_gyro (non-fifo) 2021-03-18 10:04:04 +01:00
Lorenz Meier
33c5f4210a X7 disable FFT
This depends on the IMU driver supporting queue
2021-03-17 22:03:18 +01:00
Lorenz Meier
891b231215 Ensure that AUX mixer is loaded when 2nd bank is present 2021-03-17 22:03:18 +01:00
Daniel Agar
dd479f9cca
drivers/imu/analog_devices/adis16470: Analog Devices ADIS16470 IMU driver for CUAV x7pro 2021-03-16 18:00:06 -04:00
Daniel Agar
0b4006ae86 boards: CUAV x7pro disable SPI6 IMU until NuttX BDMA is fixed 2021-03-15 10:54:43 -04:00
Daniel Agar
f8eaa6e46b ROMFS handle bl_update generically
- include all available legacy bootloaders
2021-03-11 00:38:18 +01:00
Daniel Agar
4d288512b5 add board architecture specific init defaults 2021-03-09 19:59:41 +01:00
Daniel Agar
440e72e697 boards: cuav nora/x7pro don't have low speed external (LSE) oscillator 2021-03-09 10:49:57 -05:00
Daniel Agar
a257120e8d boards: use new param default mechanism 2021-02-12 08:27:47 -05:00
Daniel Agar
8a0bf15b9e boards: CUAV X7Pro fix BMI088 orientation 2021-02-11 23:05:48 -05:00
Daniel Agar
a2442ffb48 board: enable UAVCAN sensors by default on F7/H7 2021-02-02 09:01:12 +01:00
Daniel Agar
318c7e83b3 support up to PWM 14
- generate PWM_MAIN 1-14
 - generate PWM_AUX 1-8
 - generate PWM_EXTRA 1-8
 - px4io and pwm_out directly read configuration parameters
    - only available and active physical outputs are actually shown for configuration
 - overall saves flash despite adding many new parameters
2021-01-30 15:55:53 +01:00
Daniel Agar
763c3b8fda boards: start enabling multi-EKF by default on F7/H7 2021-01-10 17:56:34 +01:00
SalimTerryLi
c037dbef21
Rename and move src/drivers/adc to src/drivers/adc/board_adc 2020-09-07 23:09:20 -04:00
Daniel Agar
7569722821
iSentek IST8310 magnetometer rewrite
- simple state machine to reset, configure, etc
 - checked register mechanism (sensor will reset itself on configuration error)
 - configured in 16 bit mode (1320 LSB/Gauss instead of 330 LSB/Gauss)
 - adjusted orientation handling in driver to match datasheet as closely as possible
     - in many external compass units the rotation was wrong and very difficult to actual determine how to set correctly
2020-09-02 13:14:45 -04:00
CUAVcaijie
67554acf9e x7 add led_pwm driver 2020-06-11 12:02:49 -04:00
CUAVcaijie
37fb4dbb64 Enable safety button 2020-06-10 09:14:25 -04:00
Daniel Agar
6f6efd60b7 boards: centralize optional external I2C sensor start
- configured with new parameter SENS_EXT_I2C_PRB
2020-06-10 09:04:13 -04:00
Daniel Agar
d89b7804f7
boards: initial CUAV X7Pro support (not complete)
- this is booting and functional, but still missing a few things
 - still needs full PWM output, verification of all sensor rotations and IO, etc
2020-05-01 20:59:28 -04:00