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/main.cpp
- Revision:
- 70:7427f4959201
- Parent:
- 67:49f266601d83
- Child:
- 71:34856d21f2bf
--- a/src/main.cpp Fri Sep 16 15:30:47 2016 +0000 +++ b/src/main.cpp Fri Sep 16 17:54:51 2016 +0000 @@ -58,9 +58,9 @@ *****************************************************************************/ static void banner( void ) { - int iyr=0, imo=0, idy=0, ihr=0, imn=0, isc=0; + //int iyr=0, imo=0, idy=0, ihr=0, imn=0, isc=0; - rtc_get_time(&iyr, &imo, &idy, &ihr, &imn, &isc); + //rtc_get_time(&iyr, &imo, &idy, &ihr, &imn, &isc); printf("\n\n\r\nWelcome to Project: ICE v0.0.35\n"); printf("\rThe Intelligent Connected Experience\n"); @@ -73,7 +73,7 @@ printf("\r\t _| |_ | |____ | |____ \n"); printf("\r\t |_____| \\_____| |______|\n"); - printf("\r\nCurrent time is: %04d-%02d-%02d %02d:%02d:%02d\r\n", iyr, imo, idy, ihr, imn, isc); + //printf("\r\nCurrent time is: %04d-%02d-%02d %02d:%02d:%02d\r\n", iyr, imo, idy, ihr, imn, isc); printf("\r\n\r\n\r\r\n"); } @@ -88,9 +88,9 @@ int main( void ) { mDot *dot; - struct tm rtc_time; - time_t curr_sec; - int year=0; + //struct tm rtc_time; + //time_t curr_sec; + //int year=0; // singleton object instatiation GLOBAL_mdot = dot = mDot::getInstance(); @@ -98,13 +98,14 @@ i2c = &i2c_instance; - rtc_init(); - + //rtc_init(); +#if 0 rtc_get_time(&year, &rtc_time.tm_mon, &rtc_time.tm_mday, &rtc_time.tm_hour, &rtc_time.tm_min, &rtc_time.tm_sec); rtc_time.tm_mon = rtc_time.tm_mon - 1; rtc_time.tm_year = year - 1900; curr_sec = mktime( &rtc_time ); - set_time(curr_sec); +#endif + set_time(0); // for signaling from the configuration handler mainThreadId = osThreadGetId(); @@ -114,8 +115,8 @@ // start the configuration handler Thread configHandler_thread(ConfigurationHandler, NULL, osPriorityNormal, 3072, NULL); - - Thread outputTask_thread(OutputTask, NULL, osPriorityNormal, 3072, NULL); + Thread outputTask_thread(OutputTask, NULL, osPriorityNormal, (1024*4), NULL); + Thread controlTask_thread(ControlTask); // wait for the configuration handler to signal us