reduce diffs to master

This commit is contained in:
Thomas Kunze 2021-02-07 11:43:22 +01:00
parent fb5570a5ab
commit c7ff078b91
28 changed files with 42 additions and 78 deletions

View File

@ -46,10 +46,10 @@ KnxFacade<LinuxPlatform, Bau07B0> knx;
long lastsend = 0; long lastsend = 0;
#define GO_CURR knx.getGroupObject(1) #define CURR knx.getGroupObject(1)
#define GO_MAX knx.getGroupObject(2) #define MAX knx.getGroupObject(2)
#define GO_MIN knx.getGroupObject(3) #define MIN knx.getGroupObject(3)
#define GO_RESET knx.getGroupObject(4) #define RESET knx.getGroupObject(4)
void measureTemp() void measureTemp()
{ {
@ -65,22 +65,22 @@ void measureTemp()
// currentValue *= (670433.28 + 273); // currentValue *= (670433.28 + 273);
// currentValue -= 273; // currentValue -= 273;
println(currentValue); println(currentValue);
GO_CURR.value(currentValue); CURR.value(currentValue);
double max = GO_MAX.value(); double max = MAX.value();
if (currentValue > max) if (currentValue > max)
GO_MAX.value(currentValue); MAX.value(currentValue);
if (currentValue < (double)GO_MIN.value()) if (currentValue < (double)MIN.value())
GO_MIN.value(currentValue); MIN.value(currentValue);
} }
void resetCallback(GroupObject& go) void resetCallback(GroupObject& go)
{ {
if (go.value()) if (go.value())
{ {
GO_MAX.valueNoSend(-273.0); MAX.valueNoSend(-273.0);
GO_MIN.valueNoSend(670433.28); MIN.valueNoSend(670433.28);
} }
} }
@ -102,13 +102,13 @@ void setup()
if (knx.configured()) if (knx.configured())
{ {
GO_CURR.dataPointType(Dpt(9, 1)); CURR.dataPointType(Dpt(9, 1));
GO_MIN.dataPointType(Dpt(9, 1)); MIN.dataPointType(Dpt(9, 1));
GO_MIN.value(670433.28); MIN.value(670433.28);
GO_MAX.dataPointType(Dpt(9, 1)); MAX.dataPointType(Dpt(9, 1));
GO_MAX.valueNoSend(-273.0); MAX.valueNoSend(-273.0);
GO_RESET.dataPointType(Dpt(1, 15)); RESET.dataPointType(Dpt(1, 15));
GO_RESET.callback(resetCallback); RESET.callback(resetCallback);
printf("Timeout: %d\n", knx.paramWord(0)); printf("Timeout: %d\n", knx.paramWord(0));
printf("Zykl. senden: %d\n", knx.paramByte(2)); printf("Zykl. senden: %d\n", knx.paramByte(2));
printf("Min/Max senden: %d\n", knx.paramByte(3)); printf("Min/Max senden: %d\n", knx.paramByte(3));

View File

@ -1,10 +1,9 @@
#include "association_table_object.h" #include <cstring>
#include "association_table_object.h"
#include "bits.h" #include "bits.h"
#include "data_property.h" #include "data_property.h"
#include <cstring>
using namespace std; using namespace std;
AssociationTableObject::AssociationTableObject(Memory& memory) AssociationTableObject::AssociationTableObject(Memory& memory)

View File

@ -2,9 +2,7 @@
#if MASK_VERSION == 0x07B0 #if MASK_VERSION == 0x07B0
#include "bau07B0.h" #include "bau07B0.h"
#include "bits.h" #include "bits.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,7 +1,5 @@
#include "bau_systemB.h" #include "bau_systemB.h"
#include "bits.h" #include "bits.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,8 +1,6 @@
#include "cemi_frame.h" #include "cemi_frame.h"
#include "bits.h" #include "bits.h"
#include "string.h" #include "string.h"
#include <stdio.h> #include <stdio.h>
/* /*

View File

@ -1,17 +1,15 @@
#include "cemi_server.h"
#include "config.h" #include "config.h"
#ifdef USE_CEMI_SERVER
#include "cemi_server.h"
#include "cemi_frame.h" #include "cemi_frame.h"
#include "bau_systemB.h" #include "bau_systemB.h"
#include "usb_tunnel_interface.h" #include "usb_tunnel_interface.h"
#include "data_link_layer.h" #include "data_link_layer.h"
#include "string.h" #include "string.h"
#include "bits.h" #include "bits.h"
#include <stdio.h> #include <stdio.h>
#ifdef USE_CEMI_SERVER
CemiServer::CemiServer(BauSystemB& bau) CemiServer::CemiServer(BauSystemB& bau)
: _bau(bau), : _bau(bau),
_usbTunnelInterface(*this, _usbTunnelInterface(*this,

View File

@ -1,12 +1,10 @@
#include "cemi_server_object.h"
#include "config.h" #include "config.h"
#include "bits.h" #ifdef USE_CEMI_SERVER
#include "data_property.h"
#include <cstring> #include <cstring>
#include "cemi_server_object.h"
#ifdef USE_CEMI_SERVER #include "bits.h"
#include "data_property.h"
CemiServerObject::CemiServerObject() CemiServerObject::CemiServerObject()
{ {

View File

@ -1,5 +1,4 @@
#include "data_property.h" #include "data_property.h"
#include "bits.h" #include "bits.h"
#include <cstring> #include <cstring>

View File

@ -9,7 +9,6 @@
*/ */
#include "datapoint_types.h" #include "datapoint_types.h"
#include <stdint.h> #include <stdint.h>
// Sign for a negative DPT9 float value // Sign for a negative DPT9 float value

View File

@ -1,12 +1,10 @@
#include <cstring>
#include "device_object.h" #include "device_object.h"
#include "bits.h" #include "bits.h"
#include "data_property.h" #include "data_property.h"
#include "callback_property.h" #include "callback_property.h"
#include "config.h" #include "config.h"
#include <cstring>
#define LEN_KNX_SERIAL 6 #define LEN_KNX_SERIAL 6
DeviceObject::DeviceObject() DeviceObject::DeviceObject()

View File

@ -1,7 +1,5 @@
#include "dptconvert.h" #include "dptconvert.h"
#include "bits.h" #include "bits.h"
#include <cmath> #include <cmath>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>

View File

@ -1,5 +1,4 @@
#include "group_object.h" #include "group_object.h"
#include "bits.h" #include "bits.h"
#include "string.h" #include "string.h"
#include "datapoint_types.h" #include "datapoint_types.h"

View File

@ -1,11 +1,10 @@
#include "group_object_table_object.h" #include <cstring>
#include "group_object_table_object.h"
#include "group_object.h" #include "group_object.h"
#include "bits.h" #include "bits.h"
#include "data_property.h" #include "data_property.h"
#include <cstring>
GroupObjectTableObject::GroupObjectTableObject(Memory& memory) GroupObjectTableObject::GroupObjectTableObject(Memory& memory)
: TableObject(memory) : TableObject(memory)
{ {

View File

@ -1,9 +1,8 @@
#include "interface_object.h"
#include "data_property.h"
#include <cstring> #include <cstring>
#include "interface_object.h"
#include "data_property.h"
InterfaceObject::~InterfaceObject() InterfaceObject::~InterfaceObject()
{ {
if (_properties != nullptr) if (_properties != nullptr)

View File

@ -1,9 +1,6 @@
#include "ip_host_protocol_address_information.h" #include "ip_host_protocol_address_information.h"
#include "bits.h" #include "bits.h"
#ifdef USE_IP #ifdef USE_IP
IpHostProtocolAddressInformation::IpHostProtocolAddressInformation(uint8_t* data) IpHostProtocolAddressInformation::IpHostProtocolAddressInformation(uint8_t* data)
: _data(data) : _data(data)
{} {}

View File

@ -1,13 +1,11 @@
#include "ip_parameter_object.h" #include "ip_parameter_object.h"
#ifdef USE_IP
#include "device_object.h" #include "device_object.h"
#include "platform.h" #include "platform.h"
#include "bits.h" #include "bits.h"
#include "data_property.h" #include "data_property.h"
#include "callback_property.h" #include "callback_property.h"
#ifdef USE_IP
//224.0.23.12 //224.0.23.12
#define DEFAULT_MULTICAST_ADDR ((uint32_t)0xE000170C) #define DEFAULT_MULTICAST_ADDR ((uint32_t)0xE000170C)

View File

@ -1,5 +1,4 @@
#include "knx_ip_device_information_dib.h" #include "knx_ip_device_information_dib.h"
#include "bits.h" #include "bits.h"
#ifdef USE_IP #ifdef USE_IP

View File

@ -1,5 +1,4 @@
#include "knx_ip_dib.h" #include "knx_ip_dib.h"
#ifdef USE_IP #ifdef USE_IP
KnxIpDIB::KnxIpDIB(uint8_t* data) : _data(data) KnxIpDIB::KnxIpDIB(uint8_t* data) : _data(data)
{} {}

View File

@ -1,10 +1,9 @@
#include "knx_ip_frame.h" #include "knx_ip_frame.h"
#include "bits.h" #ifdef USE_IP
#include <cstring> #include <cstring>
#include "bits.h"
#ifdef USE_IP
#define KNXIP_HEADER_LEN 0x6 #define KNXIP_HEADER_LEN 0x6
#define KNXIP_PROTOCOL_VERSION 0x10 #define KNXIP_PROTOCOL_VERSION 0x10

View File

@ -1,5 +1,4 @@
#include "knx_ip_routing_indication.h" #include "knx_ip_routing_indication.h"
#include <cstring> #include <cstring>
#ifdef USE_IP #ifdef USE_IP

View File

@ -1,7 +1,5 @@
#include "knx_ip_search_request.h" #include "knx_ip_search_request.h"
#ifdef USE_IP #ifdef USE_IP
KnxIpSearchRequest::KnxIpSearchRequest(uint8_t* data, uint16_t length) KnxIpSearchRequest::KnxIpSearchRequest(uint8_t* data, uint16_t length)
: KnxIpFrame(data, length), _hpai(data + LEN_KNXIP_HEADER) : KnxIpFrame(data, length), _hpai(data + LEN_KNXIP_HEADER)
{ {

View File

@ -1,13 +1,13 @@
#include "npdu.h" #include "npdu.h"
#include "cemi_frame.h" #include "cemi_frame.h"
#include <string.h> #include <string.h>
NPDU::NPDU(uint8_t* data, CemiFrame& frame): _data(data), _frame(frame) NPDU::NPDU(uint8_t* data, CemiFrame& frame): _data(data), _frame(frame)
{ {
} }
uint8_t NPDU::octetCount() const uint8_t NPDU::octetCount() const
{ {
return _data[0]; return _data[0];

View File

@ -1,5 +1,4 @@
#include "property.h" #include "property.h"
#include "bits.h" #include "bits.h"
#include <cstring> #include <cstring>

View File

@ -5,7 +5,6 @@
#include <stdint.h> #include <stdint.h>
#include "data_link_layer.h" #include "data_link_layer.h"
#include "rf_physical_layer.h"
#define MAX_KNX_TELEGRAM_SIZE 263 #define MAX_KNX_TELEGRAM_SIZE 263

View File

@ -1,12 +1,11 @@
#include "table_object.h" #include <string.h>
#include "table_object.h"
#include "bits.h" #include "bits.h"
#include "memory.h" #include "memory.h"
#include "callback_property.h" #include "callback_property.h"
#include "data_property.h" #include "data_property.h"
#include <string.h>
TableObject::TableObject(Memory& memory) TableObject::TableObject(Memory& memory)
: _memory(memory) : _memory(memory)
{} {}

View File

@ -1,5 +1,4 @@
#include "tpdu.h" #include "tpdu.h"
#include "cemi_frame.h" #include "cemi_frame.h"
TPDU::TPDU(uint8_t* data, CemiFrame& frame): _data(data), _frame(frame) TPDU::TPDU(uint8_t* data, CemiFrame& frame): _data(data), _frame(frame)

View File

@ -1,12 +1,10 @@
#include "transport_layer.h" #include "transport_layer.h"
#include "apdu.h" #include "apdu.h"
#include "cemi_frame.h" #include "cemi_frame.h"
#include "network_layer.h" #include "network_layer.h"
#include "application_layer.h" #include "application_layer.h"
#include "platform.h" #include "platform.h"
#include "bits.h" #include "bits.h"
#include <stdio.h> #include <stdio.h>
TransportLayer::TransportLayer(ApplicationLayer& layer): _savedFrame(0), TransportLayer::TransportLayer(ApplicationLayer& layer): _savedFrame(0),

View File

@ -1,4 +1,5 @@
#include "config.h" #include "config.h"
#ifdef USE_USB
#include "bits.h" #include "bits.h"
#include "usb_tunnel_interface.h" #include "usb_tunnel_interface.h"
@ -8,7 +9,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifdef USE_USB #define MIN(a, b) ((a < b) ? (a) : (b))
#define MAX_EP_SIZE 64 #define MAX_EP_SIZE 64
#define HID_HEADER_SIZE 3 #define HID_HEADER_SIZE 3