renamed CUSTOM_CHAR_TLV() macro to CUSTOM_CHAR_TLV8() macro

This commit is contained in:
Gregg 2024-04-21 15:18:22 -05:00
parent 04cb07a0fc
commit 4e5d03f63f
2 changed files with 8 additions and 4 deletions

View File

@ -614,9 +614,9 @@ namespace Characteristic {
#define CUSTOM_CHAR_DATA(NAME,UUID,PERMISISONS) \
HapChar _CUSTOM_##NAME {#UUID,#NAME,(PERMS)(PERMISISONS),DATA,true}; \
namespace Characteristic { struct NAME : SpanCharacteristic { NAME(const char * val="AA==", boolean nvsStore=false) : SpanCharacteristic {&_CUSTOM_##NAME,true} { init(val,nvsStore); } }; }
namespace Characteristic { struct NAME : SpanCharacteristic { NAME(const char * val="", boolean nvsStore=false) : SpanCharacteristic {&_CUSTOM_##NAME,true} { init(val,nvsStore); } }; }
#define CUSTOM_CHAR_TLV(NAME,UUID,PERMISISONS) \
#define CUSTOM_CHAR_TLV8(NAME,UUID,PERMISISONS) \
HapChar _CUSTOM_##NAME {#UUID,#NAME,(PERMS)(PERMISISONS),TLV_ENC,true}; \
namespace Characteristic { struct NAME : SpanCharacteristic { NAME(const char * val="", boolean nvsStore=false) : SpanCharacteristic {&_CUSTOM_##NAME,true} { init(val,nvsStore); } }; }
@ -632,7 +632,11 @@ namespace Characteristic {
#define CUSTOM_CHAR_DATA(NAME,UUID,PERMISISONS) \
extern HapChar _CUSTOM_##NAME; \
namespace Characteristic { struct NAME : SpanCharacteristic { NAME(const char * val="AA==", boolean nvsStore=false) : SpanCharacteristic {&_CUSTOM_##NAME,true} { init(val,nvsStore); } }; }
namespace Characteristic { struct NAME : SpanCharacteristic { NAME(const char * val="", boolean nvsStore=false) : SpanCharacteristic {&_CUSTOM_##NAME,true} { init(val,nvsStore); } }; }
#define CUSTOM_CHAR_TLV8(NAME,UUID,PERMISISONS) \
extern HapChar _CUSTOM_##NAME; \
namespace Characteristic { struct NAME : SpanCharacteristic { NAME(const char * val="", boolean nvsStore=false) : SpanCharacteristic {&_CUSTOM_##NAME,true} { init(val,nvsStore); } }; }
#endif

View File

@ -27,7 +27,7 @@
#include "HomeSpan.h"
CUSTOM_CHAR_TLV(DisplayOrder,136,PR+EV);
CUSTOM_CHAR_TLV8(DisplayOrder,136,PR+EV);
CUSTOM_CHAR_DATA(TestData,333,PR+EV);
struct HomeSpanTV : Service::Television {