Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Merge branch dev to massively overhaul the library's functions and API.
Features include:

* Completely revamped background motor code
* Very well organized file structure
* AutoChassis
* ArmAssembly
* XLineFollower
* ColorFollower
* Builders to make object instantiation much more flexible
* Wrappers for common sensors and motor functionality
* InertialMotor for aligning the robot based on its angle
* Completely built-in logo that shows on startup
* The "inu" namespace
* Bash script to change program icon
* Types.hpp for common types; i.e. Port
* Exceptions
  • Loading branch information
Diego Contreras committed Dec 8, 2021
2 parents 0da87eb + 67174ed commit 705194e
Show file tree
Hide file tree
Showing 71 changed files with 5,264 additions and 927 deletions.
22 changes: 22 additions & 0 deletions PSEUDO
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Plan of the competition:
Go to headquarters
Collect the 3 Jenga Blocks (topright to bottomleft)
Knock over kittens
go back to starting position
Collect two left over Jenga blocks
Stack cup over villain
Go back to base
DONE

Pseudocode:
Turn right 45 degrees
Keep going forward until you hit headquarters
turn 360 degrees
turn 135 degrees

while hasn't reached kittens:
go forward
if block detected
collect it


86 changes: 86 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Challenges to overcome
* Move a specific amount (DONE)
* Turn a certain angle (DONE)
* Follow a line a certain distance
* Pick up block (DONE
* Hold arm in position (DONE)

NOTE to self:
MoveVelocity() is horrible for driving, use voltage instead



Library issues that need to be addressed:
* How to follow a line asynchronously such that it stops at a certain distance

* Address drive train slop
* Add reverse motor functionality
* Add exceptions



Library Comments (since the commit after c3ae2a862709d610a57659b6e13b8ead1ca859d5):
[DONE]: The file is 100% complete; Nothing needed.
[DOC]: The file needs new or updated documentation.
[WIP]: The file is in WIP
[REVIEW]: The file should be reviewed in the future for possible bugs

include/inu
ControllerCallback.h [REVIEW]
ControllerStream.h [REVIEW]

auto/
ArmAssembly.h [WIP] // Need to implement button
ArmAssemblyBuilder.h [WIP] // Need to implement button
XLineFollower.h [WIP]
XLineFollowerBuilder.h [WIP]

chassis/
AutoChassis.h [DOC]
AutoChassisBuilder.h [DOC]
AutoXChassis.h [DOC]
AutoXChassisBuilder.h [DOC]

motor/
PID.h [DONE]
PIDProfile.hpp [DONE]

background/
BackgroundMotor.h [DONE]
BackgroundMotorSystem.h [DOC]
PIDInertialMotor.h [DOC]
PIDMotor.h [DOC]
PIDVisionMotor [???????]
SlewMotor.h [REVIEW]

wrapper/
ADIMotor.h [REVIEW]
LineSensor.h [REVIEW]
Motor.h [REVIEW]
VisionSensor.h



















FOR later use
1. Implement functions in new class Chassis, that allows you to set the speed of all motors manually (Turn, forward)
2. Map controller joysticks to chassis
3. Define ChassisBuilder
Option for Slew, other stuff

4. If you're bored use ChassisBuilder in AutoChassisBuilder
9 changes: 0 additions & 9 deletions compile.bash

This file was deleted.

19 changes: 19 additions & 0 deletions compileAndRun.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# You can choose other image son https://www.vexforum.com/t/a-guide-to-changing-program-icons/78293/8



if ! pros build-compile-commands
then
exit 1
fi


if ! pros upload --icon "USER029x.bmp"
then
exit 1
fi

sleep 4s


pros terminal
104 changes: 0 additions & 104 deletions include/ControllerCallback.h

This file was deleted.

72 changes: 0 additions & 72 deletions include/ControllerStream.h

This file was deleted.

81 changes: 0 additions & 81 deletions include/PIDMotor.h

This file was deleted.

Loading

0 comments on commit 705194e

Please sign in to comment.