mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Blackbox code size savings by factoring common loops out into fuctions
This commit is contained in:
parent
53860e461c
commit
0c4604eeef
5 changed files with 63 additions and 43 deletions
|
@ -154,6 +154,20 @@ void blackboxWriteSignedVB(int32_t value)
|
|||
blackboxWriteUnsignedVB(zigzagEncode(value));
|
||||
}
|
||||
|
||||
void blackboxWriteSignedVBArray(int32_t *array, int count)
|
||||
{
|
||||
for (int i = 0; i < count; i++) {
|
||||
blackboxWriteSignedVB(array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void blackboxWriteSigned16VBArray(int16_t *array, int count)
|
||||
{
|
||||
for (int i = 0; i < count; i++) {
|
||||
blackboxWriteSignedVB(array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void blackboxWriteS16(int16_t value)
|
||||
{
|
||||
blackboxWrite(value & 0xFF);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue