Skip to content

Commit 8231f50

Browse files
author
jonas
committed
Merge branch 'pr-static-vision-target-estimator' of https://github.com/JonasPerolini/PX4-Autopilot into pr-static-vision-target-estimator
2 parents 8d2e490 + 2da76e4 commit 8231f50

File tree

10 files changed

+11
-18
lines changed

10 files changed

+11
-18
lines changed

.github/workflows/fuzzing.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
permissions:
77
contents: read
8+
issues: write # for JasonEtco/create-an-issue
89

910
env:
1011
RUNS_IN_DOCKER: true

boards/nxp/tropic-community/nuttx-config/scripts/itcm_functions_includes.ld

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* Auto-generated */
21
*(.text._ZN4uORB7Manager27orb_add_internal_subscriberE6ORB_IDhPj)
32
*(.text._ZN13MavlinkStream6updateERKy)
43
*(.text._ZN7Mavlink16update_rate_multEv)
@@ -394,7 +393,7 @@
394393
*(.text._ZN4EKF215PublishBaroBiasERKy)
395394
*(.text._ZN4EKF221UpdateGyroCalibrationERKy)
396395
*(.text._ZN6matrix9constrainIfLj3ELj1EEENS_6MatrixIT_XT0_EXT1_EEERKS3_S2_S2_)
397-
*(.text._ZN4uORB22SubscriptionMultiArrayI16battery_status_sLh4EE16advertised_countEv)
396+
*(.text._ZN4uORB22SubscriptionMultiArrayI16battery_status_sLh3EE16advertised_countEv)
398397
*(.text._ZN23MavlinkStreamScaledIMU34sendEv)
399398
*(.text.__aeabi_ldivmod)
400399
*(.text._ZN15PositionControl16setInputSetpointERK21trajectory_setpoint_s)

boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_functions_includes.ld

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* Auto-generated */
21
*(.text._ZN4uORB7Manager27orb_add_internal_subscriberE6ORB_IDhPj)
32
*(.text._ZN13MavlinkStream6updateERKy)
43
*(.text._ZN7Mavlink16update_rate_multEv)
@@ -402,7 +401,7 @@
402401
*(.text._ZN4EKF215PublishBaroBiasERKy)
403402
*(.text._ZN4EKF221UpdateGyroCalibrationERKy)
404403
*(.text._ZN6matrix9constrainIfLj3ELj1EEENS_6MatrixIT_XT0_EXT1_EEERKS3_S2_S2_)
405-
*(.text._ZN4uORB22SubscriptionMultiArrayI16battery_status_sLh4EE16advertised_countEv)
404+
*(.text._ZN4uORB22SubscriptionMultiArrayI16battery_status_sLh3EE16advertised_countEv)
406405
*(.text._ZN23MavlinkStreamScaledIMU34sendEv)
407406
*(.text.__aeabi_ldivmod)
408407
*(.text._ZN15PositionControl16setInputSetpointERK21trajectory_setpoint_s)

msg/versioned/BatteryStatus.msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Battery instance information is also logged and streamed in MAVLink telemetry.
66

77
uint32 MESSAGE_VERSION = 1
8-
uint8 MAX_INSTANCES = 4
8+
uint8 MAX_INSTANCES = 3
99

1010
uint64 timestamp # [us] Time since system start
1111

platforms/common/include/px4_platform_common/board_common.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@
173173
# define BOARD_BATT_V_LIST {ADC_BATTERY1_VOLTAGE_CHANNEL, ADC_BATTERY2_VOLTAGE_CHANNEL, ADC_BATTERY3_VOLTAGE_CHANNEL}
174174
# define BOARD_BATT_I_LIST {ADC_BATTERY1_CURRENT_CHANNEL, ADC_BATTERY2_CURRENT_CHANNEL, ADC_BATTERY3_CURRENT_CHANNEL}
175175
# define BOARD_BRICK_VALID_LIST {BOARD_ADC_BRICK1_VALID, BOARD_ADC_BRICK2_VALID, BOARD_ADC_BRICK3_VALID}
176-
#elif BOARD_NUMBER_BRICKS == 4
177-
# define BOARD_BATT_V_LIST {ADC_BATTERY1_VOLTAGE_CHANNEL, ADC_BATTERY2_VOLTAGE_CHANNEL, ADC_BATTERY3_VOLTAGE_CHANNEL, ADC_BATTERY4_VOLTAGE_CHANNEL}
178-
# define BOARD_BATT_I_LIST {ADC_BATTERY1_CURRENT_CHANNEL, ADC_BATTERY2_CURRENT_CHANNEL, ADC_BATTERY3_CURRENT_CHANNEL, ADC_BATTERY4_CURRENT_CHANNEL}
179-
# define BOARD_BRICK_VALID_LIST {BOARD_ADC_BRICK1_VALID, BOARD_ADC_BRICK2_VALID, BOARD_ADC_BRICK3_VALID, BOARD_ADC_BRICK4_VALID}
180176
#else
181177
# error Unsuported BOARD_NUMBER_BRICKS number.
182178
#endif

platforms/nuttx/NuttX/nuttx

src/drivers/uavcan/sensors/battery.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class UavcanBatteryBridge : public UavcanSensorBridgeBase, public ModuleParams
105105
hrt_abstime _last_timestamp;
106106

107107
// Separate battery info publication because UavcanSensorBridgeBase only supports publishing one topic
108-
uORB::PublicationMulti<battery_info_s> _battery_info_pub[battery_status_s::MAX_INSTANCES] {ORB_ID(battery_info), ORB_ID(battery_info), ORB_ID(battery_info), ORB_ID(battery_info)};
108+
uORB::PublicationMulti<battery_info_s> _battery_info_pub[battery_status_s::MAX_INSTANCES] {ORB_ID(battery_info), ORB_ID(battery_info), ORB_ID(battery_info)};
109109

110110
battery_info_s _battery_info[battery_status_s::MAX_INSTANCES] {};
111111
battery_status_s _battery_status[battery_status_s::MAX_INSTANCES] {};
@@ -115,15 +115,13 @@ class UavcanBatteryBridge : public UavcanSensorBridgeBase, public ModuleParams
115115
static constexpr int BATTERY_INDEX_1 = 1;
116116
static constexpr int BATTERY_INDEX_2 = 2;
117117
static constexpr int BATTERY_INDEX_3 = 3;
118-
static constexpr int BATTERY_INDEX_4 = 4;
119118
static constexpr int SAMPLE_INTERVAL_US = 500_ms; // Typical message rate for a CAN battery monitor should be 2-5Hz.
120119

121-
static_assert(battery_status_s::MAX_INSTANCES <= BATTERY_INDEX_4, "Battery array too big");
120+
static_assert(battery_status_s::MAX_INSTANCES <= BATTERY_INDEX_3, "Battery array too big");
122121

123122
Battery battery1 = {BATTERY_INDEX_1, this, SAMPLE_INTERVAL_US, battery_status_s::SOURCE_EXTERNAL};
124123
Battery battery2 = {BATTERY_INDEX_2, this, SAMPLE_INTERVAL_US, battery_status_s::SOURCE_EXTERNAL};
125124
Battery battery3 = {BATTERY_INDEX_3, this, SAMPLE_INTERVAL_US, battery_status_s::SOURCE_EXTERNAL};
126-
Battery battery4 = {BATTERY_INDEX_4, this, SAMPLE_INTERVAL_US, battery_status_s::SOURCE_EXTERNAL};
127125

128-
Battery *_battery[battery_status_s::MAX_INSTANCES] = { &battery1, &battery2, &battery3, &battery4 };
126+
Battery *_battery[battery_status_s::MAX_INSTANCES] = { &battery1, &battery2, &battery3};
129127
};

src/modules/commander/Commander.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ int Commander::custom_command(int argc, char *argv[])
468468
const float heading_accuracy = NAN;
469469

470470
bool ret = send_vehicle_command(vehicle_command_s::VEHICLE_CMD_EXTERNAL_ATTITUDE_ESTIMATE,
471-
0.f, 0.f, heading, 0.f, 0.f, 0.f, heading_accuracy);
471+
0.f, 0.f, heading, 0.f, 0.0, 0.0, heading_accuracy);
472472
return (ret ? 0 : 1);
473473

474474
} else {

src/modules/logger/logged_topics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void LoggedTopics::add_default_topics()
5151
add_topic("airspeed", 1000);
5252
add_optional_topic("airspeed_validated", 200);
5353
add_optional_topic("autotune_attitude_control_status", 100);
54-
add_topic_multi("battery_info", 5000, 2);
54+
add_topic_multi("battery_info", 5000, 3);
5555
add_optional_topic("camera_capture");
5656
add_optional_topic("camera_trigger");
5757
add_topic("cellular_status", 200);

src/modules/mavlink/streams/HIGH_LATENCY2.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ class MavlinkStreamHighLatency2 : public MavlinkStream
685685
hrt_abstime _last_update_time{0};
686686
float _update_rate_filtered{0};
687687

688-
PerBatteryData _batteries[battery_status_s::MAX_INSTANCES] {0, 1, 2, 3};
688+
PerBatteryData _batteries[battery_status_s::MAX_INSTANCES] {0, 1, 2};
689689
};
690690

691691
#endif // HIGH_LATENCY2_HPP

0 commit comments

Comments
 (0)