mesh: correct parsing of transition / publish period

This commit is contained in:
Matthias Ringwald 2019-08-26 11:40:11 +02:00
parent f715e57146
commit efaf68e143

View File

@ -267,11 +267,11 @@ mesh_transaction_status_t mesh_access_transitions_transaction_status(mesh_transi
}
uint8_t mesh_access_transitions_num_steps_from_gdtt(uint8_t time_gdtt){
return time_gdtt >> 2;
return time_gdtt & 0x3fu;
}
static uint32_t mesh_access_transitions_step_ms_from_gdtt(uint8_t time_gdtt){
mesh_default_transition_step_resolution_t step_resolution = (mesh_default_transition_step_resolution_t) (time_gdtt & 0x03u);
mesh_default_transition_step_resolution_t step_resolution = (mesh_default_transition_step_resolution_t) (time_gdtt >> 6);
switch (step_resolution){
case MESH_DEFAULT_TRANSITION_STEP_RESOLUTION_100ms:
return 100;