mirror of
https://github.com/thelsing/knx.git
synced 2026-03-13 02:22:13 +01:00
undo clang-format
This commit is contained in:
@@ -4,10 +4,9 @@
|
||||
|
||||
// CRC-4 generator polynom: 10011 (x^4+x+1)
|
||||
const uint8_t FdskCalculator::crc4_tab[16] =
|
||||
{
|
||||
0x0, 0x3, 0x6, 0x5, 0xc, 0xf, 0xa, 0x9,
|
||||
0xb, 0x8, 0xd, 0xe, 0x7, 0x4, 0x1, 0x2
|
||||
};
|
||||
{
|
||||
0x0, 0x3, 0x6, 0x5, 0xc, 0xf, 0xa, 0x9,
|
||||
0xb, 0x8, 0xd, 0xe, 0x7, 0x4, 0x1, 0x2};
|
||||
|
||||
int FdskCalculator::snprintFdsk(char* str, int strSize, uint8_t* serialNumber, uint8_t* key)
|
||||
{
|
||||
@@ -132,7 +131,7 @@ int FdskCalculator::toBase32(uint8_t* in, long length, uint8_t*& out, bool usePa
|
||||
out = new uint8_t[result];
|
||||
|
||||
memcpy(out, temp, result);
|
||||
delete [] temp;
|
||||
delete[] temp;
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -168,7 +167,6 @@ int FdskCalculator::fromBase32(uint8_t* in, long length, uint8_t*& out)
|
||||
ch = 0x42;
|
||||
}
|
||||
|
||||
|
||||
// look up one base32 symbols: from 'A' to 'Z' or from 'a' to 'z' or from '2' to '7'
|
||||
if ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A))
|
||||
{
|
||||
@@ -180,7 +178,7 @@ int FdskCalculator::fromBase32(uint8_t* in, long length, uint8_t*& out)
|
||||
}
|
||||
else
|
||||
{
|
||||
delete [] temp;
|
||||
delete[] temp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -198,8 +196,7 @@ int FdskCalculator::fromBase32(uint8_t* in, long length, uint8_t*& out)
|
||||
|
||||
out = new uint8_t[result];
|
||||
memcpy(out, temp, result);
|
||||
delete [] temp;
|
||||
delete[] temp;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
#include "knx/rf/bau27B0.h"
|
||||
#include "knx/tp/bau07B0.h"
|
||||
|
||||
#include "knx/interface_object/group_object_table_object.h"
|
||||
#include "knx/bits.h"
|
||||
#include "knx/group_object/dpt/dpts.h"
|
||||
#include "knx/interface_object/group_object_table_object.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <sched.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "fdsk.h"
|
||||
|
||||
@@ -39,13 +39,13 @@ bool isSendHidReportPossible()
|
||||
}
|
||||
|
||||
#if MASK_VERSION == 0x57B0
|
||||
KnxFacade<LinuxPlatform, Bau57B0> knx;
|
||||
KnxFacade<LinuxPlatform, Bau57B0> knx;
|
||||
#elif MASK_VERSION == 0x27B0
|
||||
KnxFacade<LinuxPlatform, Bau27B0> knx;
|
||||
KnxFacade<LinuxPlatform, Bau27B0> knx;
|
||||
#elif MASK_VERSION == 0x07B0
|
||||
KnxFacade<LinuxPlatform, Bau07B0> knx;
|
||||
KnxFacade<LinuxPlatform, Bau07B0> knx;
|
||||
#else
|
||||
#error Mask version not supported yet!
|
||||
#error Mask version not supported yet!
|
||||
#endif
|
||||
|
||||
long lastsend = 0;
|
||||
@@ -74,7 +74,6 @@ void measureTemp()
|
||||
|
||||
float max = GO_MAX.value<Dpt9>();
|
||||
|
||||
|
||||
if (currentValue > max)
|
||||
GO_MAX.value<Dpt9>(currentValue);
|
||||
|
||||
@@ -133,8 +132,8 @@ int main(int argc, char** argv)
|
||||
{
|
||||
LOGGER.info("main() start.");
|
||||
|
||||
uint8_t serialNumber[] = { 0x00, 0xFA, 0x01, 0x02, 0x03, 0x04};
|
||||
uint8_t key[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
|
||||
uint8_t serialNumber[] = {0x00, 0xFA, 0x01, 0x02, 0x03, 0x04};
|
||||
uint8_t key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
|
||||
|
||||
FdskCalculator calc;
|
||||
char fdskString[42]; // 6 * 6 chars + 5 dashes + nullbyte = 42
|
||||
|
||||
Reference in New Issue
Block a user