dshot: note regarding different DShot timings

Signed-off-by: Julian Oes <julian@oes.ch>
This commit is contained in:
Julian Oes 2023-05-19 09:55:16 +12:00
parent 833be7ec7b
commit b4412e9fbc
No known key found for this signature in database
GPG Key ID: F0ED380FEA56DE41
1 changed files with 2 additions and 1 deletions

View File

@ -195,7 +195,8 @@ unsigned calculate_period(void)
break;
}
// TODO: Doesn't cope with DShot frequency other than 600
// 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[i] - previous + 5) / 20;
for (unsigned bit = 0; bit < bits; ++bit) {