This is an alternative way to control which channel is active. is saves only the channels that are active in a vector.
Fork of programmingtest by
Communication.cpp@0:5ab9f1abaf4d, 2016-02-28 (annotated)
- Committer:
- Jamess
- Date:
- Sun Feb 28 15:54:13 2016 +0000
- Revision:
- 0:5ab9f1abaf4d
An alternative way to control which channels are active;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jamess | 0:5ab9f1abaf4d | 1 | #include "mbed.h" |
Jamess | 0:5ab9f1abaf4d | 2 | #include "Canal.h" |
Jamess | 0:5ab9f1abaf4d | 3 | |
Jamess | 0:5ab9f1abaf4d | 4 | |
Jamess | 0:5ab9f1abaf4d | 5 | void sendActivityState(Serial* serialPort,vector<uint32_t> activeChannel){ |
Jamess | 0:5ab9f1abaf4d | 6 | |
Jamess | 0:5ab9f1abaf4d | 7 | serialPort->printf("the following channel are active"); |
Jamess | 0:5ab9f1abaf4d | 8 | |
Jamess | 0:5ab9f1abaf4d | 9 | for(uint32_t count = 0; count<activeChannel.size();count++){ |
Jamess | 0:5ab9f1abaf4d | 10 | |
Jamess | 0:5ab9f1abaf4d | 11 | |
Jamess | 0:5ab9f1abaf4d | 12 | serialPort->printf("%d\t",activeChannel[count]); |
Jamess | 0:5ab9f1abaf4d | 13 | } |
Jamess | 0:5ab9f1abaf4d | 14 | |
Jamess | 0:5ab9f1abaf4d | 15 | |
Jamess | 0:5ab9f1abaf4d | 16 | |
Jamess | 0:5ab9f1abaf4d | 17 | } |