- 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.
- 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).
- Next,
cd
into thesc1-driver-io
repository and rungit submodule update --init
.
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.
- If you are using windows, install Ubuntu via WSL, you can use any other distribution if you're experienced with linux.
- Ensure you have cmake and build-essentials installed you can do so by
sudo apt install build-essential cmake
- Install qt packages with
sudo apt install qt5-doc qtbase5-examples qtbase5-doc-html qtdeclarative5-dev qml-module-qtquick-controls2
cd
into your project directory andmkdir build
to create a new build folder thencd build
- Run
cmake ..
to generate make file for the project, then runmake
to compile the project. - To execute the program run
./solar-car-dashboard
.
- Again, make sure you have Qt installed on your computer.
- 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).
- If you have not already, clone the
sc1-data-format
repository and initialize the submodule (see instructions above). - Open the repository in Qt Creator and, if necessary, configure the project using the appropriate kit for your environment.
- 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).- 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.
- To avoid pushing changes that use obsolete data, update the submodule before you
- 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.
- 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
). - 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!)
- 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.
- 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.
- 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
- Copy the project to the Raspberry Pi.
- make a build directory with in the project, make sure you are in the directory
- Make and run the project on the Raspberry Pi by running the following commands:
cmake .. make ./solar-car-dashboard