Hello.
I have a question about the Scheduler Server.
According to the nRF Connect SDK specifications, the range for Step count is from 0x00 to 0x3e.
Scheduler Server
When the Step count is equal to 0x3F, the transition time is SYS_FOREVER_MS(-1).
scheduler_srv.c
static void scheduled_action_handle(struct k_work *work) { struct k_work_delayable *dwork = k_work_delayable_from_work(work); struct bt_mesh_scheduler_srv *srv = CONTAINER_OF(dwork, struct bt_mesh_scheduler_srv, delayed_work); if (srv->idx == BT_MESH_SCHEDULER_ACTION_ENTRY_COUNT) { /* Disabled without cancelling timer */ return; } WRITE_BIT(srv->active_bitmap, srv->idx, 0); const struct bt_mesh_model *next_sched_mod = NULL; uint16_t model_id = srv->sch_reg[srv->idx].action == BT_MESH_SCHEDULER_SCENE_RECALL ? BT_MESH_MODEL_ID_SCENE_SRV : BT_MESH_MODEL_ID_GEN_ONOFF_SRV; struct bt_mesh_model_transition transition = { .time = model_transition_decode( srv->sch_reg[srv->idx].transition_time), .delay = 0, };
model_utils.c
int32_t model_transition_decode(uint8_t encoded_transition) { uint8_t steps = (encoded_transition & 0x3f); uint8_t res = (encoded_transition >> 6); return (steps == TRANSITION_TIME_UNKNOWN) ? SYS_FOREVER_MS : (model_transition_res[res] * steps); }
However, according to the Mesh Model specifications, when the Transition Number of Steps field is equal to 0x3F, the Transition Time is 0.
Because the Scheduler Server does not support the Generic Default Transition Time state.
Mesh Model
3.2.9.3. Computation of transition time If the Transition Time field is present in the message and the Transition Number of Steps field value is equal to 0x3F and the Generic Default Transition Time state is not supported, the transition time is 0 and the transition shall be instantaneous.
When 0x3F is received, shouldn't the Transition Time be set to 0 instead of SYS_FOREVER_MS(-1)?
Thanks for reading.
Season's Greetings!
a.da