This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

adding second element to a light control server node mesh example

Hi, I'm trying to add another element with a simple onoff model to control a second LED on the same server node. I get APP_ERROR. I try declaring m_server0, m_server1, generic_get0_cb, generic_get1_cb, etc.. but in that way I would have to call simple_on_off_server_init(&m_server0, 0) and simple_on_off_server_init(&m_server1, 1) in configuration_setup(), but in header function of simple_on_off_server_init its written we should only call it once. What am I missing to add another element with the same simple on off model into it. thanks a lot. Also changed ACCESS_ELEMENT_COUNT

Related