This file contains 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
package com.qualcomm.ftcrobotcontroller.opmodes; | |
import com.qualcomm.robotcore.eventloop.opmode.OpMode; | |
import com.qualcomm.robotcore.hardware.DcMotor; | |
/** | |
* Created by winterst on 9/12/15. | |
*/ | |
public class Arcade extends OpMode{ | |
DcMotor motorRight; |
This file contains 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
alias deploy="networksetup -setairportnetwork en0 1418 Fedora1418;robot;./robot.py deploy" | |
alias robot="cd ~/src/2016-robot/robot" | |
alias sim="robot;./robot.py sim" | |
alias pyfrc="pip3 install -U pyfrc --user" | |
This file contains 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
def initialize(self): | |
from autonomous import SimpleAutonomous | |
self.obstacles = { | |
'LowGoal': SimpleAutonomous.LowGoal(), | |
'A0': SimpleAutonomous.DirectPortcullis(), | |
'A1': SimpleAutonomous.ChevalDeFrise() | |
} | |
@state(first = True) | |
def main_autonomous(self, initial_call): | |
if initial_call: |
This file contains 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
#! /usr/bin/env python3 | |
import wpilib | |
from robotpy_ext.control import xbox_controller | |
import magicbot | |
class MyRobot(magicbot.MagicRobot): | |
def createObjects(self): | |
self.driveStick = xbox_controller.XboxController(0) | |
This file contains 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
"field": { | |
"w": 27, | |
"h": 27, | |
"px_per_ft": 10, | |
"objects": [ | |
{ "color": "blue", | |
"points": [ [0, 0], [0, 4.5], [24, 4.5], [24, 0] ] }, | |
This file contains 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
from pyfrc.physics.drivetrains import four_motor_drivetrain | |
import wpilib | |
class PhysicsEngine: | |
def __init__(self, controller): | |
self.controller = controller | |
def update_sim(self, hal_data, now, tm_diff): |
This file contains 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
package com.qualcomm.ftcrobotcontroller.opmodes.autonomous; | |
/** | |
* Created by winterst on 2/11/16. | |
*/ | |
public class BlueColorAuto extends StatefulAutonomous{ | |
@timed_state(duration = 15, first = true) | |
public void driveForward() throws NoSuchMethodException { | |
tank.move(-.25f, -.25f); |
This file contains 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
while (change >= tolerance) | |
{ | |
change = 0.0; | |
for (int i = 1; i < path.length - 1; i++) | |
{ | |
for (int j = 0; j < path[i].length; j++) | |
{ | |
double aux = newPath[i][j]; | |
newPath[i][j] += (weight_data * (path[i][j] - newPath[i][j])) + (weight_smooth * (newPath[i - 1][j] + newPath[i + 1][j] - (2.0 * newPath[i][j]))); | |
change += Math.abs(aux - newPath[i][j]); |
This file contains 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
// | |
// FrameExtractor.swift | |
// Created by Bobo on 29/12/2016. | |
// | |
import UIKit | |
import AVFoundation | |
protocol FrameExtractorDelegate: class { | |
func captured(image: UIImage) |
This file contains 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
//The Structures for Lines, Sets and the cache itself/// | |
struct Line { | |
int valid; | |
unsigned long tag; | |
int age; | |
}; | |
struct Set { | |
struct Line* lines; | |
}; |
OlderNewer