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
void AutoBaseWaitUntilTickCrossed(int wantedLeft, int wantedRight, int maxTime = 5000) | |
{ | |
wait1Msec(AutoDriveBase.loopRate * 2); | |
bool leftDirection = (SensorValue[AutoDriveBase.leftEn] < wantedLeft); | |
bool rightDirection = (SensorValue[AutoDriveBase.leftEn] < wantedRight); | |
bool isLeftCompleted = false; | |
bool isRightCompleted = false; | |
bool isCompleted = false; |
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
void AutoBaseWaitUntilComplete(int maxTime = 5000) | |
{ | |
wait1Msec(AutoDriveBase.loopRate * 2); | |
int emergencyCount = 0; | |
while(!AutoDriveBase.isCompleted && emergencyCount < abs(maxTime)) | |
{ | |
emergencyCount += AutoDriveBase.loopRate; |
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
shopt -s nullglob | |
TRANSLATEFILE=./TRANSLATE_ME.txt | |
for dir in $1 $2 $3 $4 $5 | |
do | |
for file in `find $dir -type f -name "*.cpp" -o -name "*.hpp"`; | |
do | |
[ -f "$file" ] || break | |
echo "Translating \"$file\"" |
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
#include "Graph.hpp" | |
Graph::Graph(lv_obj_t* parent) : Graph(parent, lv_obj_get_style(parent)->body.main_color) {} | |
Graph::Graph(lv_obj_t* parent, lv_color_t mainColor) : | |
graph(lv_chart_create(parent, NULL)) | |
{ | |
lv_obj_set_size(graph, lv_obj_get_width(parent), lv_obj_get_height(parent)); | |
lv_obj_align(graph, NULL, LV_ALIGN_CENTER, 0, 0); | |
lv_chart_set_type(graph, LV_CHART_TYPE_LINE); |
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
#include "main.h" | |
static bool isCompetition = false; //will be toggled when autonomous is run | |
/*** | |
* _____ _ _ _ _ _ | |
* |_ _| (_) | (_) | (_) | |
* | | _ __ _| |_ _ __ _| |_ _______ | |
* | || '_ \| | __| |/ _` | | |_ / _ \ | |
* _| || | | | | |_| | (_| | | |/ / __/ |
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
@if (@X)==(@Y) @end /* Harmless hybrid line that begins a JScript comment | |
@goto :Batch | |
::JREPL.BAT by Dave Benham | |
::/History | |
:: | |
:: 2018-10-20 v7.15: Add a string literal syntax to the /INC and /EXC options. | |
:: 2018-10-15 v7.14: Bug fix - User defined variables declared in /JBEG named | |
:: str and/or obj were getting clobbered. | |
:: Bug fix - Internal variable xbytes was visibile to user |
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
#include "main.h" | |
#include "pidVelSystem.hpp" | |
Motor flywheel(1); | |
double flywheelRatio = 15; | |
velPID pid(0.35, 0.05, 0.045, 0.9); | |
emaFilter rpmFilter(0.15); | |
double motorSlew = 0.7; | |
double targetRPM = 0; |
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
// arrays to store the three lines of text | |
std::array<std::string, 3> lines = {}; | |
// used to compare with previous text to see if an update to the controller is needed | |
std::array<std::string, 3> lastLines = {}; | |
// to print text, all you need to do is write to the `lines` array | |
// lines[lineNum] = "text"; | |
void controller_print(void*){ |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'canary', |
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
#include "controllerPrinter.hpp" | |
using namespace pros::c; | |
namespace lib7842 { | |
ControllerPrinter::ControllerPrinter() : task(taskFnc, this) {} | |
void ControllerPrinter::print(int line, std::string str, pros::controller_id_e_t id) { | |
lines[id].at(line) = str; | |
} |
OlderNewer