Revision 1138
Fixed synchronization
Tested robustness
main.c | ||
---|---|---|
104 | 104 |
orbs_set (0, 0, 0, 0, 0, 255); delay_ms (500); |
105 | 105 |
} |
106 | 106 |
|
107 |
if (false) |
|
108 |
{ |
|
109 |
orb_set (1,1,1); |
|
110 |
while (1) |
|
111 |
{ |
|
112 |
SYNC |
|
113 |
{ |
|
114 |
for (uint8_t m=0; m<100; ++m) |
|
115 |
{ |
|
116 |
_delay_us(10); |
|
117 |
} |
|
118 |
} |
|
119 |
} |
|
120 |
} |
|
121 |
|
|
107 | 122 |
if (true) |
108 | 123 |
{ |
124 |
while (1) |
|
125 |
{ |
|
126 |
for (uint8_t x=0; x<255; ++x) |
|
127 |
{ |
|
128 |
orbs_set (x, 1, 2, 3, 4, 5); |
|
129 |
|
|
130 |
for (uint8_t n=0; n<80; ++n) |
|
131 |
{ |
|
132 |
SYNC |
|
133 |
{ for (uint8_t m=0; m<1; ++m) _delay_us(50); } |
|
134 |
} |
|
135 |
} |
|
136 |
|
|
137 |
for (uint8_t x=255; x>0; --x) |
|
138 |
{ |
|
139 |
orbs_set (x, 1, 1, 1, 1, 1); |
|
140 |
delay_ms (4); |
|
141 |
} |
|
142 |
} |
|
143 |
} |
|
144 |
|
|
145 |
if (true) |
|
146 |
{ |
|
109 | 147 |
if (!button2_read ()) |
110 | 148 |
{ |
111 | 149 |
orb_set_mode (orb_mode_pwm); |
Also available in: Unified diff