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: EasyCAT.h
- Revision:
- 4:66867fae2256
- Parent:
- 0:7816b38c99cc
diff -r 7816b38c99cc -r 66867fae2256 EasyCAT.h
--- a/EasyCAT.h Tue Sep 12 17:09:43 2017 +0000
+++ b/EasyCAT.h Mon Oct 04 15:02:35 2021 +0000
@@ -48,7 +48,7 @@
//-- BYTE_NUM ----------- Byte exchanged ------ Config EEPROM file
//#define BYTE_NUM 16 // 16 + 16 EasyCAT_16_16.bin
-#define BYTE_NUM 32 // 32 + 32 EasyCAT_32_32.bin
+//#define BYTE_NUM 32 // 32 + 32 EasyCAT_32_32.bin
//#define BYTE_NUM 64 // 64 + 64 EasyCAT_64_64.bin
//#define BYTE_NUM 128 // 128 + 128 EasyCAT_128_128.bin
@@ -67,8 +67,8 @@
//----- CUSTOM_MODE example -------
//
-//#define CUST_BYTE_NUM_OUT 49 // total number of bytes in output
-//#define CUST_BYTE_NUM_IN 17 // total number of bytes in input
+#define CUST_BYTE_NUM_OUT 0 // total number of bytes in output
+#define CUST_BYTE_NUM_IN 60 // total number of bytes in input
// We can also customize names and data types for the PDOs
// see the example in this file (look for tag "Custom data types example")
@@ -333,7 +333,7 @@
uint8_t Byte [TOT_BYTE_NUM_ROUND_OUT]; //
#if CUST_BYTE_NUM_OUT > 0 //----- Custom data types example -----
-/* //
+ //
struct // Here we can define our custom
{ // data types and names for the outputs
//
@@ -351,7 +351,7 @@
float CommZone4; //
float RampZone4; //
}Cust; //
-*/ //
+ //
#endif //
} PROCBUFFER_OUT; //
@@ -362,17 +362,27 @@
uint8_t Byte [TOT_BYTE_NUM_ROUND_IN]; //
#if CUST_BYTE_NUM_IN > 0 //----- Custom data types example ------
-/* //
+ //
struct // Here we can define our custom
{ // data types and names for the inputs
- //
- uint8_t Status; // The total number of bytes declared
- float TempZone1; // in this structure must be equal
- float TempZone2; // to the value assigned to CUST_BYTE_NUM_IN
- float TempZone3; //
- float TempZone4; // In this case 1+ 4+4+4+4 = 17
+ int32_t centerXL;
+ int32_t centerYL;
+ int32_t forceL;
+ int32_t yawL;
+ int32_t pitchL;
+ int32_t rollL;
+ int32_t centerXR;
+ int32_t centerYR;
+ int32_t forceR;
+ int32_t yawR;
+ int32_t pitchR;
+ int32_t rollR;
+ int32_t yawH;
+ int32_t pitchH;
+ int32_t rollH; //
+
}Cust; //
-*/ //
+ //
#endif //
} PROCBUFFER_IN; //