Open jopandla opened 1 year ago
You test throttle for beeing command after bit shifting, effectively multiplying it by 2.
static inline uint16_t createPacket(uint16_t throttle) { uint8_t csum = 0; throttle <<= 1; // Indicate as command if less than 48 if (throttle < 48 && throttle > 0) throttle |= 1; uint16_t csum_data = throttle; ...}
You should have tested for 482. `if (throttle < 482 && throttle > 0)` Or am I wrong?
You test throttle for beeing command after bit shifting, effectively multiplying it by 2.
You should have tested for 482. `if (throttle < 482 && throttle > 0)` Or am I wrong?