yet another 18B20 Temperature sensor. variable number of sensors working in parasite mode, serial 16x2 display with diagnostic output and post to a rest web service
Dependencies: EthernetInterface HTTPClient NTPClient mbed-rtos mbed
ntp_proxy.cpp@1:9e88b2508768, 2013-01-03 (annotated)
- Committer:
- wkinkeldei
- Date:
- Thu Jan 03 18:50:43 2013 +0000
- Revision:
- 1:9e88b2508768
- Parent:
- 0:53f05303850a
added switch sensor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wkinkeldei | 0:53f05303850a | 1 | #include "ntp_proxy.h" |
wkinkeldei | 0:53f05303850a | 2 | |
wkinkeldei | 1:9e88b2508768 | 3 | NtpProxy::NtpProxy(const char * timeserver) : timeserver(timeserver) { |
wkinkeldei | 0:53f05303850a | 4 | ntp_client = new NTPClient(); |
wkinkeldei | 0:53f05303850a | 5 | } |
wkinkeldei | 0:53f05303850a | 6 | |
wkinkeldei | 0:53f05303850a | 7 | int NtpProxy::set_time(void) { |
wkinkeldei | 1:9e88b2508768 | 8 | NTPResult r = ntp_client->setTime(timeserver); |
wkinkeldei | 0:53f05303850a | 9 | return r == NTP_OK; |
wkinkeldei | 0:53f05303850a | 10 | } |