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.
Diff: ComLink.h
- Revision:
- 2:c1599cad82c3
- Parent:
- 1:30b8effc5d74
- Child:
- 5:b2bc6e87890f
--- a/ComLink.h Fri Feb 26 15:12:50 2016 +0000
+++ b/ComLink.h Sun Feb 28 15:27:02 2016 +0000
@@ -21,7 +21,7 @@
#define stx 2
//------------------------------------------------------------------------------------
-typedef void (*callback_type)(int);
+
/*
Modtagne data:
1: Kp, Ki,Kd
@@ -44,8 +44,8 @@
class ComLink {
private:
- callback_type callback;
RawSerial _com;
+ int _Dtype;
char inbuff[RxSize];
void rxCallback();
void txCallback();
@@ -57,8 +57,9 @@
public:
char Data[RxSize];
unsigned char DSize;
- ComLink(PinName tx, PinName rx,callback_type _callback);
+ ComLink(PinName tx, PinName rx);
//void Updategui();
+ int Work();
//Sender
void StatusUpdate(float Vout,float Iout,float Irotor,float Temp,float Vbat);
@@ -68,6 +69,9 @@
void TxCalRecord(float *value, int Size);
void TxStatus(float *value, int Size);
+ void TxMessData(unsigned char Ftype, void *SValue, int Size); //Måledata sendes til PC
+ void WriteConsol(char *str); //Skriver data til linux consol (debug/indstilling)
+
void WriteLCD(unsigned char x,unsigned char y, char *str);
void cls();
};