Machine Cloud
Diff: MachineCloud.cpp
- Revision:
- 1:f5eafb42e9e4
- Parent:
- 0:260d7796eb25
- Child:
- 2:3fb7c06efa1e
--- a/MachineCloud.cpp Fri Aug 09 19:29:51 2013 +0000 +++ b/MachineCloud.cpp Thu Aug 15 23:54:25 2013 +0000 @@ -1,20 +1,22 @@ #include <string.h> #include "MachineCloud.h" -MachineCloud::MachineCloud() { - init(0x1000); +MachineCloud::MachineCloud(char *model) { + init(model, 0x1000); } -MachineCloud::MachineCloud(uint16_t router) { - init(router); +MachineCloud::MachineCloud(char *model, uint16_t router) { + init(model, router); } -void MachineCloud::init(uint16_t router) { +void MachineCloud::init(char *model, uint16_t router) { + m_model = model; m_router = router; } int MachineCloud::connect() { m_xbee = new XBee(p9, p10); + send("model", m_model); return 0; } @@ -53,6 +55,8 @@ Tx16Request tx = Tx16Request(m_router, payload, sizeof(payload)); m_xbee->send(tx); + m_lock.unlock(); + return 0; }