mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
knx-linux: use default MEDIUM_TYPE IP
This commit is contained in:
parent
eb87ec1fe9
commit
ddea3eab99
@ -78,4 +78,4 @@ include_directories(../src)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -Wno-switch -g -O0")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -Wno-switch -g -O0")
|
||||
set_property(TARGET knx-linux PROPERTY CXX_STANDARD 11)
|
||||
add_definitions(-DMEDIUM_TYPE=0)
|
||||
add_definitions(-DMEDIUM_TYPE=5)
|
||||
|
@ -1,14 +1,24 @@
|
||||
#include "knx_facade.h"
|
||||
//#include "knx/bau57B0.h"
|
||||
#if MEDIUM_TYPE == 5
|
||||
#include "knx/bau57B0.h"
|
||||
#elif MEDIUM_TYPE == 2
|
||||
#include "knx/bau27B0.h"
|
||||
#else
|
||||
#error Only MEDIUM_TYPE IP and RF supported
|
||||
#endif
|
||||
#include "knx/group_object_table_object.h"
|
||||
#include "knx/bits.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
//KnxFacade<LinuxPlatform, Bau57B0> knx;
|
||||
#if MEDIUM_TYPE == 5
|
||||
KnxFacade<LinuxPlatform, Bau57B0> knx;
|
||||
#elif MEDIUM_TYPE == 2
|
||||
KnxFacade<LinuxPlatform, Bau27B0> knx;
|
||||
#else
|
||||
#error Only MEDIUM_TYPE IP and RF supported
|
||||
#endif
|
||||
|
||||
long lastsend = 0;
|
||||
|
||||
@ -96,6 +106,6 @@ int main(int argc, char **argv)
|
||||
knx.loop();
|
||||
if(knx.configured())
|
||||
appLoop();
|
||||
delayMicroseconds(1000);
|
||||
delayMicroseconds(100);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user