Skip to content

Commit d58c0b1

Browse files
committed
LP-550 Allow Txpid builtin
1 parent 8935906 commit d58c0b1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

flight/modules/TxPID/txpid.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,19 @@ static float scale(float val, float inMin, float inMax, float outMin, float outM
100100
int32_t TxPIDInitialize(void)
101101
{
102102
bool txPIDEnabled;
103-
HwSettingsOptionalModulesData optionalModules;
104103

104+
#ifdef MODULE_TXPID_BUILTIN
105+
txPIDEnabled = true;
106+
#else
107+
HwSettingsOptionalModulesData optionalModules;
105108
HwSettingsOptionalModulesGet(&optionalModules);
106109

107110
if (optionalModules.TxPID == HWSETTINGS_OPTIONALMODULES_ENABLED) {
108111
txPIDEnabled = true;
109112
} else {
110113
txPIDEnabled = false;
111114
}
115+
#endif
112116

113117
if (txPIDEnabled) {
114118
TxPIDStatusInitialize();

0 commit comments

Comments
 (0)