{"push_id":887302013,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"92ca980d902794449ad240bc493236dcc43ccf65","before":"60cc69fa3714483c971df04cff6f46c5e37e2c5c","commits":[{"sha":"92ca980d902794449ad240bc493236dcc43ccf65","author":{"email":"82cf1ab17e51e5b276ed8ec4c1ce18e22a161267@Gmail.com","name":"JakeLardinois"},"message":"Fixed Button Press Issue Added ColorCount\n\nAdded a color count value to the BacklightColor enum so that looping is\nmade easier.\nI had an issue with this when I coded the functionality to change the\nbackground display because as soon as I changed the Background color\nfrom the default of White (which  was set in the RGBLCDShield class\nconstructor) my buttons on the LCD shield would stop working. I\ndiscovered that only the first 5 bits of the InterruptBits[0] byte\ncontained the button that was pressed.  What was happening was that when\nI changed the LCD backlight color, additional bits were being added to\nthe front of the byte and so the integer that was cast with\n(NetduinoRGBLCDShield.Button)InterruptBits[0] in my switch statement did\nnot recognize a button press...  I observed this as my UI stopping\nworking and had a LOT of difficulty troubleshooting! I added the below\ndefault to the Switch statement so that future debugging sessions would\nverify that my button events were firing, but I will still recieve a lot\nof false posotives since a single button press will also send empty\nbytes... At first I tried to shift the bits using\n(NetduinoRGBLCDShield.Button)(InterruptBits[0] >> 3) which would shift\nthe left (if InterruptBits[0] was 1000, the statement would yield 62)\nbut realized that this wasn't the proper method since I was still\nkeeping the higher order bits. The solution was to perform a bitwise AND\noperation (&) on the values using a mask that masked out the pertinant\nbits (in this case 31 or 0x1F or 11111) so that if InterruptBits[0] was\nset at 1,000 (1111101000 in binary) then an AND against 31 (11111\nbinary) would yield 8 (1111101000 AND 0000011111 = 1000)","distinct":true,"url":"https://api.github.com/repos/JakeLardinois/rgbshield4netduino/commits/92ca980d902794449ad240bc493236dcc43ccf65"}]}