![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
demo versie 16/05
Dependencies: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
Diff: LEDDriver.cpp
- Revision:
- 59:f0ddd28b1766
- Parent:
- 58:4e06cfb6d010
- Child:
- 60:ff86ce40112a
--- a/LEDDriver.cpp Wed May 09 13:34:15 2018 +0000 +++ b/LEDDriver.cpp Wed May 09 13:41:04 2018 +0000 @@ -4,6 +4,7 @@ this->queue=queue; initArrays(); currentLocation=0; + static DigitalOut tempLeds[]={new DigitalOut(p12),new DigitalOut(p11),new DigitalOut(p13),new DigitalOut(p14),new DigitalOut(p15),new DigitalOut(p16),new DigitalOut(p17),new DigitalOut(p18)}; } void LEDDriver::drive(int numberOfLeds) @@ -48,21 +49,17 @@ int tempCodedMessage3[25]={1,1,1,1,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,1,0,1}; int tempCodedMessage4[25]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int tempMessageList[8]={4,4,4,4,4,4,4,4}; - DigitalOut *tempLeds[]={new DigitalOut(p23),new DigitalOut(p11),new DigitalOut(p12),new DigitalOut(p13),new DigitalOut(p14),new DigitalOut(p15),new DigitalOut(p16),new DigitalOut(p17)}; - printf("Arrays created.\r\n"); + DigitalOut *tempLeds[]={new DigitalOut(p12),new DigitalOut(p11),new DigitalOut(p13),new DigitalOut(p14),new DigitalOut(p15),new DigitalOut(p16),new DigitalOut(p17),new DigitalOut(p18)}; memcpy(codedMessage0,tempCodedMessage0,sizeof(codedMessage0)); memcpy(codedMessage1,tempCodedMessage1,sizeof(codedMessage1)); memcpy(codedMessage2,tempCodedMessage2,sizeof(codedMessage2)); memcpy(codedMessage3,tempCodedMessage3,sizeof(codedMessage3)); memcpy(codedMessage4,tempCodedMessage4,sizeof(codedMessage4)); - printf("First 5 arrays copied.\r\n"); memcpy(messageList,tempMessageList,sizeof(messageList)); - printf("messageList array copied.\r\n"); memcpy(leds,tempLeds,sizeof(leds)); - printf("LEDS array copied.\r\n"); } void LEDDriver::setLEDS(int j){ @@ -91,4 +88,5 @@ } } + //TODO destructor \ No newline at end of file