From f0ec3ea285221253efdd5d0ed7c61cbe65a55fa0 Mon Sep 17 00:00:00 2001 From: asklepios Date: Sat, 14 May 2011 18:09:40 +0000 Subject: [PATCH] added additional configparameters for small animations --- display_loop.c | 10 +++++----- smallani/colwalk.c | 1 - smallani/config.in | 12 ++++++++---- smallani/rowbounce.c | 6 +++--- smallani/rowwalk.c | 1 - 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/display_loop.c b/display_loop.c index 1b01023..be6d321 100644 --- a/display_loop.c +++ b/display_loop.c @@ -217,23 +217,23 @@ void display_loop(){ #ifdef SMALLANIMATION_ROWWALK case 36: - rowwalk(50,10); + rowwalk(SMALLANIMATION_ROWWALK_COUNT,SMALLANIMATION_ROWWALK_SPEED); break; #endif #ifdef SMALLANIMATION_COLWALK case 37: - colwalk(10,50); + colwalk(SMALLANIMATION_COLWALK_COUNT,SMALLANIMATION_COLWALK_SPEED); break; #endif #ifdef SMALLANIMATION_COLBOUNCE case 38: - colbounce(10,25); + colbounce(SMALLANIMATION_ROWBOUNCE_COUNT,SMALLANIMATION_COLBOUNCE_SPEED); break; #endif -#ifdef SMALLANIMATION_COLBOUNCE +#ifdef SMALLANIMATION_ROWBOUNCE case 39: - rowbounce(10,25); + rowbounce(SMALLANIMATION_COLBOUNCE_COUNT,SMALLANIMATION_ROWBOUNCE_SPEED); break; #endif diff --git a/smallani/colwalk.c b/smallani/colwalk.c index 02363bb..e7fd7d0 100644 --- a/smallani/colwalk.c +++ b/smallani/colwalk.c @@ -3,7 +3,6 @@ #include "../pixel.h" #include "../util.h" -//dots flying from left to right void colwalk(uint8_t times,uint8_t speed) { uint8_t i, j,k,h; diff --git a/smallani/config.in b/smallani/config.in index 34287d1..c6de9fa 100644 --- a/smallani/config.in +++ b/smallani/config.in @@ -1,14 +1,18 @@ mainmenu_option next_comment comment "small Animations" bool "rowwalk" SMALLANIMATION_ROWWALK - int "speed of rowwalk in 20ms" SMALLANIMATION_ROWWALK_SPEED "50" + int "speed of rowwalk in 10ms" SMALLANIMATION_ROWWALK_SPEED "50" + int "count of rowwalk in full cycles" SMALLANIMATION_ROWWALK_COUNT "10" bool "colwalk" SMALLANIMATION_COLWALK - int "speed of colwalk in 20ms" SMALLANIMATION_COLWALK_SPEED "50" + int "speed of colwalk in 10ms" SMALLANIMATION_COLWALK_SPEED "50" + int "count of colwalk in full cycles" SMALLANIMATION_COLWALK_COUNT "10" bool "rowbounce" SMALLANIMATION_ROWBOUNCE - int "speed of rowbounce in 20ms" SMALLANIMATION_ROWBOUNCE_SPEED "50" + int "speed of rowbounce in 10ms" SMALLANIMATION_ROWBOUNCE_SPEED "50" + int "count of rowbounce in full cycles" SMALLANIMATION_ROWBOUNCE_COUNT "10" bool "colbounce" SMALLANIMATION_COLBOUNCE - int "speed of colbounce in 20ms" SMALLANIMATION_COLBOUNCE_SPEED "50" + int "speed of colbounce in 10ms" SMALLANIMATION_COLBOUNCE_SPEED "50" + int "count of colbounce in full cycles" SMALLANIMATION_COLBOUNCE_COUNT "10" endmenu diff --git a/smallani/rowbounce.c b/smallani/rowbounce.c index 4f49c21..e91291b 100644 --- a/smallani/rowbounce.c +++ b/smallani/rowbounce.c @@ -13,15 +13,15 @@ void rowbounce(uint8_t times,uint8_t speed) for (h=0;h1;h--){ + for (h=NUM_ROWS-1;h>1;h--){ for (i=0;i