forked from zarathustr/uORB-freertos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuORBHelper.cpp
3225 lines (3154 loc) · 111 KB
/
uORBHelper.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/****************************************************************************
*
* Copyright (c) 2017 AMOV Development Team. All rights reserved.
*
* Author: Jin Wu and Xiaoqi
*
* Website: http://www.amovauto.com/, https://github.com/zarathustr
* e-mail: [email protected]
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name AMOV nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#include <uORB/uORB.h>
#include <cstring>
#include <StartUP.h>
#include "uORBHelper.h"
#ifndef __SMALL_SYSTEM__
#include <uORB/topics/actuator_armed.h>
#include <uORB/topics/actuator_controls.h>
#include <uORB/topics/actuator_direct.h>
#include <uORB/topics/actuator_outputs.h>
#include <uORB/topics/adc_report.h>
#include <uORB/topics/airspeed.h>
#include <uORB/topics/att_pos_mocap.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/camera_trigger.h>
#include <uORB/topics/commander_state.h>
#include <uORB/topics/collision_report.h>
#include <uORB/topics/control_state.h>
#include <uORB/topics/cpuload.h>
#include <uORB/topics/debug_key_value.h>
#include <uORB/topics/differential_pressure.h>
#include <uORB/topics/distance_sensor.h>
#include <uORB/topics/ekf2_innovations.h>
#include <uORB/topics/ekf2_replay.h>
#include <uORB/topics/ekf2_timestamps.h>
#include <uORB/topics/esc_report.h>
#include <uORB/topics/esc_status.h>
#include <uORB/topics/estimator_status.h>
#include <uORB/topics/fence.h>
#include <uORB/topics/fence_vertex.h>
#include <uORB/topics/filtered_bottom_flow.h>
#include <uORB/topics/follow_target.h>
#include <uORB/topics/fw_pos_ctrl_status.h>
#include <uORB/topics/fw_virtual_attitude_setpoint.h>
#include <uORB/topics/fw_virtual_rates_setpoint.h>
#include <uORB/topics/geofence_result.h>
#include <uORB/topics/gps_dump.h>
#include <uORB/topics/gps_inject_data.h>
#include <uORB/topics/hil_sensor.h>
#include <uORB/topics/home_position.h>
#include <uORB/topics/input_rc.h>
#include <uORB/topics/led_control.h>
#include <uORB/topics/log_message.h>
#include <uORB/topics/manual_control_setpoint.h>
#include <uORB/topics/mavlink_log.h>
#include <uORB/topics/mc_att_ctrl_status.h>
#include <uORB/topics/mc_virtual_attitude_setpoint.h>
#include <uORB/topics/mc_virtual_rates_setpoint.h>
#include <uORB/topics/mission.h>
#include <uORB/topics/mission_result.h>
#include <uORB/topics/mount_orientation.h>
#include <uORB/topics/multirotor_motor_limits.h>
#include <uORB/topics/offboard_control_mode.h>
#include <uORB/topics/optical_flow.h>
#include <uORB/topics/output_pwm.h>
#include <uORB/topics/parameter_update.h>
#include <uORB/topics/position_setpoint.h>
#include <uORB/topics/position_setpoint_triplet.h>
#include <uORB/topics/pwm_input.h>
#include <uORB/topics/qshell_req.h>
#include <uORB/topics/rc_channels.h>
#include <uORB/topics/rc_parameter_map.h>
#include <uORB/topics/safety.h>
#include <uORB/topics/satellite_info.h>
#include <uORB/topics/sensor_accel.h>
#include <uORB/topics/sensor_baro.h>
#include <uORB/topics/sensor_combined.h>
#include <uORB/topics/sensor_correction.h>
#include <uORB/topics/sensor_gyro.h>
#include <uORB/topics/sensor_mag.h>
#include <uORB/topics/sensor_preflight.h>
#include <uORB/topics/servorail_status.h>
#include <uORB/topics/subsystem_info.h>
#include <uORB/topics/system_power.h>
#include <uORB/topics/task_stack_info.h>
#include <uORB/topics/tecs_status.h>
#include <uORB/topics/telemetry_status.h>
#include <uORB/topics/test_motor.h>
#include <uORB/topics/time_offset.h>
#include <uORB/topics/transponder_report.h>
#include <uORB/topics/uavcan_parameter_request.h>
#include <uORB/topics/uavcan_parameter_value.h>
#include <uORB/topics/ulog_stream.h>
#include <uORB/topics/ulog_stream_ack.h>
#include <uORB/topics/vehicle_attitude.h>
#include <uORB/topics/vehicle_attitude_setpoint.h>
#include <uORB/topics/vehicle_command_ack.h>
#include <uORB/topics/vehicle_command.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/vehicle_force_setpoint.h>
#include <uORB/topics/vehicle_global_position.h>
#include <uORB/topics/vehicle_global_velocity_setpoint.h>
#include <uORB/topics/vehicle_gps_position.h>
#include <uORB/topics/vehicle_land_detected.h>
#include <uORB/topics/vehicle_local_position.h>
#include <uORB/topics/vehicle_local_position_setpoint.h>
#include <uORB/topics/vehicle_rates_setpoint.h>
#include <uORB/topics/vehicle_roi.h>
#include <uORB/topics/vehicle_status.h>
#include <uORB/topics/vehicle_status_flags.h>
#include <uORB/topics/vtol_vehicle_status.h>
#include <uORB/topics/wind_estimate.h>
using actuator_controls_0_s = actuator_controls_s;
using actuator_controls_1_s = actuator_controls_s;
using actuator_controls_2_s = actuator_controls_s;
using actuator_controls_3_s = actuator_controls_s;
using actuator_controls_virtual_fw_s = actuator_controls_s;
using actuator_controls_virtual_mc_s = actuator_controls_s;
using offboard_mission_s = mission_s;
using onboard_mission_s = mission_s;
using vehicle_local_position_groundtruth_s = vehicle_local_position_s;
using vehicle_vision_position_s = vehicle_local_position_s;
using vehicle_global_position_groundtruth_s = vehicle_global_position_s;
using vehicle_attitude_groundtruth_s = vehicle_attitude_s;
using vehicle_vision_attitude_s = vehicle_attitude_s;
#pragma default_variable_attributes= @ ".ccmram"
actuator_armed_s ORB_actuator_armed_public;
actuator_controls_s ORB_actuator_controls_public;
actuator_direct_s ORB_actuator_direct_public;
actuator_outputs_s ORB_actuator_outputs_public;
adc_report_s ORB_adc_report_public;
airspeed_s ORB_airspeed_public;
att_pos_mocap_s ORB_att_pos_mocap_public;
battery_status_s ORB_battery_status_public;
camera_trigger_s ORB_camera_trigger_public;
commander_state_s ORB_commander_state_public;
collision_report_s ORB_collision_report_public;
control_state_s ORB_control_state_public[ORB_MULTI_MAX_INSTANCES];
cpuload_s ORB_cpuload_public;
debug_key_value_s ORB_debug_key_value_public;
differential_pressure_s ORB_differential_pressure_public;
distance_sensor_s ORB_distance_sensor_public[ORB_MULTI_MAX_INSTANCES];
ekf2_innovations_s ORB_ekf2_innovations_public;
ekf2_replay_s ORB_ekf2_replay_public;
ekf2_timestamps_s ORB_ekf2_timestamps_public;
esc_report_s ORB_esc_report_public;
esc_status_s ORB_esc_status_public;
estimator_status_s ORB_estimator_status_public[ORB_MULTI_MAX_INSTANCES];
fence_s ORB_fence_public;
fence_vertex_s ORB_fence_vertex_public;
filtered_bottom_flow_s ORB_filtered_bottom_flow_public;
follow_target_s ORB_follow_target_public;
fw_pos_ctrl_status_s ORB_fw_pos_ctrl_status_public;
fw_virtual_attitude_setpoint_s ORB_fw_virtual_attitude_setpoint_public;
fw_virtual_rates_setpoint_s ORB_fw_virtual_rates_setpoint_public;
geofence_result_s ORB_geofence_result_public;
gps_dump_s ORB_gps_dump_public;
gps_inject_data_s ORB_gps_inject_data_public;
hil_sensor_s ORB_hil_sensor_public;
home_position_s ORB_home_position_public;
input_rc_s ORB_input_rc_public;
led_control_s ORB_led_control_public;
log_message_s ORB_log_message_public;
manual_control_setpoint_s ORB_manual_control_setpoint_public;
mavlink_log_s ORB_mavlink_log_public;
mc_att_ctrl_status_s ORB_mc_att_ctrl_status_public;
mc_virtual_attitude_setpoint_s ORB_mc_virtual_attitude_setpoint_public;
mc_virtual_rates_setpoint_s ORB_mc_virtual_rates_setpoint_public;
mission_s ORB_mission_public;
mission_result_s ORB_mission_result_public;
mount_orientation_s ORB_mount_orientation_public;
multirotor_motor_limits_s ORB_multirotor_motor_limits_public;
offboard_control_mode_s ORB_offboard_control_mode_public;
optical_flow_s ORB_optical_flow_public;
output_pwm_s ORB_output_pwm_public;
parameter_update_s ORB_parameter_update_public;
position_setpoint_s ORB_position_setpoint_public;
position_setpoint_triplet_s ORB_position_setpoint_triplet_public;
pwm_input_s ORB_pwm_input_public;
qshell_req_s ORB_qshell_req_public;
rc_channels_s ORB_rc_channels_public;
rc_parameter_map_s ORB_rc_parameter_map_public;
safety_s ORB_safety_public;
satellite_info_s ORB_satellite_info_public;
sensor_accel_s ORB_sensor_accel_public[ORB_MULTI_MAX_INSTANCES];
sensor_baro_s ORB_sensor_baro_public[ORB_MULTI_MAX_INSTANCES];
sensor_combined_s ORB_sensor_combined_public[ORB_MULTI_MAX_INSTANCES];
sensor_correction_s ORB_sensor_correction_public;
sensor_gyro_s ORB_sensor_gyro_public[ORB_MULTI_MAX_INSTANCES];
sensor_mag_s ORB_sensor_mag_public[ORB_MULTI_MAX_INSTANCES];
sensor_preflight_s ORB_sensor_preflight_public;
servorail_status_s ORB_servorail_status_public;
subsystem_info_s ORB_subsystem_info_public;
system_power_s ORB_system_power_public;
task_stack_info_s ORB_task_stack_info_public;
tecs_status_s ORB_tecs_status_public;
telemetry_status_s ORB_telemetry_status_public[ORB_MULTI_MAX_INSTANCES];
test_motor_s ORB_test_motor_public;
time_offset_s ORB_time_offset_public;
transponder_report_s ORB_transponder_report_public;
uavcan_parameter_request_s ORB_uavcan_parameter_request_public;
uavcan_parameter_value_s ORB_uavcan_parameter_value_public;
ulog_stream_s ORB_ulog_stream_public;
ulog_stream_ack_s ORB_ulog_stream_ack_public;
vehicle_attitude_s ORB_vehicle_attitude_public[ORB_MULTI_MAX_INSTANCES];
vehicle_attitude_setpoint_s ORB_vehicle_attitude_setpoint_public;
vehicle_command_ack_s ORB_vehicle_command_ack_public;
vehicle_command_s ORB_vehicle_command_public;
vehicle_control_mode_s ORB_vehicle_control_mode_public;
vehicle_force_setpoint_s ORB_vehicle_force_setpoint_public;
vehicle_global_position_s ORB_vehicle_global_position_public[ORB_MULTI_MAX_INSTANCES];
vehicle_global_velocity_setpoint_s ORB_vehicle_global_velocity_setpoint_public;
vehicle_gps_position_s ORB_vehicle_gps_position_public[ORB_MULTI_MAX_INSTANCES];
vehicle_land_detected_s ORB_vehicle_land_detected_public;
vehicle_local_position_s ORB_vehicle_local_position_public[ORB_MULTI_MAX_INSTANCES];
vehicle_local_position_setpoint_s ORB_vehicle_local_position_setpoint_public;
vehicle_rates_setpoint_s ORB_vehicle_rates_setpoint_public;
vehicle_roi_s ORB_vehicle_roi_public;
vehicle_status_s ORB_vehicle_status_public;
vehicle_status_flags_s ORB_vehicle_status_flags_public;
vtol_vehicle_status_s ORB_vtol_vehicle_status_public;
wind_estimate_s ORB_wind_estimate_public;
actuator_controls_0_s ORB_actuator_controls_0_public;
actuator_controls_1_s ORB_actuator_controls_1_public;
actuator_controls_2_s ORB_actuator_controls_2_public;
actuator_controls_3_s ORB_actuator_controls_3_public;
actuator_controls_virtual_fw_s ORB_actuator_controls_virtual_fw_public;
actuator_controls_virtual_mc_s ORB_actuator_controls_virtual_mc_public;
offboard_mission_s ORB_offboard_mission_public;
onboard_mission_s ORB_onboard_mission_public;
vehicle_local_position_groundtruth_s ORB_vehicle_local_position_groundtruth_public;
vehicle_vision_position_s ORB_vehicle_vision_position_public;
vehicle_global_position_groundtruth_s ORB_vehicle_global_position_groundtruth_public;
vehicle_attitude_groundtruth_s ORB_vehicle_attitude_groundtruth_public;
vehicle_vision_attitude_s ORB_vehicle_vision_attitude_public;
#pragma default_variable_attributes =
void orb_helper_init(void)
{
std::memset(&ORB_actuator_armed_public, 0, sizeof(actuator_armed_s));
std::memset(&ORB_actuator_controls_public, 0, sizeof(actuator_controls_s));
std::memset(&ORB_actuator_direct_public, 0, sizeof(actuator_direct_s));
std::memset(&ORB_actuator_outputs_public, 0, sizeof(actuator_outputs_s));
std::memset(&ORB_adc_report_public, 0, sizeof(adc_report_s));
std::memset(&ORB_airspeed_public, 0, sizeof(airspeed_s));
std::memset(&ORB_att_pos_mocap_public, 0, sizeof(att_pos_mocap_s));
std::memset(&ORB_battery_status_public, 0, sizeof(battery_status_s));
std::memset(&ORB_camera_trigger_public, 0, sizeof(camera_trigger_s));
std::memset(&ORB_commander_state_public, 0, sizeof(commander_state_s));
std::memset(&ORB_collision_report_public, 0, sizeof(collision_report_s));
std::memset(&ORB_control_state_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(control_state_s));
std::memset(&ORB_cpuload_public, 0, sizeof(cpuload_s));
std::memset(&ORB_debug_key_value_public, 0, sizeof(debug_key_value_s));
std::memset(&ORB_differential_pressure_public, 0, sizeof(differential_pressure_s));
std::memset(&ORB_distance_sensor_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(distance_sensor_s));
std::memset(&ORB_ekf2_innovations_public, 0, sizeof(ekf2_innovations_s));
std::memset(&ORB_ekf2_replay_public, 0, sizeof(ekf2_replay_s));
std::memset(&ORB_ekf2_timestamps_public, 0, sizeof(ekf2_timestamps_s));
std::memset(&ORB_esc_report_public, 0, sizeof(esc_report_s));
std::memset(&ORB_esc_status_public, 0, sizeof(esc_status_s));
std::memset(&ORB_estimator_status_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(estimator_status_s));
std::memset(&ORB_fence_public, 0, sizeof(fence_s));
std::memset(&ORB_fence_vertex_public, 0, sizeof(fence_vertex_s));
std::memset(&ORB_filtered_bottom_flow_public, 0, sizeof(filtered_bottom_flow_s));
std::memset(&ORB_follow_target_public, 0, sizeof(follow_target_s));
std::memset(&ORB_fw_pos_ctrl_status_public, 0, sizeof(fw_pos_ctrl_status_s));
std::memset(&ORB_fw_virtual_attitude_setpoint_public, 0, sizeof(fw_virtual_attitude_setpoint_s));
std::memset(&ORB_fw_virtual_rates_setpoint_public, 0, sizeof(fw_virtual_rates_setpoint_s));
std::memset(&ORB_geofence_result_public, 0, sizeof(geofence_result_s));
std::memset(&ORB_gps_dump_public, 0, sizeof(gps_dump_s));
std::memset(&ORB_gps_inject_data_public, 0, sizeof(gps_inject_data_s));
std::memset(&ORB_hil_sensor_public, 0, sizeof(hil_sensor_s));
std::memset(&ORB_home_position_public, 0, sizeof(home_position_s));
std::memset(&ORB_input_rc_public, 0, sizeof(input_rc_s));
std::memset(&ORB_led_control_public, 0, sizeof(led_control_s));
std::memset(&ORB_log_message_public, 0, sizeof(log_message_s));
std::memset(&ORB_manual_control_setpoint_public, 0, sizeof(manual_control_setpoint_s));
std::memset(&ORB_mavlink_log_public, 0, sizeof(mavlink_log_s));
std::memset(&ORB_mc_att_ctrl_status_public, 0, sizeof(mc_att_ctrl_status_s));
std::memset(&ORB_mc_virtual_attitude_setpoint_public, 0, sizeof(mc_virtual_attitude_setpoint_s));
std::memset(&ORB_mc_virtual_rates_setpoint_public, 0, sizeof(mc_virtual_rates_setpoint_s));
std::memset(&ORB_mission_public, 0, sizeof(mission_s));
std::memset(&ORB_mission_result_public, 0, sizeof(mission_result_s));
std::memset(&ORB_mount_orientation_public, 0, sizeof(mount_orientation_s));
std::memset(&ORB_multirotor_motor_limits_public, 0, sizeof(multirotor_motor_limits_s));
std::memset(&ORB_offboard_control_mode_public, 0, sizeof(offboard_control_mode_s));
std::memset(&ORB_optical_flow_public, 0, sizeof(optical_flow_s));
std::memset(&ORB_output_pwm_public, 0, sizeof(output_pwm_s));
std::memset(&ORB_parameter_update_public, 0, sizeof(parameter_update_s));
std::memset(&ORB_position_setpoint_public, 0, sizeof(position_setpoint_s));
std::memset(&ORB_position_setpoint_triplet_public, 0, sizeof(position_setpoint_triplet_s));
std::memset(&ORB_pwm_input_public, 0, sizeof(pwm_input_s));
std::memset(&ORB_qshell_req_public, 0, sizeof(qshell_req_s));
std::memset(&ORB_rc_channels_public, 0, sizeof(rc_channels_s));
std::memset(&ORB_rc_parameter_map_public, 0, sizeof(rc_parameter_map_s));
std::memset(&ORB_safety_public, 0, sizeof(safety_s));
std::memset(&ORB_satellite_info_public, 0, sizeof(satellite_info_s));
std::memset(&ORB_sensor_accel_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_accel_s));
std::memset(&ORB_sensor_baro_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_baro_s));
std::memset(&ORB_sensor_combined_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_combined_s));
std::memset(&ORB_sensor_correction_public, 0, sizeof(sensor_correction_s));
std::memset(&ORB_sensor_gyro_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_gyro_s));
std::memset(&ORB_sensor_mag_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_mag_s));
std::memset(&ORB_sensor_preflight_public, 0, sizeof(sensor_preflight_s));
std::memset(&ORB_servorail_status_public, 0, sizeof(servorail_status_s));
std::memset(&ORB_subsystem_info_public, 0, sizeof(subsystem_info_s));
std::memset(&ORB_system_power_public, 0, sizeof(system_power_s));
std::memset(&ORB_task_stack_info_public, 0, sizeof(task_stack_info_s));
std::memset(&ORB_tecs_status_public, 0, sizeof(tecs_status_s));
std::memset(&ORB_telemetry_status_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(telemetry_status_s));
std::memset(&ORB_test_motor_public, 0, sizeof(test_motor_s));
std::memset(&ORB_time_offset_public, 0, sizeof(time_offset_s));
std::memset(&ORB_transponder_report_public, 0, sizeof(transponder_report_s));
std::memset(&ORB_uavcan_parameter_request_public, 0, sizeof(uavcan_parameter_request_s));
std::memset(&ORB_uavcan_parameter_value_public, 0, sizeof(uavcan_parameter_value_s));
std::memset(&ORB_ulog_stream_public, 0, sizeof(ulog_stream_s));
std::memset(&ORB_ulog_stream_ack_public, 0, sizeof(ulog_stream_ack_s));
std::memset(&ORB_vehicle_attitude_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(vehicle_attitude_s));
std::memset(&ORB_vehicle_attitude_setpoint_public, 0, sizeof(vehicle_attitude_setpoint_s));
std::memset(&ORB_vehicle_command_ack_public, 0, sizeof(vehicle_command_ack_s));
std::memset(&ORB_vehicle_command_public, 0, sizeof(vehicle_command_s));
std::memset(&ORB_vehicle_control_mode_public, 0, sizeof(vehicle_control_mode_s));
std::memset(&ORB_vehicle_force_setpoint_public, 0, sizeof(vehicle_force_setpoint_s));
std::memset(&ORB_vehicle_global_position_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(vehicle_global_position_s));
std::memset(&ORB_vehicle_global_velocity_setpoint_public, 0, sizeof(vehicle_global_velocity_setpoint_s));
std::memset(&ORB_vehicle_gps_position_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(vehicle_gps_position_s));
std::memset(&ORB_vehicle_land_detected_public, 0, sizeof(vehicle_land_detected_s));
std::memset(&ORB_vehicle_local_position_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(vehicle_local_position_s));
std::memset(&ORB_vehicle_local_position_setpoint_public, 0, sizeof(vehicle_local_position_setpoint_s));
std::memset(&ORB_vehicle_rates_setpoint_public, 0, sizeof(vehicle_rates_setpoint_s));
std::memset(&ORB_vehicle_roi_public, 0, sizeof(vehicle_roi_s));
std::memset(&ORB_vehicle_status_public, 0, sizeof(vehicle_status_s));
std::memset(&ORB_vehicle_status_flags_public, 0, sizeof(vehicle_status_flags_s));
std::memset(&ORB_vtol_vehicle_status_public, 0, sizeof(vtol_vehicle_status_s));
std::memset(&ORB_wind_estimate_public, 0, sizeof(wind_estimate_s));
std::memset(&ORB_actuator_controls_0_public, 0, sizeof(actuator_controls_0_s));
std::memset(&ORB_actuator_controls_1_public, 0, sizeof(actuator_controls_1_s));
std::memset(&ORB_actuator_controls_2_public, 0, sizeof(actuator_controls_2_s));
std::memset(&ORB_actuator_controls_3_public, 0, sizeof(actuator_controls_3_s));
std::memset(&ORB_actuator_controls_virtual_fw_public, 0, sizeof(actuator_controls_virtual_fw_s));
std::memset(&ORB_actuator_controls_virtual_mc_public, 0, sizeof(actuator_controls_virtual_mc_s));
std::memset(&ORB_offboard_mission_public, 0, sizeof(offboard_mission_s));
std::memset(&ORB_onboard_mission_public, 0, sizeof(onboard_mission_s));
std::memset(&ORB_vehicle_local_position_groundtruth_public, 0, sizeof(vehicle_local_position_groundtruth_s));
std::memset(&ORB_vehicle_vision_position_public, 0, sizeof(vehicle_vision_position_s));
std::memset(&ORB_vehicle_global_position_groundtruth_public, 0, sizeof(vehicle_global_position_groundtruth_s));
std::memset(&ORB_vehicle_attitude_groundtruth_public, 0, sizeof(vehicle_attitude_groundtruth_s));
std::memset(&ORB_vehicle_vision_attitude_public, 0, sizeof(vehicle_vision_attitude_s));
}
#else
#include <uORB/topics/actuator_armed.h>
#include <uORB/topics/airspeed.h>
#include <uORB/topics/att_pos_mocap.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/cpuload.h>
#include <uORB/topics/differential_pressure.h>
#include <uORB/topics/distance_sensor.h>
#include <uORB/topics/ekf2_innovations.h>
#include <uORB/topics/ekf2_replay.h>
#include <uORB/topics/ekf2_timestamps.h>
#include <uORB/topics/estimator_status.h>
#include <uORB/topics/filtered_bottom_flow.h>
#include <uORB/topics/gps_dump.h>
#include <uORB/topics/gps_inject_data.h>
#include <uORB/topics/hil_sensor.h>
#include <uORB/topics/home_position.h>
#include <uORB/topics/input_rc.h>
#include <uORB/topics/mavlink_log.h>
#include <uORB/topics/mount_orientation.h>
#include <uORB/topics/optical_flow.h>
#include <uORB/topics/parameter_update.h>
#include <uORB/topics/sensor_accel.h>
#include <uORB/topics/sensor_baro.h>
#include <uORB/topics/sensor_combined.h>
#include <uORB/topics/sensor_correction.h>
#include <uORB/topics/sensor_gyro.h>
#include <uORB/topics/sensor_mag.h>
#include <uORB/topics/sensor_preflight.h>
#include <uORB/topics/telemetry_status.h>
#include <uORB/topics/vehicle_attitude.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/vehicle_global_position.h>
#include <uORB/topics/vehicle_global_velocity_setpoint.h>
#include <uORB/topics/vehicle_gps_position.h>
#include <uORB/topics/vehicle_land_detected.h>
#include <uORB/topics/vehicle_local_position.h>
#include <uORB/topics/vehicle_local_position_setpoint.h>
#include <uORB/topics/vehicle_rates_setpoint.h>
#include <uORB/topics/vehicle_roi.h>
#include <uORB/topics/vehicle_status.h>
#include <uORB/topics/vehicle_status_flags.h>
#include <uORB/topics/wind_estimate.h>
using vehicle_local_position_groundtruth_s = vehicle_local_position_s;
using vehicle_vision_position_s = vehicle_local_position_s;
using vehicle_global_position_groundtruth_s = vehicle_global_position_s;
using vehicle_attitude_groundtruth_s = vehicle_attitude_s;
using vehicle_vision_attitude_s = vehicle_attitude_s;
#pragma default_variable_attributes= @ ".ccmram"
actuator_armed_s ORB_actuator_armed_public;
airspeed_s ORB_airspeed_public;
att_pos_mocap_s ORB_att_pos_mocap_public;
battery_status_s ORB_battery_status_public;
cpuload_s ORB_cpuload_public;
differential_pressure_s ORB_differential_pressure_public;
distance_sensor_s ORB_distance_sensor_public[ORB_MULTI_MAX_INSTANCES];
ekf2_innovations_s ORB_ekf2_innovations_public;
ekf2_replay_s ORB_ekf2_replay_public;
ekf2_timestamps_s ORB_ekf2_timestamps_public;
estimator_status_s ORB_estimator_status_public[ORB_MULTI_MAX_INSTANCES];
filtered_bottom_flow_s ORB_filtered_bottom_flow_public;
gps_dump_s ORB_gps_dump_public;
gps_inject_data_s ORB_gps_inject_data_public;
hil_sensor_s ORB_hil_sensor_public;
home_position_s ORB_home_position_public;
input_rc_s ORB_input_rc_public;
mavlink_log_s ORB_mavlink_log_public;
mount_orientation_s ORB_mount_orientation_public;
optical_flow_s ORB_optical_flow_public;
parameter_update_s ORB_parameter_update_public;
sensor_accel_s ORB_sensor_accel_public[ORB_MULTI_MAX_INSTANCES];
sensor_baro_s ORB_sensor_baro_public[ORB_MULTI_MAX_INSTANCES];
sensor_combined_s ORB_sensor_combined_public[ORB_MULTI_MAX_INSTANCES];
sensor_correction_s ORB_sensor_correction_public;
sensor_gyro_s ORB_sensor_gyro_public[ORB_MULTI_MAX_INSTANCES];
sensor_mag_s ORB_sensor_mag_public[ORB_MULTI_MAX_INSTANCES];
sensor_preflight_s ORB_sensor_preflight_public;
telemetry_status_s ORB_telemetry_status_public[ORB_MULTI_MAX_INSTANCES];
vehicle_attitude_s ORB_vehicle_attitude_public[ORB_MULTI_MAX_INSTANCES];
vehicle_control_mode_s ORB_vehicle_control_mode_public;
vehicle_global_position_s ORB_vehicle_global_position_public[ORB_MULTI_MAX_INSTANCES];
vehicle_global_velocity_setpoint_s ORB_vehicle_global_velocity_setpoint_public;
vehicle_gps_position_s ORB_vehicle_gps_position_public;
vehicle_land_detected_s ORB_vehicle_land_detected_public;
vehicle_local_position_s ORB_vehicle_local_position_public[ORB_MULTI_MAX_INSTANCES];
vehicle_local_position_setpoint_s ORB_vehicle_local_position_setpoint_public;
vehicle_rates_setpoint_s ORB_vehicle_rates_setpoint_public;
vehicle_roi_s ORB_vehicle_roi_public;
vehicle_status_s ORB_vehicle_status_public;
vehicle_status_flags_s ORB_vehicle_status_flags_public;
wind_estimate_s ORB_wind_estimate_public;
vehicle_local_position_groundtruth_s ORB_vehicle_local_position_groundtruth_public;
vehicle_vision_position_s ORB_vehicle_vision_position_public;
vehicle_global_position_groundtruth_s ORB_vehicle_global_position_groundtruth_public;
vehicle_attitude_groundtruth_s ORB_vehicle_attitude_groundtruth_public;
vehicle_vision_attitude_s ORB_vehicle_vision_attitude_public;
#pragma default_variable_attributes =
void orb_helper_init(void)
{
std::memset(&ORB_actuator_armed_public, 0, sizeof(actuator_armed_s));
std::memset(&ORB_airspeed_public, 0, sizeof(airspeed_s));
std::memset(&ORB_att_pos_mocap_public, 0, sizeof(att_pos_mocap_s));
std::memset(&ORB_battery_status_public, 0, sizeof(battery_status_s));
std::memset(&ORB_cpuload_public, 0, sizeof(cpuload_s));
std::memset(&ORB_differential_pressure_public, 0, sizeof(differential_pressure_s));
std::memset(&ORB_distance_sensor_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(distance_sensor_s));
std::memset(&ORB_ekf2_innovations_public, 0, sizeof(ekf2_innovations_s));
std::memset(&ORB_ekf2_replay_public, 0, sizeof(ekf2_replay_s));
std::memset(&ORB_ekf2_timestamps_public, 0, sizeof(ekf2_timestamps_s));
std::memset(&ORB_estimator_status_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(estimator_status_s));
std::memset(&ORB_filtered_bottom_flow_public, 0, sizeof(filtered_bottom_flow_s));
std::memset(&ORB_gps_dump_public, 0, sizeof(gps_dump_s));
std::memset(&ORB_gps_inject_data_public, 0, sizeof(gps_inject_data_s));
std::memset(&ORB_hil_sensor_public, 0, sizeof(hil_sensor_s));
std::memset(&ORB_home_position_public, 0, sizeof(home_position_s));
std::memset(&ORB_input_rc_public, 0, sizeof(input_rc_s));
std::memset(&ORB_mavlink_log_public, 0, sizeof(mavlink_log_s));
std::memset(&ORB_mount_orientation_public, 0, sizeof(mount_orientation_s));
std::memset(&ORB_optical_flow_public, 0, sizeof(optical_flow_s));
std::memset(&ORB_parameter_update_public, 0, sizeof(parameter_update_s));
std::memset(&ORB_sensor_accel_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_accel_s));
std::memset(&ORB_sensor_baro_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_baro_s));
std::memset(&ORB_sensor_combined_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_combined_s));
std::memset(&ORB_sensor_correction_public, 0, sizeof(sensor_correction_s));
std::memset(&ORB_sensor_gyro_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_gyro_s));
std::memset(&ORB_sensor_mag_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(sensor_mag_s));
std::memset(&ORB_sensor_preflight_public, 0, sizeof(sensor_preflight_s));
std::memset(&ORB_telemetry_status_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(telemetry_status_s));
std::memset(&ORB_vehicle_attitude_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(vehicle_attitude_s));
std::memset(&ORB_vehicle_control_mode_public, 0, sizeof(vehicle_control_mode_s));
std::memset(&ORB_vehicle_global_position_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(vehicle_global_position_s));
std::memset(&ORB_vehicle_global_velocity_setpoint_public, 0, sizeof(vehicle_global_velocity_setpoint_s));
std::memset(&ORB_vehicle_gps_position_public, 0, sizeof(vehicle_gps_position_s));
std::memset(&ORB_vehicle_land_detected_public, 0, sizeof(vehicle_land_detected_s));
std::memset(&ORB_vehicle_local_position_public, 0, ORB_MULTI_MAX_INSTANCES * sizeof(vehicle_local_position_s));
std::memset(&ORB_vehicle_local_position_setpoint_public, 0, sizeof(vehicle_local_position_setpoint_s));
std::memset(&ORB_vehicle_rates_setpoint_public, 0, sizeof(vehicle_rates_setpoint_s));
std::memset(&ORB_vehicle_roi_public, 0, sizeof(vehicle_roi_s));
std::memset(&ORB_vehicle_status_public, 0, sizeof(vehicle_status_s));
std::memset(&ORB_vehicle_status_flags_public, 0, sizeof(vehicle_status_flags_s));
std::memset(&ORB_wind_estimate_public, 0, sizeof(wind_estimate_s));
std::memset(&ORB_vehicle_local_position_groundtruth_public, 0, sizeof(vehicle_local_position_groundtruth_s));
std::memset(&ORB_vehicle_vision_position_public, 0, sizeof(vehicle_vision_position_s));
std::memset(&ORB_vehicle_global_position_groundtruth_public, 0, sizeof(vehicle_global_position_groundtruth_s));
std::memset(&ORB_vehicle_attitude_groundtruth_public, 0, sizeof(vehicle_attitude_groundtruth_s));
std::memset(&ORB_vehicle_vision_attitude_public, 0, sizeof(vehicle_vision_attitude_s));
}
#endif
void orb_set_in_os(void)
{
orb_in_os=true;
}
bool is_orb_multi(const int serial)
{
for(int i=0;i<MULTI_ORB_NUM;++i)
{
if(serial == (int) orb_multi_list[i])
return true;
}
return false;
}
int get_priority(const int instance)
{
if(instance == 0)
{
return ORB_PRIO_MIN;
}
else if(instance == 1)
{
return ORB_PRIO_VERY_LOW;
}
else if(instance == 2)
{
return ORB_PRIO_LOW;
}
else if(instance == 3)
{
return ORB_PRIO_DEFAULT;
}
else if(instance == 4)
{
return ORB_PRIO_HIGH;
}
else if(instance == 5)
{
return ORB_PRIO_VERY_HIGH;
}
else if(instance == 6)
{
return ORB_PRIO_MAX;
}
else
return -1;
}
int get_orb_instance_according_to_priority(const int priority)
{
if(ORB_PRIO_MIN == priority)
{
return 0;
}
else if(ORB_PRIO_VERY_LOW == priority)
{
return 1;
}
else if(ORB_PRIO_LOW == priority)
{
return 2;
}
else if(ORB_PRIO_DEFAULT == priority)
{
return 3;
}
else if(ORB_PRIO_HIGH == priority)
{
return 4;
}
else if(ORB_PRIO_VERY_HIGH == priority)
{
return 5;
}
else if(ORB_PRIO_MAX == priority)
{
return 6;
}
else
return -1;
}
#ifndef __SMALL_SYSTEM__
void get_orb_name(const int serial, char * name)
{
if (serial == ORB_actuator_armed)
{
std::strcpy(name, (ORB_ID(actuator_armed))->o_name);
}
else if (serial == ORB_actuator_controls)
{
std::strcpy(name, (ORB_ID(actuator_controls))->o_name);
}
else if (serial == ORB_actuator_direct)
{
std::strcpy(name, (ORB_ID(actuator_direct))->o_name);
}
else if (serial == ORB_actuator_outputs)
{
std::strcpy(name, (ORB_ID(actuator_outputs))->o_name);
}
else if (serial == ORB_adc_report)
{
std::strcpy(name, (ORB_ID(adc_report))->o_name);
}
else if (serial == ORB_airspeed)
{
std::strcpy(name, (ORB_ID(airspeed))->o_name);
}
else if (serial == ORB_att_pos_mocap)
{
std::strcpy(name, (ORB_ID(att_pos_mocap))->o_name);
}
else if (serial == ORB_battery_status)
{
std::strcpy(name, (ORB_ID(battery_status))->o_name);
}
else if (serial == ORB_camera_trigger)
{
std::strcpy(name, (ORB_ID(camera_trigger))->o_name);
}
else if (serial == ORB_commander_state)
{
std::strcpy(name, (ORB_ID(commander_state))->o_name);
}
else if (serial == ORB_collision_report)
{
std::strcpy(name, (ORB_ID(collision_report))->o_name);
}
else if (serial == ORB_control_state)
{
std::strcpy(name, (ORB_ID(control_state))->o_name);
}
else if (serial == ORB_cpuload)
{
std::strcpy(name, (ORB_ID(cpuload))->o_name);
}
else if (serial == ORB_debug_key_value)
{
std::strcpy(name, (ORB_ID(debug_key_value))->o_name);
}
else if (serial == ORB_differential_pressure)
{
std::strcpy(name, (ORB_ID(differential_pressure))->o_name);
}
else if (serial == ORB_distance_sensor)
{
std::strcpy(name, (ORB_ID(distance_sensor))->o_name);
}
else if (serial == ORB_ekf2_innovations)
{
std::strcpy(name, (ORB_ID(ekf2_innovations))->o_name);
}
else if (serial == ORB_ekf2_replay)
{
std::strcpy(name, (ORB_ID(ekf2_replay))->o_name);
}
else if (serial == ORB_ekf2_timestamps)
{
std::strcpy(name, (ORB_ID(ekf2_timestamps))->o_name);
}
else if (serial == ORB_esc_report)
{
std::strcpy(name, (ORB_ID(esc_report))->o_name);
}
else if (serial == ORB_esc_status)
{
std::strcpy(name, (ORB_ID(esc_status))->o_name);
}
else if (serial == ORB_estimator_status)
{
std::strcpy(name, (ORB_ID(estimator_status))->o_name);
}
else if (serial == ORB_fence)
{
std::strcpy(name, (ORB_ID(fence))->o_name);
}
else if (serial == ORB_fence_vertex)
{
std::strcpy(name, (ORB_ID(fence_vertex))->o_name);
}
else if (serial == ORB_filtered_bottom_flow)
{
std::strcpy(name, (ORB_ID(filtered_bottom_flow))->o_name);
}
else if (serial == ORB_follow_target)
{
std::strcpy(name, (ORB_ID(follow_target))->o_name);
}
else if (serial == ORB_fw_pos_ctrl_status)
{
std::strcpy(name, (ORB_ID(fw_pos_ctrl_status))->o_name);
}
else if (serial == ORB_fw_virtual_attitude_setpoint)
{
std::strcpy(name, (ORB_ID(fw_virtual_attitude_setpoint))->o_name);
}
else if (serial == ORB_fw_virtual_rates_setpoint)
{
std::strcpy(name, (ORB_ID(fw_virtual_rates_setpoint))->o_name);
}
else if (serial == ORB_geofence_result)
{
std::strcpy(name, (ORB_ID(geofence_result))->o_name);
}
else if (serial == ORB_gps_dump)
{
std::strcpy(name, (ORB_ID(gps_dump))->o_name);
}
else if (serial == ORB_gps_inject_data)
{
std::strcpy(name, (ORB_ID(gps_inject_data))->o_name);
}
else if (serial == ORB_hil_sensor)
{
std::strcpy(name, (ORB_ID(hil_sensor))->o_name);
}
else if (serial == ORB_home_position)
{
std::strcpy(name, (ORB_ID(home_position))->o_name);
}
else if (serial == ORB_input_rc)
{
std::strcpy(name, (ORB_ID(input_rc))->o_name);
}
else if (serial == ORB_led_control)
{
std::strcpy(name, (ORB_ID(led_control))->o_name);
}
else if (serial == ORB_log_message)
{
std::strcpy(name, (ORB_ID(log_message))->o_name);
}
else if (serial == ORB_manual_control_setpoint)
{
std::strcpy(name, (ORB_ID(manual_control_setpoint))->o_name);
}
else if (serial == ORB_mavlink_log)
{
std::strcpy(name, (ORB_ID(mavlink_log))->o_name);
}
else if (serial == ORB_mc_att_ctrl_status)
{
std::strcpy(name, (ORB_ID(mc_att_ctrl_status))->o_name);
}
else if (serial == ORB_mc_virtual_attitude_setpoint)
{
std::strcpy(name, (ORB_ID(mc_virtual_attitude_setpoint))->o_name);
}
else if (serial == ORB_mc_virtual_rates_setpoint)
{
std::strcpy(name, (ORB_ID(mc_virtual_rates_setpoint))->o_name);
}
else if (serial == ORB_mission)
{
std::strcpy(name, (ORB_ID(mission))->o_name);
}
else if (serial == ORB_mission_result)
{
std::strcpy(name, (ORB_ID(mission_result))->o_name);
}
else if (serial == ORB_mount_orientation)
{
std::strcpy(name, (ORB_ID(mount_orientation))->o_name);
}
else if (serial == ORB_multirotor_motor_limits)
{
std::strcpy(name, (ORB_ID(multirotor_motor_limits))->o_name);
}
else if (serial == ORB_offboard_control_mode)
{
std::strcpy(name, (ORB_ID(offboard_control_mode))->o_name);
}
else if (serial == ORB_optical_flow)
{
std::strcpy(name, (ORB_ID(optical_flow))->o_name);
}
else if (serial == ORB_output_pwm)
{
std::strcpy(name, (ORB_ID(output_pwm))->o_name);
}
else if (serial == ORB_parameter_update)
{
std::strcpy(name, (ORB_ID(parameter_update))->o_name);
}
else if (serial == ORB_position_setpoint)
{
std::strcpy(name, (ORB_ID(position_setpoint))->o_name);
}
else if (serial == ORB_position_setpoint_triplet)
{
std::strcpy(name, (ORB_ID(position_setpoint_triplet))->o_name);
}
else if (serial == ORB_pwm_input)
{
std::strcpy(name, (ORB_ID(pwm_input))->o_name);
}
else if (serial == ORB_qshell_req)
{
std::strcpy(name, (ORB_ID(qshell_req))->o_name);
}
else if (serial == ORB_rc_channels)
{
std::strcpy(name, (ORB_ID(rc_channels))->o_name);
}
else if (serial == ORB_rc_parameter_map)
{
std::strcpy(name, (ORB_ID(rc_parameter_map))->o_name);
}
else if (serial == ORB_safety)
{
std::strcpy(name, (ORB_ID(safety))->o_name);
}
else if (serial == ORB_satellite_info)
{
std::strcpy(name, (ORB_ID(satellite_info))->o_name);
}
else if (serial == ORB_sensor_accel)
{
std::strcpy(name, (ORB_ID(sensor_accel))->o_name);
}
else if (serial == ORB_sensor_baro)
{
std::strcpy(name, (ORB_ID(sensor_baro))->o_name);
}
else if (serial == ORB_sensor_combined)
{
std::strcpy(name, (ORB_ID(sensor_combined))->o_name);
}
else if (serial == ORB_sensor_correction)
{
std::strcpy(name, (ORB_ID(sensor_correction))->o_name);
}
else if (serial == ORB_sensor_gyro)
{
std::strcpy(name, (ORB_ID(sensor_gyro))->o_name);
}
else if (serial == ORB_sensor_mag)
{
std::strcpy(name, (ORB_ID(sensor_mag))->o_name);
}
else if (serial == ORB_sensor_preflight)
{
std::strcpy(name, (ORB_ID(sensor_preflight))->o_name);
}
else if (serial == ORB_servorail_status)
{
std::strcpy(name, (ORB_ID(servorail_status))->o_name);
}
else if (serial == ORB_subsystem_info)
{
std::strcpy(name, (ORB_ID(subsystem_info))->o_name);
}
else if (serial == ORB_system_power)
{
std::strcpy(name, (ORB_ID(system_power))->o_name);
}
else if (serial == ORB_task_stack_info)
{
std::strcpy(name, (ORB_ID(task_stack_info))->o_name);
}
else if (serial == ORB_tecs_status)
{
std::strcpy(name, (ORB_ID(tecs_status))->o_name);
}
else if (serial == ORB_telemetry_status)
{
std::strcpy(name, (ORB_ID(telemetry_status))->o_name);
}
else if (serial == ORB_test_motor)
{
std::strcpy(name, (ORB_ID(test_motor))->o_name);
}
else if (serial == ORB_time_offset)
{
std::strcpy(name, (ORB_ID(time_offset))->o_name);
}
else if (serial == ORB_transponder_report)
{
std::strcpy(name, (ORB_ID(transponder_report))->o_name);
}
else if (serial == ORB_uavcan_parameter_request)
{
std::strcpy(name, (ORB_ID(uavcan_parameter_request))->o_name);
}
else if (serial == ORB_uavcan_parameter_value)
{
std::strcpy(name, (ORB_ID(uavcan_parameter_value))->o_name);
}
else if (serial == ORB_ulog_stream)
{
std::strcpy(name, (ORB_ID(ulog_stream))->o_name);
}
else if (serial == ORB_ulog_stream_ack)
{
std::strcpy(name, (ORB_ID(ulog_stream_ack))->o_name);
}
else if (serial == ORB_vehicle_attitude)
{
std::strcpy(name, (ORB_ID(vehicle_attitude))->o_name);
}
else if (serial == ORB_vehicle_attitude_setpoint)
{
std::strcpy(name, (ORB_ID(vehicle_attitude_setpoint))->o_name);
}
else if (serial == ORB_vehicle_command_ack)
{
std::strcpy(name, (ORB_ID(vehicle_command_ack))->o_name);
}
else if (serial == ORB_vehicle_command)
{
std::strcpy(name, (ORB_ID(vehicle_command))->o_name);
}
else if (serial == ORB_vehicle_control_mode)
{
std::strcpy(name, (ORB_ID(vehicle_control_mode))->o_name);
}
else if (serial == ORB_vehicle_force_setpoint)
{
std::strcpy(name, (ORB_ID(vehicle_force_setpoint))->o_name);
}
else if (serial == ORB_vehicle_global_position)
{
std::strcpy(name, (ORB_ID(vehicle_global_position))->o_name);
}
else if (serial == ORB_vehicle_global_velocity_setpoint)
{
std::strcpy(name, (ORB_ID(vehicle_global_velocity_setpoint))->o_name);
}
else if (serial == ORB_vehicle_gps_position)
{
std::strcpy(name, (ORB_ID(vehicle_gps_position))->o_name);
}
else if (serial == ORB_vehicle_land_detected)
{