mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
fix frame quantization
This commit is contained in:
parent
b93cb96c4f
commit
74da73e37d
@ -766,7 +766,7 @@ uint32_t convert_edge_intervals_to_bitstream(uint8_t channel_index)
|
||||
|
||||
// This seemss to work with dshot 150, 300, 600, 1200
|
||||
// The values were found by trial and error to get the quantization just right.
|
||||
const uint32_t bits = (dshot_capture_buffer[channel_index][i] - previous + 5) / 20;
|
||||
const uint32_t bits = (dshot_capture_buffer[channel_index][i] - previous + 5) / 21;
|
||||
|
||||
// Convert GCR encoded pulse train into value
|
||||
for (unsigned bit = 0; bit < bits; ++bit) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user