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
Controler.cpp
- Committer:
- Jamess
- Date:
- 2016-02-28
- Revision:
- 0:5ab9f1abaf4d
File content as of revision 0:5ab9f1abaf4d:
#include "Controler.h" std::vector<uint32_t> checkActivity(Canal newChannel[]){ vector<uint32_t> activeChannelVector; for(int count = 1; count<30;count++){ if(newChannel[count].getState() == 0){ //the chanel is not active }else if(newChannel[count].getState() == 1){ //the chanel is active activeChannelVector.push_back(count); }else{ //error here } } return activeChannelVector; }