6#include "cueos_config.h"
7#if cueOS_CONFIG_NODETYPE == cueOS_NODETYPE_SLAVE_DMX
10#include "DMX512_driver.h"
11#include "DMX512_chaser_step.h"
30 if(time < chaser_step->fadein_time){
31 value = floor(((
float)value/(
float)chaser_step->
fadein_time)*((
float)(time)));
63 if(time < chaser_step->fadeout_time){
64 value = floor(((
float)value/(
float)chaser_step->
fadeout_time)*((
float)(time + value)));
94 chaser_step.
scene = scene;
111 switch(chaser_step->
state){
#define DMX512_CHASER_STEP_DEFAULT
chaser step instance default values
void DMX512_chaser_step_stop(DMX512_chaser_step_s *chaser_step)
Stops a chaser step by assigning it to its idle state.
void DMX512_chaser_step_manage(DMX512_chaser_step_s *chaser_step)
Chaser step state machine. Manage a chaser step's state over time.
void DMX512_chaser_step_start(DMX512_chaser_step_s *chaser_step)
Starts a chaser step by assigning it to its fade_in state.
@ DMX512_CHASER_STEP_INITIALISED
@ DMX512_CHASER_STEP_HOLD
@ DMX512_CHASER_STEP_IDLE
@ DMX512_CHASER_STEP_FADE_OUT
@ DMX512_CHASER_STEP_FADE_IN
DMX512_driver_err_e DMX512_driver_set_single(uint16_t address, uint8_t value)
Sets a buffer's address to a given value.
void ms_chronometer_reset(ms_chronometer_s *ms_chronometer)
Resets an mschronometer instance time delta to zero.
uint32_t ms_chronometer_get_elapsed_ms(ms_chronometer_s *ms_chronometer)
Returns elapsed time in milliseconds since last reset.
DMX512 chaser step structure object.
ms_chronometer_s ms_chronometer
DMX512_fixture_chaser_step_state_e state
DMX512_fixture_chaser_step_status_e status
DMX512_fixture_s * fixture
DMX512 scene structure object.
DMX512_fixture_preset_s * fixture_presets
uint16_t fixture_preset_count