Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Detector.cpp
- Committer:
- jasminealice
- Date:
- 2018-06-13
- Revision:
- 22:c024b20a0e2d
- Parent:
- 21:31647d80614f
- Child:
- 23:bb57966cb776
File content as of revision 22:c024b20a0e2d:
#include "Detector.h"
Detector::Detector(bool setValue)
{
for(int i = 0; i < 14; i++)
detector[i] = setValue;
}
Detector::~Detector(){
//dtor
}
bool Detector::checkReservation(int number){
if(detector[number])
return true;
return false;
}
void Detector::reserveDetector(int area[]){
for(int i = 0; i<sizeof(area); i++){
detector[area[i]] = true;
}
}
void Detector::clearReservation(int area[]){
for(int i = 0; i<sizeof(area); i++){
detector[area[i]] = false;
}
}
