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:
- davidjhoward
- Date:
- 2016-09-19
- Revision:
- 78:5a2e019036a4
- Parent:
- 51:66b820f203a5
- Child:
- 97:5cf6ab71dcd0
File content as of revision 78:5a2e019036a4:
#include "ControlTask.h"
#include <stdio.h>
#include "rtos.h"
#include "ConfigurationHandler.h"
#include "CloudDataLoggerApi.h"
#include "MTSLog.h"
/*****************************************************************************
* Function: ControlTask()
* Description: show the controls
*
* @param msg
* @return none
*****************************************************************************/
void ControlTask(void const *args)
{
std::string log_string;
bool status;
printf("\r%s has started...\n", __func__);
while ( true ) {
// 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();
}
}
log_string = "this is a log message";
status = CloudDataLoggerApi( &log_string );
// TODO: service the manual controls
Thread::wait(2500);
}
}
