Skip to content

Latest commit

 

History

History
126 lines (110 loc) · 4.54 KB

DesignDOC.md

File metadata and controls

126 lines (110 loc) · 4.54 KB

Vex EDR 20195868C Program Design Document


Index

1. GameRules

2. Program structure and goals


3. Features and Progress

Game Rules

Tower TakeOver


Program structure and goals

1. Program platform and language

  • Language: C++
  • Develop Platform: PROS
  • Version Control: git

  • PROS develop steps:
    1. Install visual studio code
    2. Install C/C++ Support
    3. Install PROS CLI (PROS command-line-interface)

    2. Program Struture

    The project structure is like the following:

    |-> include

    |-> Config.h: Containing constants used throughout the whole program
    |-> Robot.h : Containing instance for sensors, motors, etc.
    |-> RobotAuto.h : Containing the RobotAuto class, which is a class that provide more features using the foundation of Robot.h
    |-> vector2d.h : Containing the class of vector2d
    |-> typedefs.h : All typedefs that will be used throughout the program (including vector2d)
    |-> Debug.h : Header that provide extensive feature for debugging output (output can be viewed using the terminal)
    |-> gui.h : Containing function headers that do stuff related to the gui on V5 (using LVGL)

    |-> src

    |-> initilize.cpp : Containing code that would be executed before Autonomous
    |-> autonomous.cpp : Containing code for Autonomous
    |-> opcontrol.cpp : Containing code for Driver-Control Period
    |-> RobotAuto.cpp : Containing function implementations of class RobotAuto
    |-> Debug.cpp : Containing function implementations for Debug.h
    |-> gui.cpp : Containing code that will produce the gui on V5

    3. Program thoughts

    Use Object-Oriented-Programming Here are the classes we plan to use:
    1. Robot
    2. containing all motors and sensors on the robot (excluding the instance of the joystick)
      Might contain some function for specific job like moving claws
    3. RobotAuto
    4. inherit from the Robot class
      More functions for autonomous movement like:
      • MoveDistance(): call the robot to move a specific distance
      • Turn(): call the robot to turn a specific angle

    Some structures and objects are used in the program:
    1. vector2d
    2. A class that can store a 2D Vector, it stores the x, y value of that vector.
    3. AutonPos_t
    4. A enum type that stores the desire autonomous starting position of the robot.

Features and Progress

OpControl

Operator Control's code is now fully operating, with all desire features enabled. The following features are included:

  • Free Movement
  • Side Sliding Movement
  • Intake Control
  • Intake-Lifter Control
  • Lifter Control

Autonomous

Hot/Cold Linking

Hot/Cold Linking, a feature provided by PROS, is enabled, so library code is compiled into cold code, user code is compiled into hot code.

Each time, the robot will detect the library's status on the robot, and if the library is fine, it will only upload hot code.

Thus, upload time(especially wireless), will be shorten significantly. For more info, go to https://pros.cs.purdue.edu/v5/tutorials/topical/wireless-upload.html