Skip to content

Commit e7bc97a

Browse files
authored
Merge pull request #7814 from kernel-machine/battery_cell_in_logic_condition
Battery cells in logic condition
2 parents 47cb62a + b8cf027 commit e7bc97a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/main/programming/logic_condition.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,11 @@ static int logicConditionGetFlightOperandValue(int operand) {
431431
case LOGIC_CONDITION_OPERAND_FLIGHT_CELL_VOLTAGE: // V / 10
432432
return getBatteryAverageCellVoltage();
433433
break;
434+
435+
case LOGIC_CONDITION_OPERAND_FLIGHT_BATT_CELLS:
436+
return getBatteryCellCount();
437+
break;
438+
434439
case LOGIC_CONDITION_OPERAND_FLIGHT_CURRENT: // Amp / 100
435440
return getAmperage();
436441
break;

src/main/programming/logic_condition.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ typedef enum {
126126
LOGIC_CONDITION_OPERAND_FLIGHT_GPS_VALID, // 0/1 // 34
127127
LOGIC_CONDITION_OPERAND_FLIGHT_LOITER_RADIUS, // 35
128128
LOGIC_CONDITION_OPERAND_FLIGHT_ACTIVE_PROFILE, //int // 36
129+
LOGIC_CONDITION_OPERAND_FLIGHT_BATT_CELLS, // 37
129130

130131
} logicFlightOperands_e;
131132

0 commit comments

Comments
 (0)