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: TextLCD MbedJSONValue libMotiv picojson mbed-rtos mbed
Fork of Mbed_MotiVControllerBox by
Diff: libMotiv/Controller.cpp
- Revision:
- 6:32e6f0048bf1
- Parent:
- 5:e22a1ae893d2
--- a/libMotiv/Controller.cpp Tue Jan 06 22:18:27 2015 +0000
+++ b/libMotiv/Controller.cpp Tue Jan 06 22:41:10 2015 +0000
@@ -6,6 +6,7 @@
#include "Table.h"
#include "Flower.h"
#include "picojson.h"
+#include "MbedJSONValue.h"
#include "MotiVAPI.h"
#include "EthernetInterface.h"
#include "HTTPClient.h"
@@ -232,12 +233,13 @@
void Controller::initTables()
{
printf("initTables\r\n");
- picojson::array allTables = mAPI->getTablesAll().get("tables").get<picojson::array>();
- printf("get first table\r\n");
- picojson::value table = (picojson::value)allTables.begin();
- int tableId = table.get("id");
- printf("First table id is %d\r\n", tableId);
- //for (picojson::array::iterator iter = list.begin(); iter != list.end(); ++iter) {
+ MbedJSONValue allTables = mAPI->getTablesAll();
+// .get("tables").get<picojson::array>();
+ //printf("get first table\r\n");
+// picojson::value table = (picojson::value)allTables.begin();
+// int tableId = table.get("id");
+// printf("First table id is %d\r\n", tableId);
+// //for (picojson::array::iterator iter = list.begin(); iter != list.end(); ++iter) {
// printf("menu item value =%s\r\n", (*iter).get("v").get<string>().c_str());
// }
}
