more config options; better default profiles

This commit is contained in:
Hans-Gert Dahmen 2011-10-29 05:59:46 +00:00
parent ceffdd6bbf
commit 9efcc251a7
8 changed files with 57 additions and 24 deletions

View File

@ -13,6 +13,13 @@
#include "../util.h"
#include "../scrolltext/scrolltext.h"
#ifndef TIME_MASTER_ADDR
#define TIME_MASTER_ADDR 0x00
#endif
#ifndef TIME_UPDATE_TIMEOUT
#define TIME_UPDATE_TIMEOUT 23
#endif
//hackhack
extern can_addr myaddr;
@ -62,7 +69,11 @@ void time_anim(void)
//update time and return if we had no success
if(time_update() == 0)
{
strcpy_P(timestring, PSTR("</#time animation timeout"));
scrolltext(timestring);
return;
}
//convert the time to a string
sprintf_P(timestring, PSTR(">+:p42d50/#%02hi#<;+p42d50/# %02hi#x49y8b255p42d50#:"), lap_time_h, lap_time_m);

View File

@ -5,7 +5,10 @@ comment "Animations"
bool "Joern1" ANIMATION_JOERN1
dep_bool_menu "Snake" ANIMATION_SNAKE $RANDOM_SUPPORT
int "Snake delay" SNAKE_DELAY 100
int "Snake round delay" SNAKE_CYCLE_DELAY 100
int "Snake termination delay" SNAKE_TERMINATION_DELAY 60
int "Snake max length" SNAKE_MAX_LENGTH 64
int "Snake max apples" SNAKE_MAX_APPLES 10
endmenu
bool "Schachbrett" ANIMATION_SCHACHBRETT
@ -15,6 +18,7 @@ comment "Animations"
int "FEUER_N" FEUER_N 5
int "FEUER_DIV" FEUER_DIV 44
int "FEUER_DELAY" FEUER_DELAY 50
int "Fire number of cycles" FIRE_CYCLES 800
endmenu
dep_bool_menu "Matrix" ANIMATION_MATRIX $RANDOM_SUPPORT
@ -34,8 +38,8 @@ comment "Animations"
dep_bool "Langton Ant" ANIMATION_LTN_ANT $RANDOM_SUPPORT
dep_bool_menu "Time Display" ANIMATION_TIME $SCROLLTEXT_SUPPORT $LAP_TIME_EXTENSION
hex "Time master address (hex)" TIME_MASTER_ADDR 0x00
int "Request timeout (ms)" TIME_UPDATE_TIMEOUT 23
int "Time master address (int)" TIME_MASTER_ADDR 00
int "Request timeout (ms)" TIME_UPDATE_TIMEOUT 50
endmenu
dep_bool_menu "Bitmap Scroller" ANIMATION_BMSCROLLER y $RANDOM_SUPPORT

View File

@ -125,6 +125,9 @@ void schachbrett(unsigned char times){
#ifdef ANIMATION_FEUER
#ifndef FIRE_CYCLES
#define FIRE_CYCLES 800
#endif
#define FEUER_Y (NUM_ROWS + 3)
void feuer()
{
@ -132,7 +135,7 @@ void feuer()
unsigned int t;
unsigned char world[NUM_COLS][FEUER_Y]; // double buffer
for(t=0; t<800; t++) {
for(t=0; t<FIRE_CYCLES; t++) {
// diffuse
for(y=1; y<FEUER_Y; y++) {
for(x=1; x<NUM_COLS-1; x++) {

View File

@ -89,7 +89,7 @@ void display_loop(){
#endif
time_anim();
break;
#else ANIMATION
#else
#ifdef ANIMATION_SCROLLTEXT
break;
#endif

View File

@ -27,12 +27,18 @@ game_descriptor_t snake_game_descriptor __attribute__((section(".game_descriptor
#define SNAKE_NEWCONTROL
// limits
#define SNAKE_MAX_LENGTH 64u
#ifndef SNAKE_MAX_LENGTH
#define SNAKE_MAX_LENGTH 64u
#endif
#define SNAKE_MAX_APPLES 10
// delays (in milliseconds)
#define SNAKE_CYCLE_DELAY 100
#define SNAKE_TERMINATION_DELAY 60
#ifndef SNAKE_CYCLE_DELAY
#define SNAKE_CYCLE_DELAY 100
#endif
#ifndef SNAKE_TERMINATION_DELAY
#define SNAKE_TERMINATION_DELAY 60
#endif
// colors
#define SNAKE_COLOR_BORDER 3

View File

@ -75,13 +75,17 @@ ANIMATION_SCROLLTEXT=y
ANIMATION_SPIRALE=y
ANIMATION_JOERN1=y
ANIMATION_SNAKE=y
SNAKE_DELAY=100
SNAKE_CYCLE_DELAY=100
SNAKE_TERMINATION_DELAY=60
SNAKE_MAX_LENGTH=64
SNAKE_MAX_APPLES=10
ANIMATION_SCHACHBRETT=y
ANIMATION_FEUER=y
FEUER_S=30
FEUER_N=5
FEUER_DIV=44
FEUER_DELAY=50
FIRE_CYCLES=800
ANIMATION_MATRIX=y
MATRIX_STREAMER_NUM=30
MATRIX_CYCLES=500
@ -89,8 +93,8 @@ ANIMATION_RANDOM_BRIGHT=y
# ANIMATION_STONEFLY is not set
# ANIMATION_FLYINGDOTS is not set
ANIMATION_GAMEOFLIFE=y
GOL_DELAY=30
GOL_CYCLES=180
GOL_DELAY=100
GOL_CYCLES=360
# ANIMATION_BREAKOUT is not set
# ANIMATION_MHERWEG is not set
# ANIMATION_LTN_ANT is not set

View File

@ -67,27 +67,32 @@ ANIMATION_SCROLLTEXT=y
ANIMATION_SPIRALE=y
ANIMATION_JOERN1=y
ANIMATION_SNAKE=y
SNAKE_DELAY=50
SNAKE_CYCLE_DELAY=50
SNAKE_TERMINATION_DELAY=60
SNAKE_MAX_LENGTH=64
SNAKE_MAX_APPLES=10
ANIMATION_SCHACHBRETT=y
ANIMATION_FEUER=y
FEUER_S=30
FEUER_N=5
FEUER_DIV=47
FEUER_DELAY=30
FIRE_CYCLES=200
ANIMATION_MATRIX=y
STREAMER_NUM=100
MATRIX_STREAMER_NUM=30
MATRIX_CYCLES=250
ANIMATION_RANDOM_BRIGHT=y
# ANIMATION_STONEFLY is not set
# ANIMATION_FLYINGDOTS is not set
ANIMATION_GAMEOFLIFE=y
GOL_DELAY=30
GOL_DELAY=12
GOL_CYCLES=180
# ANIMATION_BREAKOUT is not set
# ANIMATION_MHERWEG is not set
# ANIMATION_LTN_ANT is not set
ANIMATION_TIME=y
TIME_MASTER_ADDR=00
TIME_UPDATE_TIMEOUT=100
TIME_UPDATE_TIMEOUT=23
# ANIMATION_BMSCROLLER is not set
# ANIMATION_LABORLOGO is not set
# ANIMATION_AMPHIBIAN is not set