瀏覽代碼

Merge branch 'automation' of https://github.com/acplt/open62541 into automation

Conflicts:
	examples/src/raspberrypi_io.c
FlorianPalm 10 年之前
父節點
當前提交
6008ed0f19
共有 3 個文件被更改,包括 7 次插入3 次删除
  1. 4 1
      examples/src/Makefile.am
  2. 2 2
      examples/src/raspberrypi_io.c
  3. 1 0
      examples/src/raspberrypi_io.h

+ 4 - 1
examples/src/Makefile.am

@@ -25,8 +25,11 @@ else
 bin_PROGRAMS += $(top_builddir)/bin/exampleServer $(top_builddir)/bin/exampleServerACPLT $(top_builddir)/bin/exampleServerMini
 
 __top_builddir__bin_exampleServer_CFLAGS = -I$(top_builddir)/src -I$(top_builddir)/include $(GLOBAL_AM_CFLAGS)
-__top_builddir__bin_exampleServer_SOURCES = opcuaServer.c networklayer.c
+__top_builddir__bin_exampleServer_SOURCES = opcuaServer.c networklayer.c raspberrypi_io.c
 __top_builddir__bin_exampleServer_LDADD= $(top_builddir)/lib/libopen62541.a $(GLOBAL_AM_LDADD)
+if RASPI
+__top_builddir__bin_exampleServer_LDFLAGS = -lwiringPi
+endif
 
 __top_builddir__bin_exampleServerACPLT_CFLAGS = -I$(top_builddir)/src -I$(top_builddir)/include $(GLOBAL_AM_CFLAGS)
 __top_builddir__bin_exampleServerACPLT_SOURCES = opcuaServerACPLT.c networklayer.c

+ 2 - 2
examples/src/raspberrypi_io.c

@@ -27,9 +27,9 @@ int readTemp(float *temp){
 
 	fgets(buf, 1000, ptr_file);
 
-	ptr_temp = strtok(buf, (char*)delimiter);
+	ptr_temp = strtok(buf, (char*) delimiter);
 
-	ptr_temp = strtok((void*)0, (char*)delimiter);
+	ptr_temp = strtok((void*)0, (char*) delimiter);
 
 	temperaturInmC = atol(ptr_temp);
 

+ 1 - 0
examples/src/raspberrypi_io.h

@@ -12,6 +12,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "string.h"
 int readTemp(float *temp);