Wagner Sartori Junior avatar Wagner Sartori Junior committed 479993f

- não utilizar mais getShadowRam até corrigir o BUG

Comments (0)

Files changed (1)

HT1632C/HT1632C.cpp

 
 HT1632C::HT1632C()
 {
-	byte     shadowRam[63][CHIP_MAX-1] = {0};	// our copy of the display's RAM
-	byte snapShadowRam[63][CHIP_MAX-1] = {0};	// our copy of the shadowram
+	byte     shadowRam[64][CHIP_MAX-1] = {0};	// our copy of the display's RAM
+	byte snapShadowRam[64][CHIP_MAX-1] = {0};	// our copy of the shadowram
 }
 
 HT1632C ledMatrix=HT1632C();
   y = y % 8;
   addr = (x<<1) + (y>>2);
 
-  if ((shadowRam[addr][nChip-1] & bitval) && (shadowRam[addr+32][nChip-1] & bitval)) {
+  if ((0 != (shadowRam[addr][nChip-1] & bitval)) && (0 != (shadowRam[addr+32][nChip-1] & bitval))) {
     return ORANGE;
-  } else if (shadowRam[addr][nChip-1] & bitval) {
+  } else if (0 != (shadowRam[addr][nChip-1] & bitval)) {
     return GREEN;
-  } else if (shadowRam[addr+32][nChip-1] & bitval) {
+  } else if (0 != (shadowRam[addr+32][nChip-1] & bitval)) {
     return RED;
   } else {
     return BLACK;
 	byte nChip;
 
 	//TODO: Arrumar essa função getShadowRam
-	byte prev_color = HT1632C::getShadowRam(x,y);
-	//byte prev_color = 4;
+	//byte prev_color = HT1632C::getShadowRam(x,y);
+	byte prev_color = 255;
 
 	// The 4 bits in a single memory word go DOWN, with the LSB
 	// (first transmitted) bit being on top.  However, writebits()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.