BUS Mini: Dynamic trims

This commit is contained in:
Pascal Langer 2019-04-15 10:31:18 +02:00
parent 1d5be624fe
commit 96db173694
2 changed files with 7 additions and 4 deletions

View File

@ -126,9 +126,12 @@ static void __attribute__((unused)) BUGSMINI_send_packet(uint8_t bind)
packet[5] = rudder >> 1;
packet[6] = elevator >> 1;
packet[7] = aileron >> 1;
packet[8] = 0x20 | (aileron << 7);
packet[9] = 0x20 | (elevator << 7);
packet[10]= 0x20 | (rudder << 7);
packet[8] = (((aileron / 5) >> 1) + 7) // dynamic trim 0x07 - 0x39
| (aileron << 7);
packet[9] = (((elevator / 5) >> 1) + 7) // dynamic trim 0x07 - 0x39
| (elevator << 7);
packet[10]= (((rudder / 5) >> 1) + 7) // dynamic trim 0x07 - 0x39
| (rudder << 7);
packet[11]= 0x40 | (throttle << 7);
packet[12]= 0x80 | ((packet[12] ^ 0x40) & 0x40) // bugs 3 H doesn't have 0x80 ?
| BUGSMINI_FLAG_MODE

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_REVISION 1
#define VERSION_PATCH_LEVEL 33
#define VERSION_PATCH_LEVEL 34
//******************
// Protocols