mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Added Logic AND to Modes
Added Mode Inversion configuration, CLI commands, and update. Changed Mode Inversion to Mode Logic. configure by AND/OR instead of output inversion. Fixed Mode Logic code after debugging. Added PG_REGISTER to cli unittest. Revert version to previous. Revamped Mode Logic using existing Conditions config. Requires coordination with BF-configurator, but works with CLI (added argument in 'aux' command). Coding standard changes. Cleaned up code. Added modeLogic enum. removed executable permissions. Code cleanup, cliAux backward compatible. changed bitArrayInv to bitArrayXor. allow for old 'aux' command (without last argument) to be made. asserts MODELOGIC_OR instead of resetting the memory.
This commit is contained in:
parent
625f083a3f
commit
b9272ae325
5 changed files with 60 additions and 20 deletions
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "bitarray.h"
|
||||
|
||||
|
@ -36,3 +37,10 @@ void bitArrayClr(void *array, unsigned bit)
|
|||
{
|
||||
BITARRAY_BIT_OP((uint32_t*)array, bit, &=~);
|
||||
}
|
||||
|
||||
void bitArrayXor(void *dest, size_t size, void *op1, void *op2)
|
||||
{
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
((uint8_t*)dest)[i] = ((uint8_t*)op1)[i] ^ ((uint8_t*)op2)[i];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue