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
- Committer:
- jmarkel44
- Date:
- 2016-09-27
- Revision:
- 132:45821e189dd0
- Parent:
- 131:a290a3934132
- Child:
- 156:44f87c5a83ae
File content as of revision 132:45821e189dd0:
#include "ControlTask.h"
#include <stdio.h>
#include "rtos.h"
#include "ConfigurationHandler.h"
#include "MTSLog.h"
/*****************************************************************************
* Function: ControlTask()
* Description: This task will loop through all of the configured
* controls
*
* @param msg
* @return none
*****************************************************************************/
void ControlTask(void const *args)
{
printf("\r%s has started...\n", __func__);
while ( true ) {
// service the manual controls
if ( !manualTable.empty() ) {
StringManualMap::iterator pos;
for ( pos = manualTable.begin(); pos != manualTable.end(); ++pos ) {
pos->second->update();
}
}
// service the setpoint controls
if ( !setpointTable.empty() ) {
StringSetpointMap::iterator pos;
for ( pos = setpointTable.begin(); pos != setpointTable.end(); ++pos ) {
pos->second->update();
}
}
// service the timer controls
if ( !timerTable.empty() ) {
StringTimerMap::iterator pos;
for ( pos = timerTable.begin(); pos != timerTable.end(); ++pos ) {
pos->second->update();
}
}
Thread::wait(1000); // do we need to wait?
}
}
