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: C027 C12832 EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed
Revision 85:9fdd9198001c, committed 2014-03-06
- Comitter:
- ansond
- Date:
- Thu Mar 06 17:09:38 2014 +0000
- Parent:
- 84:a50f8d0ec197
- Child:
- 86:2f9b9e0c7639
- Commit message:
- updates
Changed in this revision
| Definitions.h | Show annotated file Show diff for this revision Revisions of this file |
| MBEDEndpoint.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Definitions.h Thu Mar 06 06:00:31 2014 +0000 +++ b/Definitions.h Thu Mar 06 17:09:38 2014 +0000 @@ -45,6 +45,11 @@ #define ENDPOINT_LOCATION "Las Vegas Country Club" // Where this light/endpoint lives #define ENDPOINT_GPS_COORDS "-115.143470 36.131916" // golf course -115.143470 36.131916 +// MBED doesnt have a good notion of time - so we code it here +#define ENDPOINT_STARTTIME "\"STARTDATETIME\":\"2014-03-5T22:03:06.973Z\"," +#define ENDPOINT_STOPTIME "\"ENDDATETIME\":\"2015-02-27T03:35:55.940Z\"," +#define ENDPOINT_TIMEZONE "\"TIMEZONEOFFSET\":\"-7:00\"" + // Keyword Definitions for MQTT packets #define IOC_REQUEST_LOAD_ALL_VERB "load" #define IOC_REQUEST_UPDATE_ALL_VERB "update"
--- a/MBEDEndpoint.cpp Thu Mar 06 06:00:31 2014 +0000
+++ b/MBEDEndpoint.cpp Thu Mar 06 17:09:38 2014 +0000
@@ -312,17 +312,17 @@
}
// Special Case: STARTDATETIME
- strcat(data,"\"STARTDATETIME\":\"2014-02-27T22:03:06.973Z\",");
+ strcat(data,ENDPOINT_STARTTIME);
// Special Case: ENDDATETIME
- strcat(data,"\"ENDDATETIME\":\"2015-02-27T03:35:55.940Z\",");
+ strcat(data,ENDPOINT_STOPTIME);
// Special Case: NAME
sprintf(tmp,"\"NAME\":\"%s\",",light->getName());
strcat(data,tmp);
// Special Case: TIMEZONEOFFSET
- strcat(data,"\"TIMEZONEOFFSET\":\"+2:00\"");
+ strcat(data,ENDPOINT_TIMEZONE);
// close
strcat(data,"}");