Skip to content

Solar Car 1 Driver IO Program - Firmware, Networking, and Dashboard

Notifications You must be signed in to change notification settings

badgerloop-software/sc1-driver-io

Repository files navigation

Solar Car 1 Driver IO Program

Solar Car Dashboard

Libraries/Frameworks

  • Qt - Development framework
  • RapidJSON - JSON parsing library

Cloning the Data Format Repository and Initializing the Submodule

  1. If you don't already have an SSH key, generate a new SSH key (only the steps under "Generating a new SSH key" are required) and add it to your GitHub account.
  2. Once you have an SSH key, clone this repository to your computer. Make sure to clone it using SSH (when you go to copy the clone link, there will be an SSH option above the link).
  3. Next, cd into the sc1-driver-io repository and run git submodule update --init.

Running with CMake

CMake is a more popular project make system, it allows you to edit the project with your ide of choice and enables features like autocomplete while not bounded to using qtcreator.

  1. If you are using windows, install Ubuntu via WSL, you can use any other distribution if you're experienced with linux.
  2. Ensure you have cmake and build-essentials installed you can do so by sudo apt install build-essential cmake
  3. Install qt packages with sudo apt install qt5-doc qtbase5-examples qtbase5-doc-html qtdeclarative5-dev qml-module-qtquick-controls2
  4. cdinto your project directory and mkdir build to create a new build folder then cd build
  5. Run cmake .. to generate make file for the project, then run make to compile the project.
  6. To execute the program run ./solar-car-dashboard.

Contributing to the Dashboard

  1. Again, make sure you have Qt installed on your computer.
  2. Clone the repository to your computer (see steps 0-1 of "Cloning the Data Format Repository and Initializing the Submodule" for instructions on cloning a repo using SSH).
  3. If you have not already, clone the sc1-data-format repository and initialize the submodule (see instructions above).
  4. Open the repository in Qt Creator and, if necessary, configure the project using the appropriate kit for your environment.
  5. Run git submodule update --remote to update necessary submodules. You should also do this any time the submodule might have changed (i.e. whenever the data format has been modified).
    1. To avoid pushing changes that use obsolete data, update the submodule before you git push your changes. If there are changes to the data format, run the dashboard to make sure your code still works.
  6. To run the dashboard on your computer, simply press the green arrow in the bottom-left corner of the Qt Creator window. To run the project on a Raspberry Pi, see "Compiling and Running the Project on a Rapberry Pi" below.
  7. Once you have finished making your necessary changes to your code, switch to a new branch that has a good name for the feature or names the Jira issue (e.g. SW-23/skeleton).
  8. Commit related changes to that branch and push to this repository. (Do this often so that it is easy to finely revert to a previous state!)
    1. When committing and pushing changes, do not add your solar-car-dashboard.pro.user file to the version control, as this is specific to your computer.
  9. Once you are happy with the state of your code, open a pull request and request someone to conduct a code review. It may be kicked back with some suggestions or edits, but when it is accepted, it will be merged with main. Congrats! Now it's just time to rinse and repeat.

Compiling and Running the Project on a Rapberry Pi

  1. If running the project on the driver IO board, skip this step, as the necessary dependencies have already been installed on it. Otherwise, if you have not already, install the dependencies on the Raspberry Pi:
    sudo apt install build-essential cmake
    sudo apt install qt5-doc qtbase5-examples qtbase5-doc-html qtdeclarative5-dev qml-module-qtquick-controls2
    
  2. Copy the project to the Raspberry Pi.
  3. make a build directory with in the project, make sure you are in the directory
  4. Make and run the project on the Raspberry Pi by running the following commands:
    cmake ..
    make
    ./solar-car-dashboard
    

About

Solar Car 1 Driver IO Program - Firmware, Networking, and Dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published