Mirror actuator for RT2 lab

Dependencies:   FastPWM

Revision:
8:49ac75c42da0
Parent:
7:942fd77d5e19
--- a/uart_comm_thread.h	Thu Apr 15 05:36:55 2021 +0000
+++ b/uart_comm_thread.h	Tue Apr 27 07:50:03 2021 +0000
@@ -1,6 +1,7 @@
 #ifndef UART_COMM_THREAD_H_
 #define UART_COMM_THREAD_H_
 
+#include "GPA.h"
 #include "mbed.h"
 #include "ThreadFlag.h"
 #include "data_structs.h"
@@ -12,6 +13,7 @@
 extern DATA_Xchange data;
 extern Mirror_Kinematic mk;
 
+
 // "protocol" specifics
 
 #define BUF_LEN      	20  // max 256
@@ -52,7 +54,11 @@
 	uint8_t expected;
 	uint8_t num_floats;
 	uint8_t k_write;
-
+	void send_text(const char *);
+	void send_f_data(char,char,uint16_t,float*);
+	void send_data(char,char,uint16_t,int16_t*);
+	void send_data(char,char,int16_t);
+	void send_char_data(char,char,uint8_t);
 private:
 
     // private members 
@@ -63,6 +69,7 @@
     float Ts;
     EventQueue printfQueue;
     bool analyse_received_data(void);
+    bool gpa_stop_sent;
     
 // -------------------
 //	uint8_t buffer[BUF_LEN];     // RX buffer
@@ -74,10 +81,6 @@
     Ticker                  ticker;
     Mutex mutex;
 	void sendThreadFlag();
-	void send_data(char,char,uint16_t,float*);
-	void send_data(char,char,uint16_t,int16_t*);
-	void send_data(char,char,int16_t);
-	void send_data(char,char,uint8_t);
 };
 
 #endif