...cosmetic
This commit is contained in:
parent
772024671b
commit
6b054e6029
23
DShotRMT.cpp
23
DShotRMT.cpp
|
|
@ -19,16 +19,17 @@ constexpr dshot_timing_t DSHOT_TIMINGS[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
DShotRMT::DShotRMT(gpio_num_t gpio, dshot_mode_t mode, bool is_bidirectional) : _gpio(gpio),
|
DShotRMT::DShotRMT(gpio_num_t gpio, dshot_mode_t mode, bool is_bidirectional):
|
||||||
_mode(mode),
|
_gpio(gpio),
|
||||||
_is_bidirectional(is_bidirectional),
|
_mode(mode),
|
||||||
_timing_config(DSHOT_TIMINGS[mode]),
|
_is_bidirectional(is_bidirectional),
|
||||||
_rmt_tx_channel(nullptr),
|
_timing_config(DSHOT_TIMINGS[mode]),
|
||||||
_rmt_rx_channel(nullptr),
|
_rmt_tx_channel(nullptr),
|
||||||
_dshot_encoder(nullptr),
|
_rmt_rx_channel(nullptr),
|
||||||
_last_erpm(0),
|
_dshot_encoder(nullptr),
|
||||||
_last_transmission_time(0),
|
_last_erpm(0),
|
||||||
_current_packet(0)
|
_last_transmission_time(0),
|
||||||
|
_current_packet(0)
|
||||||
{
|
{
|
||||||
// Double up frame time for bidirectional mode
|
// Double up frame time for bidirectional mode
|
||||||
if (_is_bidirectional)
|
if (_is_bidirectional)
|
||||||
|
|
@ -60,7 +61,7 @@ bool DShotRMT::begin()
|
||||||
// Init DShot Decoder
|
// Init DShot Decoder
|
||||||
if (!_initDShotEncoder())
|
if (!_initDShotEncoder())
|
||||||
{
|
{
|
||||||
Serial.println(DSHOT_MSG_02);
|
Serial.println(DSHOT_MSG_03);
|
||||||
return DSHOT_ERROR;
|
return DSHOT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue