Skip to content

Instantly share code, notes, and snippets.

View NoahBres's full-sized avatar
🍙

Noah NoahBres

🍙
  • ¯\_(ツ)_/¯
View GitHub Profile
/*
* Make sure to use MeepMeep 1.0.1
*
* This is a very rough POC and not polished at all. Velocity doesn't decelerate, no clear units, etc.
* Also the shot in the marker should be moved to a reusable function
*/
/**** RingEntity.java *****/
package com.example.meepmeeptesting;
package com.example.meepmeeptesting;
import com.acmerobotics.roadrunner.geometry.Pose2d;
import com.acmerobotics.roadrunner.geometry.Vector2d;
import com.noahbres.meepmeep.MeepMeep;
import com.noahbres.meepmeep.core.colorscheme.scheme.ColorSchemeBlueDark;
import com.noahbres.meepmeep.core.colorscheme.scheme.ColorSchemeRedDark;
import com.noahbres.meepmeep.roadrunner.Constraints;
import com.noahbres.meepmeep.roadrunner.entity.RoadRunnerBotEntity;
import com.noahbres.meepmeep.roadrunner.trajectorysequence.TrajectorySequence;
import type { NextApiRequest, NextApiResponse } from "next";
import formidable from "formidable";
import mail from "@sendgrid/mail";
mail.setApiKey(process.env.SENDGRID_API_KEY);
// THIS IS IMPORTANT FOR FORMIDABLE
// turn off next bodyparser https://nextjs.org/docs/api-routes/api-middlewares#custom-config
export const config = {
@NoahBres
NoahBres / form.tsx
Created June 20, 2021 20:37
Next Form Standard
import { Fragment, useEffect, useRef, useState } from "react";
import Link from "next/link";
import { Transition } from "@headlessui/react";
import { CheckCircleIcon } from "@heroicons/react/outline";
import { XIcon } from "@heroicons/react/solid";
import { MailIcon, PhoneIcon, MapIcon } from "@heroicons/react/outline";
import { useForm } from "react-hook-form";
public class RubaiyatPOC extends LinearOpMode {
public void runOpMode() {
telemetry = new Rubaiyat(Rubayait.getInstance(), telemetry);
Rubayait.Style r = new Rubaiyat.Style;
telemetry.clear();
// Rubaiyat should convert to html display format transparently
telemetry
.addLine(
function download(url, filename) {
const a = document.createElement('a');
a.style.diplay = 'none';
document.body.appendChild(a);
a.href = url;
a.download = "playlist8.ts";
a.click();
// a.remove();
}
2021-01-06 09:25:34.669 32693-32693/? I/zygote: Late-enabling -Xcheck:jni
2021-01-06 09:25:34.893 32693-32693/com.qualcomm.ftcrobotcontroller D/Uvc: [jni.cpp:72] JNI_OnLoad()...
2021-01-06 09:25:34.893 32693-32693/com.qualcomm.ftcrobotcontroller D/Uvc: [JniEnv.h:32] ScopedJniEnv::onJniLoad()...
2021-01-06 09:25:34.893 32693-32693/com.qualcomm.ftcrobotcontroller D/Uvc: [JniEnv.h:32] ...ScopedJniEnv::onJniLoad()
2021-01-06 09:25:34.893 32693-32693/com.qualcomm.ftcrobotcontroller D/Uvc: [jni.cpp:72] ...JNI_OnLoad()
2021-01-06 09:25:34.897 32693-32693/com.qualcomm.ftcrobotcontroller V/AppUtil: initializing: getExternalStorageDirectory()=/storage/emulated/0
2021-01-06 09:25:34.908 32693-32716/com.qualcomm.ftcrobotcontroller V/RobotCore: saving logcat to /storage/emulated/0/robotControllerLog.txt
2021-01-06 09:25:34.908 32693-32716/com.qualcomm.ftcrobotcontroller V/RobotCore: logging command line: exec logcat -f /storage/emulated/0/robotControllerLog.txt -r4096 -n4 -v threadtime UsbRequestJNI:S UsbRequest:S art:W T
2021-01-06 05:07:40.999 29845-30542/com.qualcomm.ftcrobotcontroller I/chatty: uid=10170(u0_a170) pRunnable.run() expire 2 lines
2021-01-06 05:07:41.490 29845-30225/com.qualcomm.ftcrobotcontroller I/chatty: uid=10170(u0_a170) com.qualcomm.ftcrobotcontroller expire 2 lines
2021-01-06 05:07:41.497 29845-30597/com.qualcomm.ftcrobotcontroller I/chatty: uid=10170(u0_a170) com.qualcomm.ftcrobotcontroller expire 319 lines
2021-01-06 05:07:41.508 29845-30596/com.qualcomm.ftcrobotcontroller I/chatty: uid=10170(u0_a170) SoundPlayer-#0 expire 9 lines
2021-01-06 05:07:41.747 29845-30595/com.qualcomm.ftcrobotcontroller I/chatty: uid=10170(u0_a170) SoundPoolThread expire 12 lines
2021-01-06 05:07:41.769 29845-30602/com.qualcomm.ftcrobotcontroller I/chatty: uid=10170(u0_a170) com.qualcomm.ftcrobotcontroller expire 4 lines
2021-01-06 05:07:41.877 29845-29958/com.qualcomm.ftcrobotcontroller I/chatty: uid=10170(u0_a170) callback looper expire 2 lines
2021-01-06 05:07:42.073 29845-29864/com.qualcomm.ftcrobotcontroller I/chatty:
public class StatePOC extends LinearOpMode {
private StateMachine autoMachine;
private StateMachine wobbleMachine;
enum WobbleState {
IDLE,
GRAB,
LIFT,
HOLD,
DUMP,
@NoahBres
NoahBres / CrashOnStart
Created November 10, 2020 16:25
FTC SDK Crash on Start
2020-11-10 10:24:27.798 16813-16813/? I/zygote: Late-enabling -Xcheck:jni
2020-11-10 10:24:28.022 16813-16813/com.qualcomm.ftcrobotcontroller D/Uvc: [jni.cpp:72] JNI_OnLoad()...
2020-11-10 10:24:28.022 16813-16813/com.qualcomm.ftcrobotcontroller D/Uvc: [JniEnv.h:32] ScopedJniEnv::onJniLoad()...
2020-11-10 10:24:28.022 16813-16813/com.qualcomm.ftcrobotcontroller D/Uvc: [JniEnv.h:32] ...ScopedJniEnv::onJniLoad()
2020-11-10 10:24:28.022 16813-16813/com.qualcomm.ftcrobotcontroller D/Uvc: [jni.cpp:72] ...JNI_OnLoad()
2020-11-10 10:24:28.038 16813-16813/com.qualcomm.ftcrobotcontroller V/AppUtil: initializing: getExternalStorageDirectory()=/storage/emulated/0
2020-11-10 10:24:28.046 16813-16813/com.qualcomm.ftcrobotcontroller I/AppUtil: found usbFileSystemRoot: /dev/bus/usb
2020-11-10 10:24:28.051 16813-16842/com.qualcomm.ftcrobotcontroller V/RobotCore: saving logcat to /storage/emulated/0/robotControllerLog.txt
2020-11-10 10:24:28.051 16813-16842/com.qualcomm.ftcrobotcontroller V/RobotCore: logging command line: ex