Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
NewAutoCode
Browse files Browse the repository at this point in the history
  • Loading branch information
MNRedPanda committed Mar 1, 2024
1 parent 726d51a commit 0314efe
Show file tree
Hide file tree
Showing 4 changed files with 427 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/auton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#include "main.h"
#include "pros/rtos.hpp"

ASSET(firstpttwo_txt);
ASSET(sixballend_txt);

/**
* Runs the user autonomous code. This function will be started in its own task
* with the default priority and stack size whenever the robot is enabled via
Expand All @@ -22,6 +25,8 @@
*/

// ASSET(to_bar_txt)
//ASSET(path_jerryio_txt)
//chassis.follow(path_jerryio_txt, 15, 5000);

void autonomous() {
switch (lib::selector::auton) {
Expand Down Expand Up @@ -57,7 +62,6 @@ void autonomous() {
chassis.moveToPoint(14, 48, 2000); // push in all four triballs
chassis.waitUntilDone();
flaps.set_state(lib::FlapState::Idle);

/*
//offensive w 9080c
hang.set_state(lib::HangState::Expanded);
Expand Down Expand Up @@ -137,8 +141,11 @@ void autonomous() {
flaps.set_state(lib::FlapState::Expanded); // open wings
chassis.moveToPoint(75, 70, 2000); // push into goal
chassis.waitUntilDone();
chassis.moveToPoint(50, 65, 1500, false);
chassis.waitUntilDone();
chassis.moveToPoint(75, 70, 2000);
chassis.waitUntilDone();
chassis.moveToPoint(60, 65, 1500, false);

/*
chassis.moveToPoint(60, 55, 200
0, false);
Expand Down
194 changes: 194 additions & 0 deletions static/first.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
-48.542, -50.879, 87.6
-46.861, -49.796, 86.534
-45.274, -48.58, 85.065
-43.806, -47.224, 85.134
-42.47, -45.736, 87.003
-41.254, -44.149, 84.034
-40.093, -42.52, 80.955
-38.887, -40.925, 77.755
-37.531, -39.457, 74.419
-35.967, -38.215, 75.105
-34.231, -37.225, 81.471
-32.376, -36.479, 86.407
-30.455, -35.925, 88.587
-28.498, -35.517, 92.128
-26.521, -35.216, 93.499
-24.533, -34.999, 95.573
-22.538, -34.855, 96.341
-20.541, -34.763, 96.969
-18.541, -34.715, 97.482
-16.541, -34.703, 97.902
-14.541, -34.722, 97.902
-12.542, -34.772, 98.246
-10.543, -34.844, 98.529
-8.545, -34.93, 98.62
-8.2, -33.173, 99.255
-8.059, -31.178, 99.361
-7.91, -29.184, 99.463
-7.754, -27.19, 99.563
-7.592, -25.196, 99.661
-7.425, -23.203, 99.759
-7.255, -21.21, 99.856
-7.083, -19.218, 99.953
-6.909, -17.225, 99.949
-6.736, -15.233, 99.849
-6.565, -13.24, 99.747
-6.396, -11.247, 99.643
-6.231, -9.254, 99.534
-6.071, -7.261, 99.421
-5.918, -5.266, 99.303
-5.773, -3.272, 99.178
-5.638, -1.276, 99.046
-5.515, 0.72, 98.906
-5.404, 2.717, 98.755
-5.309, 4.715, 98.594
-5.23, 6.713, 98.419
-5.171, 8.712, 98.231
-5.134, 10.712, 98.025
-5.12, 12.712, 97.801
-5.137, 14.712, 97.287
-5.185, 16.711, 96.991
-5.269, 18.709, 96.665
-5.391, 20.705, 96.305
-5.557, 22.698, 95.907
-5.772, 24.687, 94.983
-6.051, 26.667, 94.447
-6.392, 28.638, 93.857
-6.802, 30.595, 93.209
-7.302, 32.531, 91.733
-7.894, 34.441, 90.907
-8.586, 36.317, 89.689
-10.373, 36.261, 97.035
-12.34, 35.904, 96.685
-14.315, 35.586, 96.284
-16.295, 35.309, 95.822
-18.282, 35.081, 95.289
-20.275, 34.907, 94.675
-22.271, 34.795, 93.967
-24.271, 34.752, 93.15
-26.27, 34.789, 92.209
-28.266, 34.916, 91.128
-30.252, 35.144, 89.802
-32.221, 35.492, 86.929
-34.156, 35.996, 84.414
-36.042, 36.656, 81.351
-37.842, 37.525, 78.919
-39.517, 38.614, 75.636
-41.013, 39.937, 73.137
-42.269, 41.488, 72.638
-43.239, 43.233, 74.235
-43.906, 45.115, 77.281
-44.283, 47.077, 80.871
-44.405, 49.072, 84.315
-44.3, 51.068, 85.865
-44.013, 53.047, 88.54
-43.582, 54.999, 89.667
-43.011, 56.916, 91.543
-42.342, 58.8, 92.316
-41.579, 60.648, 93.223
-39.665, 60.728, 100
-37.666, 60.672, 100
-35.667, 60.616, 100
-33.667, 60.561, 100
-31.668, 60.505, 100
-29.669, 60.449, 100
-27.67, 60.394, 100
-25.671, 60.338, 100
-23.671, 60.282, 100
-21.672, 60.227, 100
-19.673, 60.171, 100
-17.674, 60.115, 100
-15.674, 60.06, 100
-13.675, 60.004, 100
-11.676, 59.948, 100
-9.677, 59.893, 100
-7.678, 59.837, 100
-5.678, 59.781, 100
-3.679, 59.726, 100
-1.68, 59.67, 100
0.319, 59.614, 100
2.319, 59.559, 100
4.318, 59.503, 100
6.317, 59.447, 100
8.316, 59.392, 100
10.316, 59.336, 100
12.315, 59.28, 100
14.314, 59.225, 100
16.313, 59.169, 100
18.312, 59.113, 100
20.312, 59.058, 100
22.311, 59.002, 100
24.31, 58.946, 100
26.309, 58.891, 100
28.309, 58.835, 100
30.308, 58.779, 100
32.307, 58.724, 100
34.306, 58.668, 100
36.305, 58.612, 99.252
38.305, 58.555, 96.659
40.304, 58.498, 93.995
42.303, 58.441, 91.253
44.302, 58.379, 88.425
46.301, 58.318, 85.505
48.3, 58.254, 82.48
50.299, 58.187, 79.341
52.298, 58.119, 76.073
54.296, 58.045, 72.657
56.295, 57.967, 69.073
58.293, 57.884, 65.292
60.291, 57.789, 61.278
62.288, 57.678, 56.983
64.282, 57.532, 52.336
64.725, 57.16, 91.274
62.73, 57.022, 98.379
60.732, 56.937, 99.1
58.733, 56.869, 99.455
56.734, 56.811, 99.652
54.735, 56.759, 99.652
52.735, 56.713, 99.77
50.736, 56.669, 99.847
48.736, 56.628, 99.9
46.737, 56.589, 99.9
44.737, 56.551, 99.938
42.737, 56.514, 99.938
40.738, 56.478, 99.968
38.738, 56.443, 99.993
36.738, 56.408, 99.993
34.739, 56.373, 99.986
32.739, 56.339, 99.986
30.739, 56.304, 99.966
28.739, 56.269, 99.966
26.74, 56.233, 99.946
24.74, 56.197, 99.946
22.74, 56.161, 98.128
20.741, 56.123, 95.504
18.741, 56.085, 92.806
16.742, 56.045, 90.028
14.742, 56.004, 87.161
12.742, 55.962, 84.196
10.743, 55.918, 81.124
8.743, 55.873, 77.93
6.744, 55.825, 74.599
4.745, 55.774, 71.113
2.745, 55.722, 67.447
0.746, 55.665, 63.569
-1.253, 55.606, 59.439
-3.252, 55.541, 55
-5.251, 55.471, 50.17
-7.249, 55.396, 44.822
-9.248, 55.313, 38.743
-11.245, 55.218, 31.513
-13.242, 55.11, 22.024
-15.148, 54.993, 0
-15.148, 54.993, 0
-35.111, 53.763, 0
endData
127
100
200
-48.542, -50.879, -34.691, -42.721, -45.506, -33.044, -8.318, -34.941
-8.318, -34.941, -6.61, -8.189, -1.867, 20.271, -8.697, 36.588
-8.697, 36.588, -41.711, 29.758, -49.49, 42.85, -41.521, 60.779
-41.521, 60.779, -2.341, 59.688, -2.341, 59.688, 36.839, 58.597
36.839, 58.597, 115.199, 56.416, 10.845, 56.795, -15.148, 54.993
#PATH.JERRYIO-DATA {"appVersion":"0.6.0","format":"LemLib v0.4.x (inch, byte-voltage)","gc":{"robotWidth":12,"robotHeight":12,"robotIsHolonomic":false,"showRobot":false,"uol":2.54,"pointDensity":2,"controlMagnetDistance":1.968503937007874,"fieldImage":{"displayName":"VRC 2024 - Over Under (Skill)","signature":"VRC 2024 - Over Under (Skill)","origin":{"__type":"built-in"}}},"paths":[{"segments":[{"controls":[{"uid":"Wgbd0vqjYj","x":-48.541567086268635,"y":-50.879090954713085,"lock":false,"visible":true,"heading":0,"__type":"end-point"},{"uid":"Zbzsl0jjqT","x":-34.69097922941432,"y":-42.72052550478519,"lock":false,"visible":true,"__type":"control"},{"uid":"ZcOMUSFQb7","x":-45.505821802574545,"y":-33.04408741301025,"lock":false,"visible":true,"__type":"control"},{"uid":"JrLst8lu4X","x":-8.317942077321835,"y":-34.941428215319064,"lock":false,"visible":true,"heading":0,"__type":"end-point"}],"speedProfiles":[],"lookaheadKeyframes":[],"uid":"AGc7zL7Mxr"},{"controls":[{"uid":"JrLst8lu4X","x":-8.317942077321835,"y":-34.941428215319064,"lock":false,"visible":true,"heading":0,"__type":"end-point"},{"uid":"iS4py2lFc4","x":-6.610335355243905,"y":-8.188922902764824,"lock":false,"visible":true,"__type":"control"},{"uid":"T1ybepsIOl","x":-1.8669833494718775,"y":20.27118913186735,"lock":false,"visible":true,"__type":"control"},{"uid":"32nmuLrIhF","x":-8.697410237783599,"y":36.58832003172313,"lock":false,"visible":true,"heading":0,"__type":"end-point"}],"speedProfiles":[],"lookaheadKeyframes":[],"uid":"DnZdjvDqg6"},{"controls":[{"uid":"32nmuLrIhF","x":-8.697410237783599,"y":36.58832003172313,"lock":false,"visible":true,"heading":0,"__type":"end-point"},{"uid":"YIcoeNIWqd","x":-41.711140197956915,"y":29.757893143411405,"lock":false,"visible":true,"__type":"control"},{"uid":"f4corScUSd","x":-49.490237487423045,"y":42.8495446793422,"lock":false,"visible":true,"__type":"control"},{"uid":"Fh4UTZTQbe","x":-41.52140611772603,"y":60.77941526116048,"lock":false,"visible":true,"heading":0,"__type":"end-point"}],"speedProfiles":[],"lookaheadKeyframes":[],"uid":"91XJ1YJrSF"},{"controls":[{"uid":"Fh4UTZTQbe","x":-41.52140611772603,"y":60.77941526116048,"lock":false,"visible":true,"heading":0,"__type":"end-point"},{"uid":"rBx6PMbVXj","x":36.838769017627875,"y":58.59747333850534,"lock":false,"visible":true,"heading":0,"__type":"end-point"}],"speedProfiles":[],"lookaheadKeyframes":[],"uid":"eaRpGksWGX"},{"controls":[{"uid":"rBx6PMbVXj","x":36.838769017627875,"y":58.59747333850534,"lock":false,"visible":true,"heading":0,"__type":"end-point"},{"uid":"nBXx075Rti","x":115.19894415298178,"y":56.4155314158502,"lock":false,"visible":true,"__type":"control"},{"uid":"V7clyzkyBN","x":10.845200025997158,"y":56.794999576311966,"lock":false,"visible":true,"__type":"control"},{"uid":"alYQxnHltT","x":-15.148368965633557,"y":54.9925258141186,"lock":false,"visible":true,"heading":0,"__type":"end-point"}],"speedProfiles":[],"lookaheadKeyframes":[],"uid":"TVSgLLlIz2"}],"pc":{"speedLimit":{"minLimit":{"value":0,"label":"0"},"maxLimit":{"value":127,"label":"127"},"step":1,"from":20,"to":100},"bentRateApplicableRange":{"minLimit":{"value":0,"label":"0"},"maxLimit":{"value":1,"label":"1"},"step":0.001,"from":0,"to":0.1},"maxDecelerationRate":127},"name":"Path","uid":"VN7eq3ZoVb","lock":false,"visible":true}]}
Loading

0 comments on commit 0314efe

Please sign in to comment.