aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Communication
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-26 16:34:16 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-26 16:34:16 +0300
commit5accee4df85cc47b5700ad32090451ded2a121fa (patch)
tree11dc6229de126d5c9fc8135bfeacd88151e6ed77 /Software/Embedded_SW/Embedded/Communication
parent4ff8fc0265f11be7b73548e36c7ee3d1debfb8e4 (diff)
downloadTango-5accee4df85cc47b5700ad32090451ded2a121fa.tar.gz
Tango-5accee4df85cc47b5700ad32090451ded2a121fa.zip
warning removed. diagnostics stops when the commtx mailbox is full.
Diffstat (limited to 'Software/Embedded_SW/Embedded/Communication')
-rw-r--r--Software/Embedded_SW/Embedded/Communication/CommunicationTask.c6
-rw-r--r--Software/Embedded_SW/Embedded/Communication/CommunicationTask.h2
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Connection.c5
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Container.c9
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Container.h2
5 files changed, 14 insertions, 10 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c
index aa50b4db8..b6841ef7e 100644
--- a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c
+++ b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c
@@ -122,7 +122,7 @@ void communicationTask(UArg arg0, UArg arg1)
}
-uint32_t CommunicationTaskSendMessage(char* buffer,size_t length)
+bool CommunicationTaskSendMessage(char* buffer,size_t length)
{
CommTxMessageStruc Message;
CommTxMsgCounter++;
@@ -131,9 +131,9 @@ uint32_t CommunicationTaskSendMessage(char* buffer,size_t length)
Message.msgSize = length;
Message.Buff = buffer;
if (CommunicationTxMsgQ != NULL)
- /*retcode =*/ Mailbox_post(CommunicationTxMsgQ , &Message, BIOS_NO_WAIT);
+ return Mailbox_post(CommunicationTxMsgQ , &Message, BIOS_NO_WAIT);
- return OK;
+ return false;
}
int32_t SetCommunicationPath(bool UARTorUSB)
{
diff --git a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.h b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.h
index 5746eb825..50309c899 100644
--- a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.h
+++ b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.h
@@ -21,7 +21,7 @@ extern uint32_t CommunicationTaskInit(void);
extern uint32_t CommunicationTaskMessageReceived(uint16_t msgSize);
-extern uint32_t CommunicationTaskSendMessage(char* buffer,size_t length);
+extern bool CommunicationTaskSendMessage(char* buffer,size_t length);
#define isUART true
#define isUSB false
diff --git a/Software/Embedded_SW/Embedded/Communication/Connection.c b/Software/Embedded_SW/Embedded/Communication/Connection.c
index ed7aa9dfc..320dc56d1 100644
--- a/Software/Embedded_SW/Embedded/Communication/Connection.c
+++ b/Software/Embedded_SW/Embedded/Communication/Connection.c
@@ -18,8 +18,11 @@
#include "Common/SW_Info/SW_Info.h"
#include "Common/report/report.h"
#include <utils/ustdlib.h>
+
#include "StateMachines/Printing/PrintingSTM.h"
-#include "drivers/Uart_Comm/Uart.h"
+
+#include "Modules/heaters/heaters_ex.h"
+#include "modules/AlarmHandling/Diagnostics.h"
void ConnectionRequest(MessageContainer* requestContainer)
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c
index 60e972968..5cecd48f0 100644
--- a/Software/Embedded_SW/Embedded/Communication/Container.c
+++ b/Software/Embedded_SW/Embedded/Communication/Container.c
@@ -32,12 +32,13 @@
#include "Modules/General/GeneralHardware.h"
#include "Modules/heaters/heaters_ex.h"
#include "Modules/AlarmHandling/AlarmHandling.h"
-//#include "Drivers/USB_Communication/USBCDCD.h"
+#include "modules/AlarmHandling/Diagnostics.h"
+#include "Modules/General/process.h"
+#include "Modules/Thread/Thread_ex.h"
+
#include "Communication/CommunicationTask.h"
#include "StateMachines/Printing/PrintingSTM.h"
-#include "Modules/General/process.h"
-#include "Modules/Thread/Thread_ex.h"
#include "Common/report/report.h"
#include "Connection.h"
@@ -274,7 +275,7 @@ void receive_callback(char* buffer, size_t length)
message_container__free_unpacked(requestContainer, NULL);
}
-uint32_t SendChars(char* buffer,size_t length)
+bool SendChars(char* buffer,size_t length)
{
return CommunicationTaskSendMessage(buffer, length);
}
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.h b/Software/Embedded_SW/Embedded/Communication/Container.h
index 8e9aaacf9..212814160 100644
--- a/Software/Embedded_SW/Embedded/Communication/Container.h
+++ b/Software/Embedded_SW/Embedded/Communication/Container.h
@@ -7,6 +7,6 @@
MessageContainer createContainer(MessageType type, char* token, protobuf_c_boolean completed, void* response, size_t (*packPtr)(void*, uint8_t*), size_t (*sizePtr)(void*));
void receive_callback(char* buffer, size_t length);
-uint32_t SendChars(char* buffer,size_t length);
+bool SendChars(char* buffer,size_t length);
#endif //CONTAINER_H