Skip to content

Commit

Permalink
add pdf guide and make other workflows stop running lole
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbrook committed Feb 26, 2024
1 parent ef97a62 commit 592eec9
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build and run windows executable

on:
push:
branches: "main"
branches: "develop"
# pull_request:
# branches: "main"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build and run linux executable

on:
push:
branches: "main"
branches: "develop"
# pull_request:
# branches: "main"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: generate DBC and C code
on:
push:
branches:
- main # Replace 'main' with your main branch name a
- develop # Replace 'main' with your main branch name a

jobs:
build:
Expand Down
63 changes: 36 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@

## Intro
# Intro

![team logo](readmepics\kennesawmotorsports.jpg)
Welcome to the folder containing all the KENNESAW STATE FSAE data acquisition services. The entire system is Python and MatLab based.

- If you have any questions or need troubleshooting, feel free to reach out to Matthew Samson on Teams, Discord: mathbrook or via email: <[email protected]>

# parser setup

## PDF GUIDE:

![Here is the setup guide in PDF form](./readmepics/Parser%20setup%20and%20run%20guide.pdf)

the parser is the tool to decode our vehicle [CAN](https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial) logs, which look like this:

```csv
Expand All @@ -27,28 +32,28 @@ there are two options for using the parser:

2. install python, clone repo, install packages and run script (more complicated but easier to update)

## downloading executable
## Downloading the executable

1. Click this link to download the latest windows executable: <https://github.com/KSU-MS/KS5e-Data-Logging/releases/latest/download/parser_exe_windows.zip>

1. go to <https://github.com/KSU-MS/KS5e-Data-Logging/actions/workflows/build-exe.yml?query=branch%3Adevelop+branch%3Amain++>
- you should see this: ![picture of workflow run page](readmepics/image.png)
2. click the workflow run (in this case `Merge pull request...`)
2. once that download is complete, extract the contents of the .zip file
3. Open the extracted folder and navigate to parser-exe-windows/dist/ ![parser exe download directory](readmepics\parser-exe-directory.png)
4. Click on `parser_exe.exe` to run it
- Windows may give a warning when trying to run the program, click on 'more info' and then 'run anyway' to bypass it

3. scroll down to the bottom of the page and click the artifact to download it:
- ![picture of artifact download under workflow run](readmepics/image1.png)
- your browser may alert you that you are downloading a virus, but trust the download and let it continue
## Matlab Setup:

4. once that download is complete, extract the contents of the .zip file to a folder
5. run `parser_exe.exe`
For MatLab (used for plotting data), follow KSU's instructions here: <https://www.mathworks.com/academia/tah-portal/kennesaw-state-university-31081932.html>

### manual python install
You should be able to get it installed and licensed with your student email

## manual python install

1. Python 3 is required, and may be installed here: <https://www.python.org/downloads/>. Make sure it is added to PATH
- Python 3.8 is recommended to guarantee compatibility
2. For MatLab (OPTIONAL), you will need an education/work license to get it for free. Follow KSU's instructions here: <https://www.mathworks.com/academia/tah-portal/kennesaw-state-university-31081932.html>
- Really the only thing you need MatLab for is to plot the data after parsing. Otherwise, just having Python is enough
3. If you have not done so already, clone this GitHub repo or download it as a zip, extract, and save to somewhere safe
4. Change directory to the repo. All you have to do is `cd KS5e-Data-Logging`
5. optional step, create a python virtual environment by running these commands:
2. If you have not done so already, clone this GitHub repo or download it as a zip, extract, and save to somewhere safe
3. Change directory to the repo. All you have to do is `cd KS5e-Data-Logging`
4. optional step, create a python virtual environment by running these commands:

```python
pip install virtualenv
Expand All @@ -59,35 +64,39 @@ pip install -r requirements.txt

why venv is good to use: <https://stackoverflow.com/questions/41972261/what-is-a-virtualenv-and-why-should-i-use-one>

6. Once you are here, download the needed pip libraries by issuing the command `pip install -r requirements.txt`
5. Once you are here, download the needed pip libraries by issuing the command `pip install -r requirements.txt`

## User's Guide

If you are a user, everything you need to care about is in the `telemetry_exe` folder. Navigate to that directory.

There are two services: the **Live Console**, the **Parser and Plotter**

### Parser and Plotter
# Parsing and plotting data

### Parsing steps

1. Get the raw data CSVs from the SD card on the vehicle
1. Get the raw data CSVs from the SD card on the vehicle OR download from Microsoft Teams
2. Copy them to a folder on your computer
3. If you chose to manually set up the parser, you can either run the file `parser_exe.py` with the Python Interpreter or issue the command `python parser_exe.py`
4. Otherwise if you downloaded the executable, run `parser_exe.exe`
5. Wait for the process to finish (a success message from `parser_exe.py` followed by termination)
6. You may now retrieve the parsed data from the `parsed-data` as well as the `temp-parsed-data` folder and the .mat file `output.mat`
5. The program will prompt you to select the folder with the data you downloaded
6. Once the program is finished running, it will open the directory where your raw data was
7. You may now retrieve the parsed data from the `parsed-data` as well as the `temp-parsed-data` folder and the .mat file `output.mat`
- logs in `parsed-data` are formatted differently than in `temp-parsed-data`, but the results are the same

If you run the parser in the same raw data folder again, it will overwrite the files in `parsed-data` and `temp-parsed-data`

_The next steps are optional - only if you want to plot the results_
### Plotting steps

7. Open `dataPlots.m` in MatLab
8. In MatLab, first load `output.mat` by double clicking it on the sidebar. Then click run on `dataPlots.m`
1. Open `dataPlots.m` in MatLab
2. In MatLab, first load `output.mat` by double clicking it on the sidebar. Then click run on `dataPlots.m`
- This script will not execute fully if there is not enough data, and it will stop on the first plot it is missing data for
- comment out plot lines in the script if necessary, or run the script section by section

### Live Console
<!-- ### Live Console -->

1. Either run the file `console_exe.py` with the Python Interpreter or issue the command `py -3 console_exe.py`
<!-- 1. Either run the file `console_exe.py` with the Python Interpreter or issue the command `py -3 console_exe.py`
2. Select your source of data input and run it
- currently the only working data source is "teensy"
-
- -->
Binary file added readmepics/Parser setup and run guide.pdf
Binary file not shown.
Binary file added readmepics/parser-exe-directory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 592eec9

Please sign in to comment.