Compare commits
No commits in common. "aee03524221e30a4b0c3f6ef34c176df8258d175" and "5f2beca1d0452d8388370e0bcc97698d04db637b" have entirely different histories.
aee0352422
...
5f2beca1d0
|
@ -31,7 +31,7 @@ D3 - _clear
|
||||||
#define PIN_CLEAR 12 //connects CLEAR Pin from Annax board to GND (clears column)
|
#define PIN_CLEAR 12 //connects CLEAR Pin from Annax board to GND (clears column)
|
||||||
|
|
||||||
|
|
||||||
#define COLUMNBYTES 19 //4 columns per byte. one panel has 25 columns. (int)((numpanels*25)/4+1)
|
#define COLUMNBYTES 13 //4 columns per byte. one panel has 25 columns. (int)((numpanels*25)/4+1)
|
||||||
|
|
||||||
|
|
||||||
//### Timings ###
|
//### Timings ###
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "flipdot.h"
|
#include "flipdot.h"
|
||||||
|
|
||||||
|
|
||||||
#define COLUMNS 75
|
#define COLUMNS 50
|
||||||
#define ROWS 16
|
#define ROWS 16
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ void Image::init()
|
||||||
|
|
||||||
flag_updating=false;
|
flag_updating=false;
|
||||||
update_counter=0;
|
update_counter=0;
|
||||||
updateDelay=10;
|
updateDelay=5;
|
||||||
|
|
||||||
resetOrder(true);
|
resetOrder(true);
|
||||||
}
|
}
|
||||||
|
@ -66,11 +66,7 @@ void Image::setBuffer_random(uint8_t randomness)
|
||||||
|
|
||||||
void Image::resetOrder(bool ascending) {
|
void Image::resetOrder(bool ascending) {
|
||||||
for (uint8_t i=0;i<getW();i++) { //fill with ascending numbers
|
for (uint8_t i=0;i<getW();i++) { //fill with ascending numbers
|
||||||
if (ascending) {
|
orderArray[i]=(getW()-1)*!ascending - i;
|
||||||
orderArray[i]=i;
|
|
||||||
}else{
|
|
||||||
orderArray[i]=(getW()-1) - i;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,6 +100,10 @@ UpdateReturn Image::updateByColumn(bool clearFirst, bool optimizeClear, bool opt
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long functionStartMillis=millis();
|
unsigned long functionStartMillis=millis();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t x=update_counter/2;
|
uint8_t x=update_counter/2;
|
||||||
|
|
|
@ -42,7 +42,7 @@ void loop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UpdateReturn result=flip.updateByColumn(true,true,true); //0=not finished, 1=finished
|
UpdateReturn result=flip.updateByColumn(true,true,true,true); //0=not finished, 1=finished
|
||||||
if (result == finished) //just finished
|
if (result == finished) //just finished
|
||||||
{
|
{
|
||||||
unsigned long duration=millis()-last_change;
|
unsigned long duration=millis()-last_change;
|
||||||
|
@ -50,7 +50,7 @@ void loop() {
|
||||||
Serial.print("Update max took "); Serial.print(flip.updateDuration); Serial.println(" ms");
|
Serial.print("Update max took "); Serial.print(flip.updateDuration); Serial.println(" ms");
|
||||||
flip.updateDuration=0; //reset
|
flip.updateDuration=0; //reset
|
||||||
|
|
||||||
//flip.shuffleOrder(1);
|
flip.shuffleOrder(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue