Support for develmode

This commit is contained in:
Stefan `Sec` Zehl 2011-08-04 15:02:51 +02:00
parent ff2c891961
commit 323143d734
2 changed files with 10 additions and 8 deletions

View File

@ -7,7 +7,7 @@
#include "basic/random.h"
#include "basic/config.h"
#define CFGVER 1
#define CFGVER 2
struct CDESC the_config[]= {
{"version", CFGVER, CFGVER, CFGVER, 0, 0},
@ -20,7 +20,8 @@ struct CDESC the_config[]= {
{"lcdmirror", 0, 0, 1 , 0, 0},
{"lcdinvert", 0, 0, 1 , 0, 0},
{"lcdcontrast", 14, 0, 31 , 0, 0},
{"alivechk", 0, 0, 2 , 0, 0},
{"alivechk", 0, 0, 2 , 1, CFG_TYPE_DEVEL},
{"develmode", 0, 0, 1 , 1, CFG_TYPE_DEVEL},
{"flamemax", 255, 0, 255, 1, CFG_TYPE_FLAME},
{"flamemin", 0, 0, 255, 1, CFG_TYPE_FLAME},
{"flamespeed", 1, 1, 100, 1, CFG_TYPE_FLAME},
@ -40,7 +41,7 @@ char nickfont[FILENAMELEN];
void applyConfig(){
if(GLOBAL(lcdcontrast)>0)
lcdSetContrast(GLOBAL(lcdcontrast));
return;
enableConfig(CFG_TYPE_DEVEL,GLOBAL(develmode));
};
int saveConfig(void){

View File

@ -34,11 +34,12 @@ extern char nickfont[];
#define GLOBALlcdinvert (the_config[ 7].value)
#define GLOBALlcdcontrast (the_config[ 8].value)
#define GLOBALalivechk (the_config[ 9].value)
#define GLOBALflamemax (the_config[10].value)
#define GLOBALflamemin (the_config[11].value)
#define GLOBALflamespeed (the_config[12].value)
#define GLOBALflamemaxw (the_config[13].value)
#define GLOBALflameminw (the_config[14].value)
#define GLOBALdevelmode (the_config[10].value)
#define GLOBALflamemax (the_config[11].value)
#define GLOBALflamemin (the_config[12].value)
#define GLOBALflamespeed (the_config[13].value)
#define GLOBALflamemaxw (the_config[14].value)
#define GLOBALflameminw (the_config[15].value)
#define GLOBALnickname (nickname)
#define GLOBALnickfont (nickfont)