ticks per second depends on LED number
This commit is contained in:
parent
577d1ba607
commit
b7709355be
3
main.c
3
main.c
|
@ -52,12 +52,13 @@ volatile bool time_flag = false; /**< flag set when time changed */
|
|||
volatile bool photoresistor_flag = false; /**< flag set when ambient luminosity is measured */
|
||||
/** @} */
|
||||
|
||||
#define TICKS_PER_SECOND 256 /**< the number of ticks in one second */
|
||||
/** @defgroup main_ticks ticks per time units
|
||||
* @note these are derived from TICKS_PER_SECOND
|
||||
* @note I have to use type variables because defines would be stored in signed integers, leading to an overflow it later calculations
|
||||
* @{
|
||||
*/
|
||||
/** the number of ticks in one second (depend on the number of LED since it tries to have 255 tick per LED per second) */
|
||||
#define TICKS_PER_SECOND 256*WS2812B_LEDS/60
|
||||
/** number of ticks in one second */
|
||||
const uint32_t ticks_second = TICKS_PER_SECOND;
|
||||
/** number of ticks in one minute */
|
||||
|
|
Loading…
Reference in New Issue