From ac85394396b3757b39c81e6010b1d0b76442f74c Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 6 Dec 2022 20:45:35 +0100 Subject: [PATCH] update example for change in function signature --- control/examples/wrapper/Makefile | 2 +- control/examples/wrapper/main.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/control/examples/wrapper/Makefile b/control/examples/wrapper/Makefile index c10dccc..de26571 100644 --- a/control/examples/wrapper/Makefile +++ b/control/examples/wrapper/Makefile @@ -26,5 +26,5 @@ clean: @echo "Cleaning..." rm -f $(OBJECTS) $(OUT) *.bin gnuplotscript.gp -.cpp.o: +.c.o: $(COMPILE) -c $< -o $@ diff --git a/control/examples/wrapper/main.c b/control/examples/wrapper/main.c index f2bd7b6..46a0f68 100644 --- a/control/examples/wrapper/main.c +++ b/control/examples/wrapper/main.c @@ -1,7 +1,14 @@ #include "b15f/wrapper/b15f.h" +#include int main() { - b15f_t* instance = get_instance(); + char buf[512]; + b15f_t* instance = get_instance(buf, sizeof(buf)); + + if (instance == NULL) { + fprintf(stderr, "%s", buf); + return -1; + } return 0; } \ No newline at end of file