Class AnimationTimer

Inheritance Relationships

Base Type

Class Documentation

class AnimationTimer : public PixelMaestro::Timer

Public Functions

AnimationTimer(const Animation &animation)

Constructor.

Parameters

uint16_t get_delay() const

Returns the amount of time (in milliseconds) to wait before starting an animation cycle.

Return

Pause interval.

uint8_t get_step_count() const

Returns the number of steps in the current cycle.

Return

Cycle steps.

void recalculate_step_count()

Recalculates the number of steps in the Animation.

void set_interval(uint16_t interval, uint16_t delay = 0)

Sets the amount of time between events.

Parameters
  • interval: Amount of time (in milliseconds) between events.

  • delay: The amount of time (in milliseconds) to wait before starting an animation cycle.

bool update(const uint32_t &current_time)

Checks if the timer has gone off.

Return

If the runtime exceeds the interval, return true.

Parameters
  • current_time: Current program runtime.