Made more basic attributes compile time configurable.

This commit is contained in:
Ole Odendahl 2022-12-16 12:16:42 +01:00
parent 3b91d7525c
commit 61729aa81a
No known key found for this signature in database
GPG key ID: E31DACC635D3BE01
3 changed files with 16 additions and 2 deletions

View file

@ -6,4 +6,12 @@ config PRST_ZB_SLEEP_DURATION_SEC
config PRST_ZB_PARENT_POLL_INTERVAL_SEC
int "Interval for when b-parasite polls its parent for data (in seconds)"
default 60
default 60
config BUILD_DATE
string "Zigbee app init basic date code. Can be used as build revision."
default "20221214"
config MODEL_ID
string "Zigbee app model id."
default "b-parasite"

View file

@ -17,6 +17,11 @@ void prst_zb_attrs_init(struct zb_device_ctx *dev_ctx) {
PRST_BASIC_MODEL_ID,
ZB_ZCL_STRING_CONST_SIZE(PRST_BASIC_MODEL_ID));
ZB_ZCL_SET_STRING_VAL(
dev_ctx->basic_attr.date_code,
PRST_BASIC_DATE_CODE,
ZB_ZCL_STRING_CONST_SIZE(PRST_BASIC_DATE_CODE));
dev_ctx->identify_attr.identify_time =
ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE;
}

View file

@ -5,7 +5,8 @@
#define PRST_ZIGBEE_ENDPOINT 10
#define PRST_BASIC_MANUF_NAME "b-parasite"
#define PRST_BASIC_MODEL_ID "b-parasite"
#define PRST_BASIC_MODEL_ID CONFIG_MODEL_ID
#define PRST_BASIC_DATE_CODE CONFIG_BUILD_DATE
#define PRST_ZB_DEVICE_ID 0x0008
#define PRST_ZB_DEVICE_VERSION 0