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@192:052a419837fa, 2016-10-06 (annotated)
- Committer:
- jmarkel44
- Date:
- Thu Oct 06 15:36:26 2016 +0000
- Revision:
- 192:052a419837fa
- Parent:
- 185:5ac6ab1ed875
- Child:
- 212:289f63158d2b
inclusion of .hasMember
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jmarkel44 | 192:052a419837fa | 1 | /****************************************************************************** |
| jmarkel44 | 192:052a419837fa | 2 | * |
| jmarkel44 | 192:052a419837fa | 3 | * File: Control.cpp |
| jmarkel44 | 192:052a419837fa | 4 | * Desciption: ICE Control Class implementation for Output Thread |
| jmarkel44 | 192:052a419837fa | 5 | * |
| jmarkel44 | 192:052a419837fa | 6 | *****************************************************************************/ |
| jmarkel44 | 185:5ac6ab1ed875 | 7 | #include <Control.h> |
| jmarkel44 | 185:5ac6ab1ed875 | 8 | |
| jmarkel44 | 192:052a419837fa | 9 | int Control::getMappedState(void) const |
| jmarkel44 | 185:5ac6ab1ed875 | 10 | { |
| jmarkel44 | 185:5ac6ab1ed875 | 11 | switch (controlType) { |
| jmarkel44 | 185:5ac6ab1ed875 | 12 | case CONTROL_TIMER: |
| jmarkel44 | 185:5ac6ab1ed875 | 13 | case CONTROL_SETPOINT: |
| jmarkel44 | 185:5ac6ab1ed875 | 14 | return (state) ? RELAY_STATUS_AUTO_ON : RELAY_STATUS_AUTO_OFF; |
| jmarkel44 | 185:5ac6ab1ed875 | 15 | case CONTROL_MANUAL: |
| jmarkel44 | 185:5ac6ab1ed875 | 16 | return (state) ? RELAY_STATUS_MANUAL_ON : RELAY_STATUS_MANUAL_OFF; |
| jmarkel44 | 185:5ac6ab1ed875 | 17 | case CONTROL_COMPOSITE: |
| jmarkel44 | 192:052a419837fa | 18 | case CONTROL_PID: |
| jmarkel44 | 185:5ac6ab1ed875 | 19 | default: |
| jmarkel44 | 192:052a419837fa | 20 | return -1; |
| jmarkel44 | 185:5ac6ab1ed875 | 21 | } |
| jmarkel44 | 185:5ac6ab1ed875 | 22 | } |
