Skip to content

Commit

Permalink
添加 LocalizationPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
6-BennyLi-9 committed Aug 21, 2024
1 parent 2f15a86 commit 7a29a49
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import org.firstinspires.ftc.teamcode.DriveControls.Localizers.plugins.DeadWheelHeadingLocalizer;
import org.firstinspires.ftc.teamcode.DriveControls.Localizers.plugins.DeadWheelVectorPositionLocalizer;
import org.firstinspires.ftc.teamcode.Hardwares.Classic;
import org.firstinspires.ftc.teamcode.utils.Annotation.LocalizationPlugin;

@LocalizationPlugin
public class DeadWheelSubassemblyLocalizer extends SubassemblyLocalizer implements Localizer {
public DeadWheelSubassemblyLocalizer(Classic classic) {
super(new DeadWheelVectorPositionLocalizer(classic), new DeadWheelHeadingLocalizer(classic));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import org.firstinspires.ftc.teamcode.DriveControls.Localizers.definition.Localizer;
import org.firstinspires.ftc.teamcode.DriveControls.Localizers.definition.SubassemblyLocalizer;
import org.firstinspires.ftc.teamcode.Hardwares.Classic;
import org.firstinspires.ftc.teamcode.utils.Annotation.LocalizationPlugin;

@LocalizationPlugin
public class IMUSubassemblyLocalizer extends SubassemblyLocalizer implements Localizer {
public IMUSubassemblyLocalizer(Classic classic) {
super(new ImuLocalizer(classic));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import org.firstinspires.ftc.teamcode.DriveControls.Localizers.plugins.DeadWheelHeadingLocalizer;
import org.firstinspires.ftc.teamcode.DriveControls.Localizers.plugins.ImuVectorPositionLocalizer;
import org.firstinspires.ftc.teamcode.Hardwares.Classic;
import org.firstinspires.ftc.teamcode.utils.Annotation.LocalizationPlugin;

@LocalizationPlugin
public class SimpleSubassemblyLocalizer extends SubassemblyLocalizer implements Localizer {
public SimpleSubassemblyLocalizer(Classic classic) {
super(new ImuVectorPositionLocalizer(classic),new DeadWheelHeadingLocalizer(classic));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.firstinspires.ftc.teamcode.utils.Annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
//@SuppressWarnings(value={"unused"})
public @interface LocalizationPlugin {
}

0 comments on commit 7a29a49

Please sign in to comment.