Skip to content

Commit a90203c

Browse files
authored
Merge pull request #9411 from sdellava/master
Added Compass Calibration programmable operation
2 parents af0b3f4 + 740c7e0 commit a90203c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/programming/logic_condition.c

+7
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,13 @@ static int logicConditionCompute(
287287
return true;
288288
break;
289289

290+
#ifdef USE_MAG
291+
case LOGIC_CONDITION_RESET_MAG_CALIBRATION:
292+
293+
ENABLE_STATE(CALIBRATE_MAG);
294+
return true;
295+
break;
296+
#endif
290297
case LOGIC_CONDITION_SET_VTX_POWER_LEVEL:
291298
#if defined(USE_VTX_CONTROL)
292299
#if(defined(USE_VTX_SMARTAUDIO) || defined(USE_VTX_TRAMP))

src/main/programming/logic_condition.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ typedef enum {
8383
LOGIC_CONDITION_APPROX_EQUAL = 51,
8484
LOGIC_CONDITION_LED_PIN_PWM = 52,
8585
LOGIC_CONDITION_DISABLE_GPS_FIX = 53,
86-
LOGIC_CONDITION_LAST = 54,
86+
LOGIC_CONDITION_RESET_MAG_CALIBRATION = 54,
87+
LOGIC_CONDITION_LAST = 55,
8788
} logicOperation_e;
8889

8990
typedef enum logicOperandType_s {

0 commit comments

Comments
 (0)