mirror of
https://github.com/thelsing/knx.git
synced 2025-08-13 13:46:20 +02:00
reduce diffs to master
This commit is contained in:
parent
fb5570a5ab
commit
c7ff078b91
@ -46,10 +46,10 @@ KnxFacade<LinuxPlatform, Bau07B0> knx;
|
||||
|
||||
long lastsend = 0;
|
||||
|
||||
#define GO_CURR knx.getGroupObject(1)
|
||||
#define GO_MAX knx.getGroupObject(2)
|
||||
#define GO_MIN knx.getGroupObject(3)
|
||||
#define GO_RESET knx.getGroupObject(4)
|
||||
#define CURR knx.getGroupObject(1)
|
||||
#define MAX knx.getGroupObject(2)
|
||||
#define MIN knx.getGroupObject(3)
|
||||
#define RESET knx.getGroupObject(4)
|
||||
|
||||
void measureTemp()
|
||||
{
|
||||
@ -65,22 +65,22 @@ void measureTemp()
|
||||
// currentValue *= (670433.28 + 273);
|
||||
// currentValue -= 273;
|
||||
println(currentValue);
|
||||
GO_CURR.value(currentValue);
|
||||
CURR.value(currentValue);
|
||||
|
||||
double max = GO_MAX.value();
|
||||
double max = MAX.value();
|
||||
if (currentValue > max)
|
||||
GO_MAX.value(currentValue);
|
||||
MAX.value(currentValue);
|
||||
|
||||
if (currentValue < (double)GO_MIN.value())
|
||||
GO_MIN.value(currentValue);
|
||||
if (currentValue < (double)MIN.value())
|
||||
MIN.value(currentValue);
|
||||
}
|
||||
|
||||
void resetCallback(GroupObject& go)
|
||||
{
|
||||
if (go.value())
|
||||
{
|
||||
GO_MAX.valueNoSend(-273.0);
|
||||
GO_MIN.valueNoSend(670433.28);
|
||||
MAX.valueNoSend(-273.0);
|
||||
MIN.valueNoSend(670433.28);
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,13 +102,13 @@ void setup()
|
||||
|
||||
if (knx.configured())
|
||||
{
|
||||
GO_CURR.dataPointType(Dpt(9, 1));
|
||||
GO_MIN.dataPointType(Dpt(9, 1));
|
||||
GO_MIN.value(670433.28);
|
||||
GO_MAX.dataPointType(Dpt(9, 1));
|
||||
GO_MAX.valueNoSend(-273.0);
|
||||
GO_RESET.dataPointType(Dpt(1, 15));
|
||||
GO_RESET.callback(resetCallback);
|
||||
CURR.dataPointType(Dpt(9, 1));
|
||||
MIN.dataPointType(Dpt(9, 1));
|
||||
MIN.value(670433.28);
|
||||
MAX.dataPointType(Dpt(9, 1));
|
||||
MAX.valueNoSend(-273.0);
|
||||
RESET.dataPointType(Dpt(1, 15));
|
||||
RESET.callback(resetCallback);
|
||||
printf("Timeout: %d\n", knx.paramWord(0));
|
||||
printf("Zykl. senden: %d\n", knx.paramByte(2));
|
||||
printf("Min/Max senden: %d\n", knx.paramByte(3));
|
||||
|
@ -1,10 +1,9 @@
|
||||
#include "association_table_object.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "association_table_object.h"
|
||||
#include "bits.h"
|
||||
#include "data_property.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace std;
|
||||
|
||||
AssociationTableObject::AssociationTableObject(Memory& memory)
|
||||
|
@ -2,9 +2,7 @@
|
||||
#if MASK_VERSION == 0x07B0
|
||||
|
||||
#include "bau07B0.h"
|
||||
|
||||
#include "bits.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "bau_systemB.h"
|
||||
|
||||
#include "bits.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "cemi_frame.h"
|
||||
|
||||
#include "bits.h"
|
||||
#include "string.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
|
@ -1,17 +1,15 @@
|
||||
#include "cemi_server.h"
|
||||
|
||||
#include "config.h"
|
||||
#ifdef USE_CEMI_SERVER
|
||||
|
||||
#include "cemi_server.h"
|
||||
#include "cemi_frame.h"
|
||||
#include "bau_systemB.h"
|
||||
#include "usb_tunnel_interface.h"
|
||||
#include "data_link_layer.h"
|
||||
#include "string.h"
|
||||
#include "bits.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef USE_CEMI_SERVER
|
||||
|
||||
CemiServer::CemiServer(BauSystemB& bau)
|
||||
: _bau(bau),
|
||||
_usbTunnelInterface(*this,
|
||||
|
@ -1,12 +1,10 @@
|
||||
#include "cemi_server_object.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "bits.h"
|
||||
#include "data_property.h"
|
||||
#ifdef USE_CEMI_SERVER
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#ifdef USE_CEMI_SERVER
|
||||
#include "cemi_server_object.h"
|
||||
#include "bits.h"
|
||||
#include "data_property.h"
|
||||
|
||||
CemiServerObject::CemiServerObject()
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "data_property.h"
|
||||
|
||||
#include "bits.h"
|
||||
|
||||
#include <cstring>
|
||||
|
@ -9,7 +9,6 @@
|
||||
*/
|
||||
|
||||
#include "datapoint_types.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Sign for a negative DPT9 float value
|
||||
|
@ -1,12 +1,10 @@
|
||||
#include <cstring>
|
||||
#include "device_object.h"
|
||||
|
||||
#include "bits.h"
|
||||
#include "data_property.h"
|
||||
#include "callback_property.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#define LEN_KNX_SERIAL 6
|
||||
|
||||
DeviceObject::DeviceObject()
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "dptconvert.h"
|
||||
|
||||
#include "bits.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "group_object.h"
|
||||
|
||||
#include "bits.h"
|
||||
#include "string.h"
|
||||
#include "datapoint_types.h"
|
||||
|
@ -1,11 +1,10 @@
|
||||
#include "group_object_table_object.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "group_object_table_object.h"
|
||||
#include "group_object.h"
|
||||
#include "bits.h"
|
||||
#include "data_property.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
GroupObjectTableObject::GroupObjectTableObject(Memory& memory)
|
||||
: TableObject(memory)
|
||||
{
|
||||
|
@ -1,9 +1,8 @@
|
||||
#include "interface_object.h"
|
||||
|
||||
#include "data_property.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "interface_object.h"
|
||||
#include "data_property.h"
|
||||
|
||||
InterfaceObject::~InterfaceObject()
|
||||
{
|
||||
if (_properties != nullptr)
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include "ip_host_protocol_address_information.h"
|
||||
|
||||
#include "bits.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
IpHostProtocolAddressInformation::IpHostProtocolAddressInformation(uint8_t* data)
|
||||
: _data(data)
|
||||
{}
|
||||
|
@ -1,13 +1,11 @@
|
||||
#include "ip_parameter_object.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
#include "device_object.h"
|
||||
#include "platform.h"
|
||||
#include "bits.h"
|
||||
#include "data_property.h"
|
||||
#include "callback_property.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
//224.0.23.12
|
||||
#define DEFAULT_MULTICAST_ADDR ((uint32_t)0xE000170C)
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "knx_ip_device_information_dib.h"
|
||||
|
||||
#include "bits.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "knx_ip_dib.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
KnxIpDIB::KnxIpDIB(uint8_t* data) : _data(data)
|
||||
{}
|
||||
|
@ -1,10 +1,9 @@
|
||||
#include "knx_ip_frame.h"
|
||||
|
||||
#include "bits.h"
|
||||
#ifdef USE_IP
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#ifdef USE_IP
|
||||
#include "bits.h"
|
||||
|
||||
#define KNXIP_HEADER_LEN 0x6
|
||||
#define KNXIP_PROTOCOL_VERSION 0x10
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "knx_ip_routing_indication.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#ifdef USE_IP
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "knx_ip_search_request.h"
|
||||
|
||||
#ifdef USE_IP
|
||||
|
||||
KnxIpSearchRequest::KnxIpSearchRequest(uint8_t* data, uint16_t length)
|
||||
: KnxIpFrame(data, length), _hpai(data + LEN_KNXIP_HEADER)
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "npdu.h"
|
||||
|
||||
#include "cemi_frame.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
NPDU::NPDU(uint8_t* data, CemiFrame& frame): _data(data), _frame(frame)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
uint8_t NPDU::octetCount() const
|
||||
{
|
||||
return _data[0];
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "property.h"
|
||||
|
||||
#include "bits.h"
|
||||
|
||||
#include <cstring>
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include "data_link_layer.h"
|
||||
#include "rf_physical_layer.h"
|
||||
|
||||
#define MAX_KNX_TELEGRAM_SIZE 263
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
#include "table_object.h"
|
||||
#include <string.h>
|
||||
|
||||
#include "table_object.h"
|
||||
#include "bits.h"
|
||||
#include "memory.h"
|
||||
#include "callback_property.h"
|
||||
#include "data_property.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
TableObject::TableObject(Memory& memory)
|
||||
: _memory(memory)
|
||||
{}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "tpdu.h"
|
||||
|
||||
#include "cemi_frame.h"
|
||||
|
||||
TPDU::TPDU(uint8_t* data, CemiFrame& frame): _data(data), _frame(frame)
|
||||
|
@ -1,12 +1,10 @@
|
||||
#include "transport_layer.h"
|
||||
|
||||
#include "apdu.h"
|
||||
#include "cemi_frame.h"
|
||||
#include "network_layer.h"
|
||||
#include "application_layer.h"
|
||||
#include "platform.h"
|
||||
#include "bits.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
TransportLayer::TransportLayer(ApplicationLayer& layer): _savedFrame(0),
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "config.h"
|
||||
#ifdef USE_USB
|
||||
|
||||
#include "bits.h"
|
||||
#include "usb_tunnel_interface.h"
|
||||
@ -8,7 +9,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef USE_USB
|
||||
#define MIN(a, b) ((a < b) ? (a) : (b))
|
||||
|
||||
#define MAX_EP_SIZE 64
|
||||
#define HID_HEADER_SIZE 3
|
||||
|
Loading…
Reference in New Issue
Block a user