Dependencies:   BLE_API mbed nRF51822

Fork of nRF51822_SimpleChat by Cristi Stoican

Revision:
3:b6e4e5529a52
Child:
6:832162614a19
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ProcessInterface.cpp	Mon May 08 13:05:45 2017 +0000
@@ -0,0 +1,40 @@
+#include "ProcessInterface.hpp"
+
+ProcessInterface::ProcessInterface() : Output(0), cmd(0) {
+	this->Ctrl = 0;
+}
+
+void ProcessInterface::attachController(Controller *_Ctrl) {
+	Ctrl = _Ctrl;
+}
+
+void ProcessInterface::attachBTDevice(BTDevice *_Btd) {
+	Btd = _Btd;
+}
+
+void ProcessInterface::getProcOutput() {
+	Output = input.read();
+}
+
+void ProcessInterface::exportOutput() {
+	Ctrl->updateOut(Output);
+	Btd->updateOut(Output);
+}
+
+void ProcessInterface::updateCmd() {
+	cmd = Ctrl->getCmd();
+}
+
+void ProcessInterface::updateCmd(float _cmd) {
+	cmd =_cmd;
+}
+
+void ProcessInterface::applyCmd() {}
+
+
+ProcessInterface::~ProcessInterface() {
+	delete Ctrl;
+	delete Btd;
+}
+
+