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.
Dependencies: mbed MatrixMath LPS25HB_I2C LSM9DS1 Matrix2 PIDcontroller LoopTicker SBUS_without_mainfile UsaPack solaESKF_wind Vector3 CalibrateMagneto FastPWM
Diff: global.hpp
- Revision:
- 118:97ffe77b6f38
- Parent:
- 117:8cedc59454c4
- Child:
- 119:43ac44c68ff0
diff -r 8cedc59454c4 -r 97ffe77b6f38 global.hpp
--- a/global.hpp Wed Mar 30 04:47:36 2022 +0000
+++ b/global.hpp Wed Mar 30 05:30:13 2022 +0000
@@ -64,7 +64,6 @@
float pi[3];
float de_command;
float dT_command;
- float dr_command;
float gps_acc;
float vx_opt;
float vy_opt;
@@ -73,11 +72,30 @@
float heading;
};
+struct receivePack
+{
+ int16_t accData[3];
+ int16_t gyroData[3];
+ int16_t magData[3];
+ int16_t actData[4];
+ int16_t commandIndex;
+ int16_t commandVal;
+};
+struct sendPack
+{
+ float pos_tail;
+ float de;
+ float dTl;
+ float dTr;
+ float dr;
+ float rpy[3];
+};
+
// var
// communication
-extern Serial pc;
+extern UsaPack pc;
extern I2C i2c; // sda, scl
extern UsaPack tail; // log - tail
extern SBUS sbus;
@@ -122,6 +140,8 @@
extern float deobj;
extern float dr;
extern float drobj;
+extern float dTl;
+extern float dTr;
// position
extern Matrix SensorAlignmentAG;
@@ -173,6 +193,8 @@
extern const int time_address;
extern valuePack posValues;
extern updatePack updateValues;
+extern receivePack rp;
+extern sendPack sp;
extern Timer system_dt;
// function
@@ -207,6 +229,7 @@
// datatransfer.cpp
extern void send2center();
+extern void send2pc();
extern void writeEEPROM(int address, unsigned int eeaddress, char *data, int size);
extern void readEEPROM(int address, unsigned int eeaddress, char *data, int size);