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
Diff: src/ConfigurationHandler/Controls/TimerControl.cpp
- Revision:
- 205:3c84af5f711f
- Parent:
- 192:052a419837fa
- Child:
- 242:3b0086a6d625
diff -r d6011a00bfb8 -r 3c84af5f711f src/ConfigurationHandler/Controls/TimerControl.cpp
--- a/src/ConfigurationHandler/Controls/TimerControl.cpp Fri Oct 07 14:47:39 2016 +0000
+++ b/src/ConfigurationHandler/Controls/TimerControl.cpp Fri Oct 07 17:41:23 2016 +0000
@@ -9,6 +9,8 @@
#include "MbedJSONValue.h"
#include "global.h"
#include <string>
+#include <iostream>
+#include <iomanip>
extern mDot *GLOBAL_mdot;
@@ -230,13 +232,16 @@
"DISABLED"
};
- printf("\r controlFile : %s \n", controlFile.c_str());
- printf("\r id : %s \n", id.c_str());
- printf("\r output : %s \n", output.c_str());
- printf("\r priority : %d \n", priority);
- printf("\r start time : %lu \n", startTime);
- printf("\r duration : %u \n", duration);
- printf("\r end time : %lu \n", startTime + duration);
- printf("\r expires in : %lu sec \n", (startTime + duration) - time(NULL));
- printf("\r current State : %s\r\n\r\n", mapper[currentState].c_str());
+ printf("\r\n");
+ cout << left << setw(10) << setfill(' ') << "timer:";
+ cout << left << setw(32) << setfill(' ') << controlFile;
+ cout << left << setw(20) << setfill(' ') << id;
+ cout << left << setw(20) << setfill(' ') << output;
+ cout << "pri:" << left << setw(12) << setfill(' ') << priority;
+ cout << "start:" << left << setw(12) << setfill(' ') << startTime;
+ cout << "duration: " << left << setw(12) << setfill(' ') << duration;
+ cout << "end: " << left << setw(12) << setfill(' ') << startTime + duration;
+ cout << "remaining: " << left << setw(12) << setfill(' ') << startTime + duration - time(NULL);
+ cout << left << setw(12) << setfill(' ') << mapper[currentState];
+ cout.flush();
}
\ No newline at end of file
