summaryrefslogtreecommitdiff
path: root/usb-i2c-sl018/ledmatrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'usb-i2c-sl018/ledmatrix.c')
-rw-r--r--usb-i2c-sl018/ledmatrix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usb-i2c-sl018/ledmatrix.c b/usb-i2c-sl018/ledmatrix.c
index cc0abd2..2682c14 100644
--- a/usb-i2c-sl018/ledmatrix.c
+++ b/usb-i2c-sl018/ledmatrix.c
@@ -184,9 +184,11 @@ void init_ledmatrix(void)
void ledmatrix(ledmatrix_mode_t m)
{
+ if(m == mode)
+ return;
+
mode = m;
ledmatrix_stop_timer();
-
switch(mode)
{
case off: ledmatrix_off_init(); break;