Skip to content

Commit

Permalink
[fix] call pprzlog_init if needed (and avoid segfault)
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Jan 30, 2015
1 parent a4764de commit 71f61cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conf/firmwares/subsystems/shared/sdlog.makefile
@@ -1,6 +1,6 @@
# Hey Emacs, this is a -*- makefile -*-

sdlog_CFLAGS = -DDOWNLINK
sdlog_CFLAGS = -DDOWNLINK -DUSE_PPRZLOG
sdlog_srcs = subsystems/datalink/downlink.c subsystems/datalink/pprzlog_transport.c

ap.CFLAGS += $(sdlog_CFLAGS)
Expand Down
4 changes: 4 additions & 0 deletions sw/airborne/subsystems/datalink/downlink.c
Expand Up @@ -75,6 +75,10 @@ void downlink_init(void)
#endif
#endif

#if USE_PPRZLOG
pprzlog_transport_init();
#endif

#if SITL
ivy_transport_init();
#endif
Expand Down
3 changes: 3 additions & 0 deletions sw/airborne/subsystems/datalink/pprzlog_transport.h
Expand Up @@ -41,5 +41,8 @@ struct pprzlog_transport {

extern struct pprzlog_transport pprzlog_tp;

// Init function
extern void pprzlog_transport_init(void);

#endif

0 comments on commit 71f61cc

Please sign in to comment.