aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_halfcab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_halfcab.c')
-rw-r--r--src/c_halfcab.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/c_halfcab.c b/src/c_halfcab.c
index c6a7e81..68cd7d6 100644
--- a/src/c_halfcab.c
+++ b/src/c_halfcab.c
@@ -143,20 +143,16 @@ main
}
if (argc < 4) {
com[0] = 0xfe;
+ com[1] = 0x00;
+ com[2] = 0xaa;
+ com[3] = 0xaa;
i = 0;
while (i < NUM_LEDS * 3) {
- leds[i + 0] = 0x00;
- leds[i + 1] = 0xff;
- leds[i + 2] = 0x00;
- leds[i + 3] = 0xff;
- leds[i + 4] = 0x00;
- leds[i + 5] = 0x00;
-/* memset(leds + i, *com + 1, 3 * sizeof(unsigned char)); */
- i += 6;
+ memcpy(leds + i, com + 1, 3 * sizeof(unsigned char));
+ i += 3;
}
write(fd, &com, 1 * sizeof(unsigned char));
- (void)leds;
-/* write(fd, &leds, (NUM_LEDS * 3) * sizeof(unsigned char)); */
+ write(fd, &leds, (NUM_LEDS * 3) * sizeof(unsigned char));
} else {
com[0] = 0xff;
i = 1;