Max7219 Clean Up (#11563)

Some of the Rotations did not do the right thing with setting and clearing pixels.
I think it is correct now.   But if not...  It is much closer to being correct.
This commit is contained in:
Roxy-3D
2018-08-15 21:22:28 -05:00
committed by GitHub
parent 9de730b2bf
commit aae4c67e5d
3 changed files with 19 additions and 13 deletions

View File

@ -71,12 +71,18 @@ void GcodeSuite::M7219() {
}
if (parser.seen('P')) {
for (uint8_t x = 0; x < COUNT(LEDs); x++) {
for (int8_t x = 0; x < 8 * MAX7219_NUMBER_UNITS; x++) {
SERIAL_ECHOPAIR("LEDs[", x);
SERIAL_ECHOPAIR("]=", LEDs[x]);
SERIAL_EOL();
SERIAL_ECHO("]=");
for (int8_t j = 7; j >= 0; j--) {
if ( LEDs[x] & (0x01<<j) )
SERIAL_ECHO("1");
else
SERIAL_ECHO("0");
}
SERIAL_EOL();
return;
}
}
}