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
@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" | |
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
#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
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
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
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; |
NewerOlder