add platformio file and fix compiling without IP

pull/65/head
Thomas Kunze 4 years ago
parent 16de2048e6
commit 5f4f86dcbd
  1. 7
      .vscode/extensions.json
  2. 27
      platformio.ini
  3. 2
      src/knx/knx_ip_device_information_dib.cpp
  4. 2
      src/knx/knx_ip_frame.cpp
  5. 3
      src/knx/knx_ip_search_response.cpp
  6. 2
      src/knx/knx_ip_supported_service_dib.cpp
  7. 2
      src/knx/knx_value.cpp

@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}

@ -0,0 +1,27 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = examples/knx-demo
[env]
platform = atmelsam
board = zeroUSB
framework = arduino
build_type = debug
monitor_speed = 115200
lib_ldf_mode = deep+
lib_extra_dirs =
${sysenv.USERPROFILE}/Documents/PlatformIO/Projects
build_flags =
-Wno-unknown-pragmas
[env:build]

@ -1,6 +1,7 @@
#include "knx_ip_device_information_dib.h"
#include "bits.h"
#ifdef USE_IP
KnxIpDeviceInformationDIB::KnxIpDeviceInformationDIB(uint8_t* data) : KnxIpDIB(data)
{}
@ -98,3 +99,4 @@ void KnxIpDeviceInformationDIB::friendlyName(const uint8_t* value)
{
pushByteArray(value, LEN_FRIENDLY_NAME, _data + 24);
}
#endif

@ -54,7 +54,6 @@ void KnxIpFrame::totalLength(uint16_t length)
{
pushWord(length, _data + 4);
}
#endif
uint8_t* KnxIpFrame::data()
{
@ -79,3 +78,4 @@ KnxIpFrame::KnxIpFrame(uint16_t length)
protocolVersion(KnxIp1_0);
totalLength(length);
}
#endif

@ -1,8 +1,6 @@
#include "knx_ip_search_response.h"
#ifdef USE_IP
#endif
#define SERVICE_FAMILIES 2
KnxIpSearchResponse::KnxIpSearchResponse(IpParameterObject& parameters, DeviceObject& deviceObject)
@ -61,3 +59,4 @@ KnxIpSupportedServiceDIB& KnxIpSearchResponse::supportedServices()
{
return _supportedServices;
}
#endif

@ -1,5 +1,6 @@
#include "knx_ip_supported_service_dib.h"
#ifdef USE_IP
KnxIpSupportedServiceDIB::KnxIpSupportedServiceDIB(uint8_t* data) : KnxIpDIB(data)
{}
@ -39,3 +40,4 @@ void KnxIpSupportedServiceDIB::serviceVersion(ServiceFamily family, uint8_t ver
}
}
}
#endif

@ -526,7 +526,7 @@ struct tm KNXValue::timeValue() const
return *timePtr;
}
}
struct tm tmp;
struct tm tmp = {0};
return tmp;
}

Loading…
Cancel
Save