mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[telemetry] make sure to initialize callbacks with NULL
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
/* Implement global structures from generated header
|
||||
*/
|
||||
telemetry_msg telemetry_msgs[TELEMETRY_NB_MSG] = TELEMETRY_MSG_NAMES;
|
||||
telemetry_cb telemetry_cbs[TELEMETRY_NB_MSG];
|
||||
telemetry_cb telemetry_cbs[TELEMETRY_NB_MSG] = TELEMETRY_CBS_NULL;
|
||||
struct periodic_telemetry pprz_telemetry = { TELEMETRY_NB_MSG, telemetry_msgs, telemetry_cbs };
|
||||
|
||||
|
||||
|
||||
@@ -153,6 +153,9 @@ let print_message_table = fun out_h xml ->
|
||||
(* Structure initialization *)
|
||||
fprintf out_h "#define TELEMETRY_MSG_NAMES { \\\n";
|
||||
Hashtbl.iter (fun n _ -> fprintf out_h " \"%s\", \\\n" n) messages;
|
||||
fprintf out_h "};\n\n";
|
||||
fprintf out_h "#define TELEMETRY_CBS_NULL { \\\n";
|
||||
for i = 1 to (Hashtbl.length messages) do fprintf out_h " NULL, \\\n" done;
|
||||
fprintf out_h "};\n\n"
|
||||
|
||||
let print_process_send = fun out_h xml freq modules ->
|
||||
|
||||
Reference in New Issue
Block a user