Skip to content

Commit

Permalink
more tailcontrol handling for ears with triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Dec 24, 2024
1 parent 7d496d1 commit 18f9810
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/Backend/sensors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,15 @@ abstract class TriggerDefinition extends ChangeNotifier implements Comparable<Tr
if ([ActionCategory.glowtip].contains(baseAction.actionCategory)) {
return element.hasGlowtip.value == GlowtipStatus.glowtip;
}

// tailcontrol migration
if (element.baseDeviceDefinition.deviceType == DeviceType.ears) {
if (baseAction is CommandAction && element.baseDeviceDefinition.deviceType == DeviceType.ears && element.isTailCoNTROL.value == TailControlStatus.legacy) {
return false;
} else if (baseAction is EarsMoveList && element.baseDeviceDefinition.deviceType == DeviceType.ears && element.isTailCoNTROL.value == TailControlStatus.tailControl) {
return false;
}
}
// return remaining gear if action is not a glowtip action
return true;
},
Expand Down

0 comments on commit 18f9810

Please sign in to comment.