mirror of
https://github.com/thelsing/knx.git
synced 2025-01-02 00:06:43 +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_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(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)
|
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_facade.h"
|
||||||
//#include "knx/bau57B0.h"
|
#if MEDIUM_TYPE == 5
|
||||||
|
#include "knx/bau57B0.h"
|
||||||
|
#elif MEDIUM_TYPE == 2
|
||||||
#include "knx/bau27B0.h"
|
#include "knx/bau27B0.h"
|
||||||
|
#else
|
||||||
|
#error Only MEDIUM_TYPE IP and RF supported
|
||||||
|
#endif
|
||||||
#include "knx/group_object_table_object.h"
|
#include "knx/group_object_table_object.h"
|
||||||
#include "knx/bits.h"
|
#include "knx/bits.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
//KnxFacade<LinuxPlatform, Bau57B0> knx;
|
#if MEDIUM_TYPE == 5
|
||||||
|
KnxFacade<LinuxPlatform, Bau57B0> knx;
|
||||||
|
#elif MEDIUM_TYPE == 2
|
||||||
KnxFacade<LinuxPlatform, Bau27B0> knx;
|
KnxFacade<LinuxPlatform, Bau27B0> knx;
|
||||||
|
#else
|
||||||
|
#error Only MEDIUM_TYPE IP and RF supported
|
||||||
|
#endif
|
||||||
|
|
||||||
long lastsend = 0;
|
long lastsend = 0;
|
||||||
|
|
||||||
@ -96,6 +106,6 @@ int main(int argc, char **argv)
|
|||||||
knx.loop();
|
knx.loop();
|
||||||
if(knx.configured())
|
if(knx.configured())
|
||||||
appLoop();
|
appLoop();
|
||||||
delayMicroseconds(1000);
|
delayMicroseconds(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user