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.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
src/OutputTask/Control.cpp
- Committer:
- jmarkel44
- Date:
- 2016-10-06
- Revision:
- 192:052a419837fa
- Parent:
- 185:5ac6ab1ed875
- Child:
- 212:289f63158d2b
File content as of revision 192:052a419837fa:
/******************************************************************************
*
* File: Control.cpp
* Desciption: ICE Control Class implementation for Output Thread
*
*****************************************************************************/
#include <Control.h>
int Control::getMappedState(void) const
{
switch (controlType) {
case CONTROL_TIMER:
case CONTROL_SETPOINT:
return (state) ? RELAY_STATUS_AUTO_ON : RELAY_STATUS_AUTO_OFF;
case CONTROL_MANUAL:
return (state) ? RELAY_STATUS_MANUAL_ON : RELAY_STATUS_MANUAL_OFF;
case CONTROL_COMPOSITE:
case CONTROL_PID:
default:
return -1;
}
}
