UART commands work
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
* Author: ewars
|
||||
*/
|
||||
|
||||
|
||||
#include "ws2812_effect.h"
|
||||
#include "ws2812_drv.h"
|
||||
#include "ws2812_effect.h"
|
||||
#include "clock.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct {
|
||||
@@ -19,6 +19,35 @@ typedef struct {
|
||||
static colour_s colour_hours = {250, 0, 0};
|
||||
static colour_s colour_minutes = {0, 250, 0};
|
||||
static colour_s colour_seconds = {0, 0, 250};
|
||||
static colour_s colour_background = {0, 0, 0};
|
||||
|
||||
void clock_setColourHours(uint8_t r, uint8_t g, uint8_t b){
|
||||
colour_hours.r = r;
|
||||
colour_hours.g = g;
|
||||
colour_hours.b = b;
|
||||
}
|
||||
|
||||
void clock_setColourMinutes(uint8_t r, uint8_t g, uint8_t b){
|
||||
colour_minutes.r = r;
|
||||
colour_minutes.g = g;
|
||||
colour_minutes.b = b;
|
||||
}
|
||||
|
||||
void clock_setColourSeconds(uint8_t r, uint8_t g, uint8_t b){
|
||||
colour_seconds.r = r;
|
||||
colour_seconds.g = g;
|
||||
colour_seconds.b = b;
|
||||
}
|
||||
|
||||
|
||||
void clock_setColourBackground(uint8_t r, uint8_t g, uint8_t b){
|
||||
|
||||
colour_background.r = r;
|
||||
colour_background.g = g;
|
||||
colour_background.b = b;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void ws_Effect_RoudTheClock(void){
|
||||
@@ -60,6 +89,8 @@ void ws_Effect_RandRound(void){
|
||||
void ws_effect_display_time(uint8_t hour, uint8_t minute, uint8_t second){
|
||||
|
||||
ws2812_reset();
|
||||
//ws2812_resetColour(colour_background.r, colour_background.g, colour_background.b);
|
||||
ws2812_update();
|
||||
|
||||
ws2812_set_colour(hour, colour_hours.r, colour_hours.g, colour_hours.b);
|
||||
ws2812_update();
|
||||
|
||||
Reference in New Issue
Block a user