mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-14 03:49:58 +03:00
Logic Conditions integration
This commit is contained in:
parent
d85693cd98
commit
2e3f67f635
9 changed files with 142 additions and 35 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "sensors/pitotmeter.h"
|
||||
#include "flight/imu.h"
|
||||
#include "flight/pid.h"
|
||||
#include "drivers/io_port_expander.h"
|
||||
|
||||
#include "navigation/navigation.h"
|
||||
#include "navigation/navigation_private.h"
|
||||
|
@ -180,7 +181,12 @@ static int logicConditionCompute(
|
|||
return operandA;
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef USE_I2C_IO_EXPANDER
|
||||
case LOGIC_CONDITION_PORT_SET:
|
||||
ioPortExpanderSet((uint8_t)operandA, (uint8_t)operandB);
|
||||
return operandB;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
|
@ -456,6 +462,9 @@ void logicConditionUpdateTask(timeUs_t currentTimeUs) {
|
|||
for (uint8_t i = 0; i < MAX_LOGIC_CONDITIONS; i++) {
|
||||
logicConditionProcess(i);
|
||||
}
|
||||
#ifdef USE_I2C_IO_EXPANDER
|
||||
ioPortExpanderSync();
|
||||
#endif
|
||||
}
|
||||
|
||||
void logicConditionReset(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue