mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-24 19:08:21 +08:00
Run() published heater_status at both GPIO edges, 200 Hz for a 100 Hz controller, and the default log profile recorded it at full rate. At 100 % duty the off phase ran with a zero delay, so the element was switched off and back on every period and heater_on read false for that instant. heater_current and supply_voltage were battery_status.current_a and voltage_v, already logged there, and nominal_multiplier read 0 unless HEATERn_NOM_V compensation was active. The off phase no longer publishes and is skipped at full duty; the status goes out once per controller cycle with heater_on meaning the element is driven this period. The two battery fields are removed (the voltage is still read for the V_nom compensation), nominal_multiplier is 1 when no scaling is applied, and heater_status is logged at 1 Hz by default. Assisted-by: Claude:claude-fable-5 Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
28 lines
713 B
Plaintext
28 lines
713 B
Plaintext
uint64 timestamp # time since system start (microseconds)
|
|
|
|
uint32 device_id
|
|
|
|
bool heater_on # element driven this control period (controller_time_on_usec > 0)
|
|
bool temperature_target_met
|
|
bool temperature_activation_threshold_met
|
|
|
|
float32 temperature_sensor
|
|
float32 temperature_target
|
|
|
|
uint32 controller_period_usec
|
|
uint32 controller_time_on_usec
|
|
|
|
float32 proportional_value
|
|
float32 integrator_value
|
|
float32 feed_forward_value
|
|
|
|
float32 nominal_multiplier # duty scaling from HEATERn_NOM_V: (V_nom/V)^2 above V_nom, 1 without compensation, 0 without battery data
|
|
|
|
uint8 MODE_GPIO = 1
|
|
uint8 MODE_PX4IO = 2
|
|
uint8 mode
|
|
|
|
uint8 TEMPERATURE_SOURCE_IMU = 0
|
|
uint8 TEMPERATURE_SOURCE_HYGRO = 1
|
|
uint8 temperature_source
|