Add appropriate constraint so isLgsAllowed Constraint can be properly checked
This commit is contained in:
parent
23c23ea0b8
commit
6ecdd4d7fc
1 changed files with 13 additions and 0 deletions
|
@ -18,6 +18,9 @@ class ConstraintChecker @Inject constructor(private val activePlugin: ActivePlug
|
|||
fun isClosedLoopAllowed(): Constraint<Boolean> =
|
||||
isClosedLoopAllowed(Constraint(true))
|
||||
|
||||
fun isLgsAllowed(): Constraint<Boolean> =
|
||||
isLgsAllowed(Constraint(true))
|
||||
|
||||
fun isAutosensModeEnabled(): Constraint<Boolean> =
|
||||
isAutosensModeEnabled(Constraint(true))
|
||||
|
||||
|
@ -77,6 +80,16 @@ class ConstraintChecker @Inject constructor(private val activePlugin: ActivePlug
|
|||
return value
|
||||
}
|
||||
|
||||
override fun isLgsAllowed(value: Constraint<Boolean>): Constraint<Boolean> {
|
||||
val constraintsPlugins = activePlugin.getSpecificPluginsListByInterface(ConstraintsInterface::class.java)
|
||||
for (p in constraintsPlugins) {
|
||||
val constraint = p as ConstraintsInterface
|
||||
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue
|
||||
constraint.isLgsAllowed(value)
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
override fun isAutosensModeEnabled(value: Constraint<Boolean>): Constraint<Boolean> {
|
||||
val constraintsPlugins = activePlugin.getSpecificPluginsListByInterface(ConstraintsInterface::class.java)
|
||||
for (p in constraintsPlugins) {
|
||||
|
|
Loading…
Reference in a new issue