diff --git a/.gitignore b/.gitignore index 021cb34..4a5379a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ # Caching ESP32 Builds buildCache +examples/dshot300/debug.cfg +examples/dshot300/esp32.svd +examples/dshot300/debug_custom.json diff --git a/README.md b/README.md index ae1bb5e..2d27fcc 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The checksum is calculated over the throttle value and the telemetry bit, so the crc = (value ^ (value >> 4) ^ (value >> 8)) & 0x0F; ### Bidirectional DSHOT -Biderictional DSHOT is also known as inverted DSHOT, because the signal level is inverted, so 1 is low and a 0 is high. This is done in order to let the ESC know, that we are operating in bidirectional mode and that it should be sending back eRPM telemetry packages. +Bidirictional DSHOT is also known as inverted DSHOT, because the signal level is inverted, so 1 is low and a 0 is high. This is done in order to let the ESC know, that we are operating in bidirectional mode and that it should be sending back eRPM telemetry packages. #### Calculating the Bidirectional CRC The calculation of the checksum is basically the same, just before the last step the values are inverted: diff --git a/library.properties b/library.properties index be1038b..6814437 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=DShotRMT -version=0.2.1 +version=0.2.2 author=derdoktor667 maintainer=derdoktor667 sentence=DShotRMT Library supporting all DShot Types and speeds. Tested with BlHeli_S. -paragraph=This library can control a BlHeli_S by using encoded DShot commands like Betaflight. +paragraph=This library can control a BlHeli_S by using encoded DShot commands. category=Device Control url=https://github.com/derdoktor667/DShotRMT architectures=esp32 diff --git a/src/DShotRMT.cpp b/src/DShotRMT.cpp index c1bcd21..76ae607 100644 --- a/src/DShotRMT.cpp +++ b/src/DShotRMT.cpp @@ -1,5 +1,5 @@ // -// Name: DShotRMT.cpp +// Name: DShotRMT.cpp // Created: 20.03.2021 00:49:15 // Author: derdoktor667 // diff --git a/src/DShotRMT.h b/src/DShotRMT.h index fe5a263..b1ea067 100644 --- a/src/DShotRMT.h +++ b/src/DShotRMT.h @@ -1,5 +1,5 @@ // -// Name: DShotRMT.h +// Name: DShotRMT.h // Created: 20.03.2021 00:49:15 // Author: derdoktor667 // @@ -10,7 +10,7 @@ #define _DSHOTRMT_h #if defined(ARDUINO) && ARDUINO >= 100 -#include "arduino.h" +#include #else #include "WProgram.h" #endif @@ -18,6 +18,9 @@ // ...utilizing the RMT Module library for generating the DShot signal #include +// ...unify versioning +constexpr auto DSHOT_LIB_VERSION = "0.2.2"; + constexpr auto DSHOT_CLK_DIVIDER = 8; // ...slow down RMT clock to 0.1 microseconds / 100 nanoseconds per cycle constexpr auto DSHOT_PACKET_LENGTH = 17; // ...last pack is the pause