Rev 584 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 584 | Rev 810 | ||
|---|---|---|---|
| Line 282... | Line 282... | ||
| 282 | } |
282 | } |
| 283 | destColor.Intens = rxMsg.Data.bytes[2]; |
283 | destColor.Intens = rxMsg.Data.bytes[2]; |
| 284 | if (rxMsg.Data.bytes[3] != 0){ |
284 | if (rxMsg.Data.bytes[3] != 0){ |
| 285 | dimSpeed = rxMsg.Data.bytes[3]; |
285 | dimSpeed = rxMsg.Data.bytes[3]; |
| 286 | } |
286 | } |
| 287 | currProgram = rxMsg.Data.bytes[1]; |
- | |
| 288 | temp_adress = pgm_read_word(&programs[currProgram-1]); |
- | |
| 289 | } else if( rxMsg.Data.bytes[0] == RGBLED_CMD_SETRGB) { |
287 | } else if( rxMsg.Data.bytes[0] == RGBLED_CMD_SETRGB) { |
| 290 | /* Set RGB-triplet! */ |
288 | /* Set RGB-triplet! */ |
| 291 | reformatRGB(rxMsg.Data.bytes[2],rxMsg.Data.bytes[3],rxMsg.Data.bytes[4],0); |
289 | reformatRGB(rxMsg.Data.bytes[2],rxMsg.Data.bytes[3],rxMsg.Data.bytes[4],0); |
| 292 | if (rxMsg.Data.bytes[5] != 0){ |
290 | if (rxMsg.Data.bytes[5] != 0){ |
| 293 | destColor.Intens = rxMsg.Data.bytes[5]; |
291 | destColor.Intens = rxMsg.Data.bytes[5]; |
| Line 328... | Line 326... | ||
| 328 | tempcontainer = currColor.R * currColor.Intens / 0xff; //I really want to skip this, don't know how yet though. |
326 | tempcontainer = currColor.R * currColor.Intens / 0xff; //I really want to skip this, don't know how yet though. |
| 329 | OCR1A = tempcontainer; |
327 | OCR1A = tempcontainer; |
| 330 | OCR0A = currColor.G * currColor.Intens / 0xff; |
328 | OCR0A = currColor.G * currColor.Intens / 0xff; |
| 331 | OCR0B = currColor.B * currColor.Intens / 0xff; |
329 | OCR0B = currColor.B * currColor.Intens / 0xff; |
| 332 | 330 | ||
| 333 | // |
331 | //Just for debug |
| 334 | Can_Message_t txMsg; |
332 | Can_Message_t txMsg; |
| 335 | txMsg.Id = 0x55; |
333 | txMsg.Id = 0x55; |
| 336 | txMsg.RemoteFlag = 0; |
334 | txMsg.RemoteFlag = 0; |
| 337 | txMsg.ExtendedFlag = 1; |
335 | txMsg.ExtendedFlag = 1; |
| 338 | txMsg.DataLength = 4; |
336 | txMsg.DataLength = 4; |