-
Notifications
You must be signed in to change notification settings - Fork 0
WoEN: AiR Into The Deep v3.0 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tikhonsmovzh
wants to merge
48
commits into
master
Choose a base branch
from
develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
ca492ec
fix(StickProcessor): камера
tikhonsmovzh c9ce1d4
fix(Trajectoryes): убраны красные траектории
tikhonsmovzh 23fbfbd
feat(CurrentSensor): датчик тока
tikhonsmovzh 848cf58
fix(CurrentSensor): исправленое определения вольтожа
tikhonsmovzh 63a97ea
fix(DeviceTest): новые устройства
tikhonsmovzh 71d722a
fix(DeviceTest): забыл break
tikhonsmovzh 2a6dab9
fix(HumanTrajectory): автоном на 4 повешанных
tikhonsmovzh 8fb59cb
fix(currentSensor): датчик тока
tikhonsmovzh c7537fd
fix(Encoders): ресет всех инкдеров при старте
tikhonsmovzh c593ee7
fix(IntakeManager): дополнительная проверка для датчика тока
tikhonsmovzh 24ca8fc
fix(Battery): задание частоты обновления батареи в герцах
tikhonsmovzh ea8b822
fix(currentSensor): рабочая защита на диф
tikhonsmovzh aa5140f
fix(IntakeManager): интэйк в нормальный вид
tikhonsmovzh 2dfa7b1
feat(Gameapade): вибрация геймпда при защите от хватания
tikhonsmovzh 24f39fb
fix(Trajectory)
tikhonsmovzh c1de5c8
feat(Trajectory): вынос ограничения ускорения в константу
tikhonsmovzh 34d3741
fix(Trajectory)
tikhonsmovzh 341bbe2
fix(Trajectory): рабочая ускореная траектория для каозины
tikhonsmovzh a1706ab
fix(Trajectory): рабочая ускореная траектория для каозины
tikhonsmovzh b7c932e
fix(BasketTrajectory): 5 в карзине
tikhonsmovzh 04e8cee
fix(BasketTrajectory): 5 в карзине
tikhonsmovzh 96e6529
fix(BasketTrajectory): 5 в карзине
tikhonsmovzh b3ef6f0
fix(BasketTrajectory): (почти) 6 в карзине
tikhonsmovzh 7a41c12
fix(TeloOp): автоинит телеопа
tikhonsmovzh bf0e800
fix(IntakeManager): формула для более удобного хаванья из центра
tikhonsmovzh 26c202b
fix(IntakeManager): автохаванье
tikhonsmovzh 24f1ff3
fix(StickProcessor): учет отношение сторон
tikhonsmovzh fb10e92
fix(StickProcessor): рабочий автоном на 6
tikhonsmovzh 33c16ed
fix(IntakeManager): чательно настроеный датчик тока
tikhonsmovzh c408692
fix(CameraTest): попытка переделать определение элемента
tikhonsmovzh 9e5bdce
feat(OpenCV.py): продвинутый алгоритм распознования элементов, пока ч…
tikhonsmovzh 16b9cdd
feat(StickProcessor): обновленый процессор элемнтов, даже частично на…
tikhonsmovzh ec41ca0
feat(StickProcessor.py): версия для быстрой проверки на питухоне
tikhonsmovzh a58bc9e
clear(IntakeManager): вынос конфигов
tikhonsmovzh fd36eaa
clear(IntakeManager): вынос конфигов
tikhonsmovzh 74c1ff6
fix(CameraTest): ключение определение элементов
tikhonsmovzh 5334466
fix(all): код не билдился
tikhonsmovzh 187b9ba
fix(StickProcessor): настроеное определение элементов под реальный мир
tikhonsmovzh 841284f
fix(IntakeManager): автохаванье
tikhonsmovzh 1213141
fix(EventBus): оптимизация шины эвентов
tikhonsmovzh b0e5c27
fix(intakeManager): исправленое управление дифиринциалом
tikhonsmovzh 20d9200
fix(Actions): оптимизированное ожидание
tikhonsmovzh cb7dc5f
fix(IntakeManager): рабочае автохаванье
tikhonsmovzh e06f7fa
fix(Trajectory): 4 в карзине за 15 секунд + 1 взят из центра (все оче…
tikhonsmovzh 378a65c
feat(IntakeManager): сохранение второго ближайщего элемента
tikhonsmovzh fd42c9c
fix(Trajectory): 6 в карзине
tikhonsmovzh 3a76e60
fix(Trajectory): все работает
tikhonsmovzh 49375f6
fix(all): фиксы для пул регвеста
tikhonsmovzh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,19 +3,20 @@ package org.firstinspires.ftc.teamcode.linearOpModes | |
| import com.qualcomm.robotcore.eventloop.opmode.Autonomous | ||
| import org.firstinspires.ftc.teamcode.collectors.BaseCollector | ||
| import org.firstinspires.ftc.teamcode.collectors.BaseCollector.GameStartPosition | ||
| import org.firstinspires.ftc.teamcode.modules.camera.Camera | ||
| import org.firstinspires.ftc.teamcode.modules.mainControl.actions.ActionsRunner | ||
| import org.firstinspires.ftc.teamcode.modules.mainControl.runner.TrajectorySegmentRunner | ||
|
|
||
| open class AutoOpMode(val startPos: GameStartPosition): LinearOpModeBase() { | ||
| override fun getOpModeSettings() = OpModeSettings(isAutoStart = false, isPreInit = false, preInitOpModeName = "TeleOpMode") | ||
| override fun getOpModeSettings() = OpModeSettings(isAutoStart = false, isPreInit = true, preInitOpModeName = "TeleOpMode", gamepadStart = false) | ||
|
|
||
| override fun getCollector(): BaseCollector { | ||
| val collector = BaseCollector(this, | ||
| BaseCollector.GameSettings( | ||
| startPosition = startPos, | ||
| ), | ||
| isAuto = true, | ||
| mutableListOf(/*ся модули для автонома*/ TrajectorySegmentRunner(), ActionsRunner()) | ||
| mutableListOf(/*ся модули для автонома*/ TrajectorySegmentRunner(), ActionsRunner(), Camera()) | ||
|
||
| ) | ||
|
|
||
| return collector | ||
|
|
@@ -25,11 +26,17 @@ open class AutoOpMode(val startPos: GameStartPosition): LinearOpModeBase() { | |
| @Autonomous | ||
| class AutoOpModeRedBasket: AutoOpMode(GameStartPosition.RED_BASKET) | ||
|
|
||
| @Autonomous | ||
| class AutoOpModeRedBasketBrick: AutoOpMode(GameStartPosition.RED_BASKET_BRICK) | ||
|
|
||
| @Autonomous | ||
| class AutoOpModeRedHuman: AutoOpMode(GameStartPosition.RED_HUMAN) | ||
|
|
||
| @Autonomous | ||
| class AutoOpModeBlueHuman: AutoOpMode(GameStartPosition.BLUE_HUMAN) | ||
|
|
||
| @Autonomous | ||
| class AutoOpModeBlueBasket: AutoOpMode(GameStartPosition.BLUE_BASKET) | ||
| class AutoOpModeBlueBasket: AutoOpMode(GameStartPosition.BLUE_BASKET) | ||
|
|
||
| @Autonomous | ||
| class AutoOpModeBlueBasketBrick: AutoOpMode(GameStartPosition.BLUE_BASKET_BRICK) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ import org.firstinspires.ftc.teamcode.collectors.BaseCollector | |
| import org.firstinspires.ftc.teamcode.utils.telemetry.StaticTelemetry | ||
| import org.firstinspires.ftc.teamcode.utils.units.Angle | ||
| import org.firstinspires.ftc.teamcode.utils.units.Vec2 | ||
| import kotlin.math.abs | ||
|
|
||
| /** | ||
| * Класс для всех опмодов который запускает всю программу | ||
|
|
@@ -18,11 +19,13 @@ open class LinearOpModeBase : LinearOpMode() { | |
| data class OpModeSettings( | ||
| val isAutoStart: Boolean, | ||
| val isPreInit: Boolean, | ||
| val gamepadStart: Boolean, | ||
| val preInitOpModeName: String = "", | ||
| val initTime: Double = 1.5 | ||
| ) | ||
|
|
||
| protected open fun getOpModeSettings() = OpModeSettings(isAutoStart = false, isPreInit = false) | ||
| protected open fun getOpModeSettings() = | ||
| OpModeSettings(isAutoStart = false, isPreInit = false, gamepadStart = false) | ||
|
|
||
| protected open fun getCollector() = BaseCollector( | ||
| this, | ||
|
|
@@ -46,6 +49,17 @@ open class LinearOpModeBase : LinearOpMode() { | |
|
|
||
| while (!isStarted()) { | ||
| collector.initUpdate() | ||
| Thread.yield() | ||
|
|
||
| if ((gamepad1.options || | ||
| abs(gamepad1.left_stick_x) > 0.01 || | ||
| abs(gamepad1.left_stick_y) > 0.01 || | ||
| abs(gamepad1.right_stick_x) > 0.01 || | ||
| abs(gamepad1.right_stick_y) > 0.01 || | ||
| gamepad1.touchpad) && settings.gamepadStart | ||
| ) | ||
| OpModeManagerImpl.getOpModeManagerOfActivity(AppUtil.getInstance().getActivity()) | ||
| .startActiveOpMode() | ||
|
||
| } | ||
|
|
||
| resetRuntime() | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cделать вместо джавовского
getXxxкотлинскийvalс переопределенным геттером