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/ControlTask/ControlTask.cpp@51:66b820f203a5, 2016-09-13 (annotated)
- Committer:
- jmarkel44
- Date:
- Tue Sep 13 21:29:24 2016 +0000
- Revision:
- 51:66b820f203a5
- Parent:
- 48:1c7861d80d16
- Child:
- 78:5a2e019036a4
committing;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jmarkel44 | 20:653923c2f37a | 1 | #include "ControlTask.h" |
| jmarkel44 | 20:653923c2f37a | 2 | #include <stdio.h> |
| jmarkel44 | 20:653923c2f37a | 3 | #include "rtos.h" |
| jmarkel44 | 46:4cb96ab2d1c8 | 4 | #include "ConfigurationHandler.h" |
| jmarkel44 | 46:4cb96ab2d1c8 | 5 | #include "MTSLog.h" |
| jmarkel44 | 20:653923c2f37a | 6 | |
| jmarkel44 | 46:4cb96ab2d1c8 | 7 | /***************************************************************************** |
| jmarkel44 | 46:4cb96ab2d1c8 | 8 | * Function: ControlTask() |
| jmarkel44 | 46:4cb96ab2d1c8 | 9 | * Description: show the controls |
| jmarkel44 | 46:4cb96ab2d1c8 | 10 | * |
| jmarkel44 | 46:4cb96ab2d1c8 | 11 | * @param msg |
| jmarkel44 | 46:4cb96ab2d1c8 | 12 | * @return none |
| jmarkel44 | 46:4cb96ab2d1c8 | 13 | *****************************************************************************/ |
| jmarkel44 | 20:653923c2f37a | 14 | void ControlTask(void const *args) |
| jmarkel44 | 20:653923c2f37a | 15 | { |
| jmarkel44 | 20:653923c2f37a | 16 | printf("\r%s has started...\n", __func__); |
| jmarkel44 | 20:653923c2f37a | 17 | |
| jmarkel44 | 20:653923c2f37a | 18 | while ( true ) { |
| jmarkel44 | 46:4cb96ab2d1c8 | 19 | // service the setpoint controls |
| jmarkel44 | 46:4cb96ab2d1c8 | 20 | if ( !setpointTable.empty() ) { |
| jmarkel44 | 46:4cb96ab2d1c8 | 21 | StringSetpointMap::iterator pos; |
| jmarkel44 | 46:4cb96ab2d1c8 | 22 | for ( pos = setpointTable.begin(); pos != setpointTable.end(); ++pos ) { |
| jmarkel44 | 51:66b820f203a5 | 23 | pos->second->update(); |
| jmarkel44 | 46:4cb96ab2d1c8 | 24 | } |
| jmarkel44 | 46:4cb96ab2d1c8 | 25 | } |
| jmarkel44 | 46:4cb96ab2d1c8 | 26 | // service the timer controls |
| jmarkel44 | 46:4cb96ab2d1c8 | 27 | if ( !timerTable.empty() ) { |
| jmarkel44 | 46:4cb96ab2d1c8 | 28 | StringTimerMap::iterator pos; |
| jmarkel44 | 46:4cb96ab2d1c8 | 29 | for ( pos = timerTable.begin(); pos != timerTable.end(); ++pos ) { |
| jmarkel44 | 51:66b820f203a5 | 30 | //pos->second->update(); |
| jmarkel44 | 46:4cb96ab2d1c8 | 31 | } |
| jmarkel44 | 46:4cb96ab2d1c8 | 32 | } |
| jmarkel44 | 51:66b820f203a5 | 33 | |
| jmarkel44 | 51:66b820f203a5 | 34 | // TODO: service the manual controls |
| jmarkel44 | 51:66b820f203a5 | 35 | Thread::wait(2500); |
| jmarkel44 | 20:653923c2f37a | 36 | } |
| jmarkel44 | 51:66b820f203a5 | 37 | } |
