mbed Weather Platform firmware http://mbed.org/users/okini3939/notebook/mbed-weather-platform-firmware/
Dependencies: EthernetNetIf SDHCFileSystem I2CLEDDisp Agentbed NTPClient_NetServices mbed BMP085 HTTPClient ConfigFile I2CLCD
Diff: main.cpp
- Revision:
- 19:69b77f9e0446
- Parent:
- 18:9286e5010c14
--- a/main.cpp Tue May 31 15:40:14 2011 +0000 +++ b/main.cpp Fri Jun 03 15:38:22 2011 +0000 @@ -146,7 +146,9 @@ // timer for (i = 0; i < TIMER_NUM; i ++) { - if (sensor.timer_flg[i] && sensor.timer_cnt[i]) sensor.timer_cnt[i] --; + if (sensor.timer_flg[i] && sensor.timer_cnt[i] < sensor.timer_set[i]) { + sensor.timer_cnt[i] ++; + } } // uptime locUpTime = locUpTime + 10; @@ -295,8 +297,8 @@ ledflg = 0; strcpy(ledbuf, VERSION); + init(); ticker.attach(&isr_timer, 0.1); // Interrupt 10Hz - init(); pc.printf("%s\r\n\r\n", VERSION); if (conf.filetype) {