Permalink
Browse files

CRT optimization.

  • Loading branch information...
fornellas committed Nov 25, 2012
1 parent 31afa8f commit 840d5255aa09b13480b06572dd3548d5e26b2af1
Showing with 5 additions and 6 deletions.
  1. +1 −3 SFRGBLEDMatrix.cpp
  2. +4 −3 SFRGBLEDMatrix.h
View
@@ -287,16 +287,14 @@ void SFRGBLEDMatrix::progressBarUpdate(Color barColor, uint16_t vaule, uint16_t
show();
}
-void SFRGBLEDMatrix::CRT(Color bgColor, Color borderColor){
+void SFRGBLEDMatrix::CRT(Color bgColor){
for(byte p=0;p<height/2-1;p++){
if(p)
box(bgColor, p-1, p-1, width-1-p+1, height-1-p+1);
- box(borderColor, p, p, width-1-p, height-1-p);
show();
}
for(byte p=height/2-1;p<width/2;p++){
box(bgColor, p-1, height/2-2-1, width-1-p+1, height/2+1+1);
- box(borderColor, p, height/2-2, width-1-p, height/2+1);
show();
}
for(byte p=height/2-2;p<height/2;p++){
View
@@ -2,6 +2,7 @@
#define SFRGBLEDMatrix_h
#include <Arduino.h>
+#include <inttypes.h>
//
// Proper wiring and coordinates
@@ -140,9 +141,9 @@ class SFRGBLEDMatrix {
void progressBarInit(Color borderColor);
void progressBarUpdate(Color barColor, uint16_t vaule, uint16_t max);
// CRT out animation
- void CRT(Color bgColor, Color borderColor);
- // Get current pixel color from buffer
- Color getPixel(int x, int y);
+ void CRT(Color bgColor);
+ // Get current pixel color from buffer
+ Color getPixel(int x, int y);
};
#endif

0 comments on commit 840d525

Please sign in to comment.