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:
Vikrant More 2018-10-09 11:10:29 +05:30 committed by Johan Hedberg
parent 0a11c958fe
commit 06862268aa
2 changed files with 17 additions and 18 deletions

View file

@ -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);

View file

@ -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;