mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 14:33:34 +08:00
topic_listener: avoid code generation, use existing metadata at runtime
This reduces flash size for v5 by ~110KB, the topic listener now only adds about 1.2KB.
This commit is contained in:
@@ -1045,7 +1045,7 @@ GPS::print_status()
|
||||
PX4_INFO("rate publication:\t\t%6.2f Hz", (double)_rate);
|
||||
PX4_INFO("rate RTCM injection:\t%6.2f Hz", (double)_rate_rtcm_injection);
|
||||
|
||||
print_message(_report_gps_pos);
|
||||
print_message(ORB_ID(sensor_gps), _report_gps_pos);
|
||||
}
|
||||
|
||||
if (_instance == Instance::Main && _secondary_instance.load()) {
|
||||
|
||||
@@ -1508,7 +1508,7 @@ int PX4IO::print_status()
|
||||
uORB::SubscriptionData<px4io_status_s> status_sub{ORB_ID(px4io_status)};
|
||||
status_sub.update();
|
||||
|
||||
print_message(status_sub.get());
|
||||
print_message(ORB_ID(px4io_status), status_sub.get());
|
||||
|
||||
/* now clear alarms */
|
||||
io_reg_set(PX4IO_PAGE_STATUS, PX4IO_P_STATUS_ALARMS, 0x0000);
|
||||
|
||||
@@ -861,7 +861,7 @@ int RCInput::print_status()
|
||||
perf_print_counter(_publish_interval_perf);
|
||||
|
||||
if (hrt_elapsed_time(&_rc_in.timestamp) < 1_s) {
|
||||
print_message(_rc_in);
|
||||
print_message(ORB_ID(input_rc), _rc_in);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -72,7 +72,7 @@ int rpm_simulator_main(int argc, char *argv[])
|
||||
|
||||
// Publish data and let the user know what was published
|
||||
rpm_pub.publish(rpm);
|
||||
print_message(rpm);
|
||||
print_message(ORB_ID(rpm), rpm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
|
||||
|
||||
_battery_status_pub.publish(bat_status);
|
||||
print_message(bat_status);
|
||||
print_message(ORB_ID(battery_status), bat_status);
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user