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.
Diff: Channel.cpp
- Revision:
- 0:88f8e80dc5fd
- Child:
- 6:2c928a654a35
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Channel.cpp Wed Mar 19 10:29:32 2014 +0000 @@ -0,0 +1,38 @@ +#include "Channel.h" + +//Constructor & Destructor +Channel::Channel(void) +{ + amplification = 1; //standaard heeft het kanaal een gain van 1 + enable = false; //standaard staat het kanaal uitgeschakeld of disabled +} +Channel::~Channel(void) +{ +} + +//GETTERS +bool Channel::Enabled(void) +{ + return(enable); +} +int Channel::getAmplification(void) +{ + return(amplification); +} + +//SETTERS +void Channel::Enable(void) +{ + enable = true; +} +void Channel::Disable(void) +{ + enable = false; +} +void Channel::setAmplification(int newAmplification) +{ + if(newAmplification==1 || newAmplification==10 || newAmplification==100 || newAmplification==1000) + { + amplification = newAmplification; + } +} \ No newline at end of file