samples: mesh: nrf52: coding style improvements
Removed unwanted lines of codes. In transition.c define Timers just before they get utilised. Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This commit is contained in:
parent
0a11c958fe
commit
06862268aa
|
@ -705,6 +705,23 @@ static void light_ctl_temp_tt_handler(struct k_timer *dummy)
|
|||
}
|
||||
/* Timers related handlers & threads (End) */
|
||||
|
||||
K_TIMER_DEFINE(onoff_transition_timer, onoff_tt_handler, NULL);
|
||||
|
||||
K_TIMER_DEFINE(level_lightness_transition_timer,
|
||||
level_lightness_tt_handler, NULL);
|
||||
K_TIMER_DEFINE(level_temp_transition_timer,
|
||||
level_temp_tt_handler, NULL);
|
||||
|
||||
K_TIMER_DEFINE(light_lightness_actual_transition_timer,
|
||||
light_lightness_actual_tt_handler, NULL);
|
||||
K_TIMER_DEFINE(light_lightness_linear_transition_timer,
|
||||
light_lightness_linear_tt_handler, NULL);
|
||||
|
||||
K_TIMER_DEFINE(light_ctl_transition_timer,
|
||||
light_ctl_tt_handler, NULL);
|
||||
K_TIMER_DEFINE(light_ctl_temp_transition_timer,
|
||||
light_ctl_temp_tt_handler, NULL);
|
||||
|
||||
/* Messages handlers (Start) */
|
||||
void onoff_handler(struct generic_onoff_state *state)
|
||||
{
|
||||
|
@ -772,20 +789,3 @@ void light_ctl_temp_handler(struct light_ctl_state *state)
|
|||
}
|
||||
/* Messages handlers (End) */
|
||||
|
||||
K_TIMER_DEFINE(onoff_transition_timer, onoff_tt_handler, NULL);
|
||||
|
||||
K_TIMER_DEFINE(level_lightness_transition_timer,
|
||||
level_lightness_tt_handler, NULL);
|
||||
K_TIMER_DEFINE(level_temp_transition_timer,
|
||||
level_temp_tt_handler, NULL);
|
||||
|
||||
K_TIMER_DEFINE(light_lightness_actual_transition_timer,
|
||||
light_lightness_actual_tt_handler, NULL);
|
||||
K_TIMER_DEFINE(light_lightness_linear_transition_timer,
|
||||
light_lightness_linear_tt_handler, NULL);
|
||||
|
||||
K_TIMER_DEFINE(light_ctl_transition_timer,
|
||||
light_ctl_tt_handler, NULL);
|
||||
K_TIMER_DEFINE(light_ctl_temp_transition_timer,
|
||||
light_ctl_temp_tt_handler, NULL);
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ enum transition_time {
|
|||
|
||||
extern u8_t enable_transition, default_tt;
|
||||
extern u32_t *ptr_tt_counter;
|
||||
extern s64_t transition_start_timestamp;
|
||||
|
||||
struct k_timer onoff_transition_timer;
|
||||
struct k_timer level_lightness_transition_timer;
|
||||
|
|
Loading…
Reference in a new issue