mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 23:35:34 +03:00
merged changes from multiwii_dev 20120504. this means new serial protocol, new buzzer code
fixed spacing in ledring.c defaulted acc_lpf to 100 correction in vtail4 mix (from multiwii_dev) trashed more unused LOG_VALUES crap no binary build since this is untested / non-flight-tested. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@152 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
910df63a7f
commit
0d7460960e
13 changed files with 694 additions and 172 deletions
|
@ -21,25 +21,25 @@ void ledringState(void)
|
|||
static uint8_t state;
|
||||
|
||||
if (state == 0) {
|
||||
b[0] = 'z';
|
||||
b[1] = (180 - heading) / 2; // 1 unit = 2 degrees;
|
||||
b[0] = 'z';
|
||||
b[1] = (180 - heading) / 2; // 1 unit = 2 degrees;
|
||||
i2cWriteBuffer(LED_RING_ADDRESS, 0xFF, 2, b);
|
||||
state = 1;
|
||||
state = 1;
|
||||
} else if (state == 1) {
|
||||
b[0] = 'y';
|
||||
b[1] = constrain(angle[ROLL] / 10 + 90, 0, 180);
|
||||
b[2] = constrain(angle[PITCH] / 10 + 90, 0, 180);
|
||||
b[0] = 'y';
|
||||
b[1] = constrain(angle[ROLL] / 10 + 90, 0, 180);
|
||||
b[2] = constrain(angle[PITCH] / 10 + 90, 0, 180);
|
||||
i2cWriteBuffer(LED_RING_ADDRESS, 0xFF, 3, b);
|
||||
state = 2;
|
||||
state = 2;
|
||||
} else if (state == 2) {
|
||||
b[0] = 'd'; // all unicolor GREEN
|
||||
b[1] = 1;
|
||||
if (armed)
|
||||
b[2] = 1;
|
||||
else
|
||||
b[2] = 0;
|
||||
b[0] = 'd'; // all unicolor GREEN
|
||||
b[1] = 1;
|
||||
if (armed)
|
||||
b[2] = 1;
|
||||
else
|
||||
b[2] = 0;
|
||||
i2cWriteBuffer(LED_RING_ADDRESS, 0xFF, 3, b);
|
||||
state = 0;
|
||||
state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue