sertain

所属分类:collect
开发工具:kotlin
文件大小:0KB
下载次数:0
上传日期:2021-03-01 21:42:53
上 传 者sh-1993
说明:  FRC机器人编程框架,灵感来自Sertain Legacy和Meanlib,
(Framework for programming FRC robots, inspired by Sertain Legacy and Meanlib,)

文件列表:
.editorconfig (44, 2021-03-01)
build.gradle.kts (467, 2021-03-01)
core/ (0, 2021-03-01)
core/build.gradle.kts (1267, 2021-03-01)
core/src/ (0, 2021-03-01)
core/src/main/ (0, 2021-03-01)
core/src/main/kotlin/ (0, 2021-03-01)
core/src/main/kotlin/org/ (0, 2021-03-01)
core/src/main/kotlin/org/sertain/ (0, 2021-03-01)
core/src/main/kotlin/org/sertain/Robot.kt (4297, 2021-03-01)
core/src/main/kotlin/org/sertain/control/ (0, 2021-03-01)
core/src/main/kotlin/org/sertain/control/MotionCurve.kt (4519, 2021-03-01)
core/src/main/kotlin/org/sertain/control/PidfController.kt (762, 2021-03-01)
core/src/main/kotlin/org/sertain/core/ (0, 2021-03-01)
core/src/main/kotlin/org/sertain/core/Core.kt (854, 2021-03-01)
core/src/main/kotlin/org/sertain/coroutines/ (0, 2021-03-01)
core/src/main/kotlin/org/sertain/coroutines/Observables.kt (1648, 2021-03-01)
core/src/main/kotlin/org/sertain/coroutines/RobotDispatcher.kt (264, 2021-03-01)
core/src/main/kotlin/org/sertain/coroutines/RobotScope.kt (225, 2021-03-01)
core/src/main/kotlin/org/sertain/coroutines/Utils.kt (3529, 2021-03-01)
core/src/main/kotlin/org/sertain/events/ (0, 2021-03-01)
core/src/main/kotlin/org/sertain/events/Event.kt (102, 2021-03-01)
core/src/main/kotlin/org/sertain/events/Events.kt (1946, 2021-03-01)
core/src/main/kotlin/org/sertain/events/RobotEvent.kt (439, 2021-03-01)
core/src/main/kotlin/org/sertain/events/Sub.kt (186, 2021-03-01)
core/src/main/kotlin/org/sertain/events/Utils.kt (1875, 2021-03-01)
core/src/main/kotlin/org/sertain/motors/ (0, 2021-03-01)
core/src/main/kotlin/org/sertain/motors/CurrentLimit.kt (331, 2021-03-01)
core/src/main/kotlin/org/sertain/motors/Encoder.kt (447, 2021-03-01)
core/src/main/kotlin/org/sertain/motors/MotorController.kt (9148, 2021-03-01)
core/src/main/kotlin/org/sertain/motors/MotorId.kt (508, 2021-03-01)
core/src/main/kotlin/org/sertain/motors/MotorPidf.kt (921, 2021-03-01)
core/src/main/kotlin/org/sertain/subsystems/ (0, 2021-03-01)
core/src/main/kotlin/org/sertain/subsystems/Subsystem.kt (951, 2021-03-01)
core/src/main/kotlin/org/sertain/subsystems/TaskManager.kt (4119, 2021-03-01)
... ...

# Sertain

**Sertain is a framework designed to make programming robots for the First Robotics Competition as easy as possible. It combines wrappers for WPILib, Pheonix motor controllers, and Spark motor controllers. The framework is written in Kotlin, a language meant to supplement and enhance Java.** ## Why Sertain? ### Minimizes mistakes Sertain is a framework for beginners and experienced coders alike, so it is designed to prevent as many mistakes as possible. It requires you to specify units so you never mix up meters and feet. It has network tables integration that allows for safe property access and reactive updating. Its clever take on subsystems prevents any subsystem from running two tasks at once. Sertain is dedicated to preventing your robot from running into a wall. ### Cuts down on boilerplate code Sertain is straight to the point and doesn't require any excess setup. By utilizing Kotlin's syntax, DSL builders, callbacks, and coroutines, Sertain allows you to focus less on boilerplate and more on coding your robot. ### Utilizes Kotlin Sertain is built from the ground up to take full advantage of the Kotlin, a modern programming language built on top of Java. While Java has gotten better over the years, it still has problems like poor null safety and being very verbose. Kotlin's syntax is easier on the eyes and allows you to do more while write less code. Want to learn Kotlin? Check out this [tutorial](https://beginnersbook.com/2017/12/kotlin-tutorial/)! ## Installation It is recommended by FIRST that you use [Gradle](https://gradle.org/) to build your FRC projects, so that is the method that this guide will cover. First, add this line to your `dependencies` block: ```gradle maven { url 'https://jitpack.io' } ``` Then, add this line to your `repositories` block: ```gradle implementation 'com.github.SouthEugeneRoboticsTeam:sertain:0.1.1' ``` ## What's it look like? Here's a simple program that runs a motor controller at full strength while the robot is in teleop mode: ```kotlin suspend fun main() = Robot.start { val motor = MotorController(TalonId(1)) onTeleop { periodic { motor.setPercentOutput(1.0) } } } ``` Like what you see? Take a look at the [docs](https://github.com/sertainLib/sertain/wiki)!

近期下载者

相关文件


收藏者