changes for balcony setup
This commit is contained in:
parent
7e4c5352b3
commit
64a0f1b51e
|
@ -83,6 +83,11 @@ void setup() {
|
||||||
.setPosition(10, 80+60+5+15*2)
|
.setPosition(10, 80+60+5+15*2)
|
||||||
.setSize(100, 10);
|
.setSize(100, 10);
|
||||||
|
|
||||||
|
cp5.addButton("printHeightmap")
|
||||||
|
.setPosition(10, 80+60+5+15*3)
|
||||||
|
.setSize(100, 10);
|
||||||
|
|
||||||
|
|
||||||
cp5.addButton("Remove")
|
cp5.addButton("Remove")
|
||||||
.setPosition(100, 80)
|
.setPosition(100, 80)
|
||||||
.setSize(50, 50);
|
.setSize(50, 50);
|
||||||
|
@ -135,19 +140,27 @@ void setup() {
|
||||||
|
|
||||||
|
|
||||||
cp5.addButton("Debug")
|
cp5.addButton("Debug")
|
||||||
.setPosition(10, 200)
|
.setPosition(10, 205)
|
||||||
.setSize(100, 30);
|
.setSize(100, 30);
|
||||||
|
|
||||||
cp5.addButton("Run")
|
cp5.addButton("Run")
|
||||||
.setPosition(10, 240)
|
.setPosition(10, 205+40)
|
||||||
.setSize(100, 30);
|
.setSize(100, 30);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cp5.addButton("FX_Scanner")
|
cp5.addButton("FX_Scanner")
|
||||||
.setPosition(200, 200)
|
.setPosition(200, 200)
|
||||||
.setSize(100, 20);
|
.setSize(100, 20);
|
||||||
cp5.addButton("FX_Flash")
|
cp5.addButton("FX_Flash")
|
||||||
.setPosition(200, 220)
|
.setPosition(200, 200+20*1)
|
||||||
|
.setSize(100, 20);
|
||||||
|
|
||||||
|
cp5.addButton("FX_Stars")
|
||||||
|
.setPosition(200, 200+20*2)
|
||||||
.setSize(100, 20);
|
.setSize(100, 20);
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,6 +186,10 @@ void save_heightmap(){
|
||||||
String writeserial="save\n";
|
String writeserial="save\n";
|
||||||
myPort.write(writeserial);
|
myPort.write(writeserial);
|
||||||
}
|
}
|
||||||
|
void printHeightmap() {
|
||||||
|
String writeserial="print\n";
|
||||||
|
myPort.write(writeserial);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Debug() {
|
void Debug() {
|
||||||
|
@ -211,6 +228,14 @@ void FX_Flash() {
|
||||||
String writeserial="fx_flash\n";
|
String writeserial="fx_flash\n";
|
||||||
myPort.write(writeserial);
|
myPort.write(writeserial);
|
||||||
}
|
}
|
||||||
|
void FX_Stars() {
|
||||||
|
String writeserial="fx_stars\n";
|
||||||
|
myPort.write(writeserial);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -228,4 +253,4 @@ void draw() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -44,12 +44,12 @@ long lastRoutineUpdate=0;
|
||||||
#define ROUTINEUPDATETIME 20
|
#define ROUTINEUPDATETIME 20
|
||||||
long lastCheckspawn=0;
|
long lastCheckspawn=0;
|
||||||
#define CHECKSPAWNDELAY 4000 //delay in ms to check random spawn
|
#define CHECKSPAWNDELAY 4000 //delay in ms to check random spawn
|
||||||
#define SPAWNCHANCE 7 //1 out of x times wagon will spawn
|
#define SPAWNCHANCE 10 //1 out of x times wagon will spawn
|
||||||
#define SPAWNCHANCEDOUBLE 5 //change of spawning a two trains simultaneously
|
#define SPAWNCHANCEDOUBLE 5 //change of spawning a two trains simultaneously
|
||||||
long lastCheckspawnEffect=0;
|
long lastCheckspawnEffect=0;
|
||||||
#define CHECKSPAWNDELAY_EFFECT 10000 //delay in ms to check random effect
|
#define CHECKSPAWNDELAY_EFFECT 10000 //delay in ms to check random effect
|
||||||
#define SPAWNCHANCE_EFFECT_SCANNER 1000 //1 out of x times spawn effect
|
#define SPAWNCHANCE_EFFECT_SCANNER 1000 //1 out of x times spawn effect
|
||||||
#define SPAWNCHANCE_EFFECT_FLASH 1000 //1 out of x times spawn effect
|
#define SPAWNCHANCE_EFFECT_FLASH 4000 //1 out of x times spawn effect
|
||||||
|
|
||||||
#define BRIGHTNESS_RUN 200
|
#define BRIGHTNESS_RUN 200
|
||||||
#define BRIGHTNESS_DEBUG 150
|
#define BRIGHTNESS_DEBUG 150
|
||||||
|
@ -250,10 +250,16 @@ void spawnWagon(){
|
||||||
int side_startpos=0;
|
int side_startpos=0;
|
||||||
int side_multi=1;
|
int side_multi=1;
|
||||||
|
|
||||||
|
/*
|
||||||
if (random(0,2)==0){ //spawn from other side
|
if (random(0,2)==0){ //spawn from other side
|
||||||
side_startpos=NUMPIXELS+_randomlength;
|
side_startpos=NUMPIXELS+_randomlength;
|
||||||
side_multi=-1;
|
side_multi=-1;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Force start from end of strip
|
||||||
|
side_startpos=NUMPIXELS+_randomlength;
|
||||||
|
side_multi=-1;
|
||||||
|
|
||||||
Wagon tmpr = Wagon(maxid++,NUMPIXELS,&strip, height, side_startpos, _randomlength, side_multi*random(map(_randomlength,3,20,5,10), map(_randomlength,3,20, 5,40))/10.0 , 0 , 5.0 , Wheel((uint8_t)random(0,255))); //spawn new wagon
|
Wagon tmpr = Wagon(maxid++,NUMPIXELS,&strip, height, side_startpos, _randomlength, side_multi*random(map(_randomlength,3,20,5,10), map(_randomlength,3,20, 5,40))/10.0 , 0 , 5.0 , Wheel((uint8_t)random(0,255))); //spawn new wagon
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
#define WAGONLENGTH 3
|
#define WAGONLENGTH 3
|
||||||
|
|
||||||
//#define EDGE_KILL
|
#define EDGE_KILL
|
||||||
#define EDGE_WALL
|
//#define EDGE_WALL
|
||||||
//#define EDGE_BOUNCE
|
//#define EDGE_BOUNCE
|
||||||
//#define EDGE_WRAP
|
//#define EDGE_WRAP
|
||||||
#define WRAPLEDENDPOS _numpixels //default
|
#define WRAPLEDENDPOS _numpixels //default
|
||||||
|
|
Loading…
Reference in New Issue