DPT16 (to bus) implemented

This commit is contained in:
Waldemar Porscha 2019-08-17 21:55:00 +02:00
parent 9b709a9b0d
commit 13a0c1e999

View File

@ -1275,8 +1275,13 @@ int valueToBusValueAccess(const KNXValue& value, uint8_t* payload, int payload_l
int valueToBusValueString(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype)
{
//TODO
return false;
const char* strValue = value;
uint8_t val = strValue[0];
for (int n = 0; n < 14; n++) {
if (val) val = strValue[n]; //string terminator 0x00 will stop further assignments and init the remainig payload with zero
unsigned8ToPayload(payload, payload_length, n, val, 0xff);
}
return true;
}
int valueToBusValueScene(const KNXValue& value, uint8_t* payload, int payload_length, const Dpt& datatype)