driverinterface's People
driverinterface's Issues
Tire Pressure Sensor
- Request from Mechanical team to add tire pressure indication
- Class should keep track of all 4 tires and automatically turn on if over a threshold variable set in the class
- Create 2 buttons to test out the functionality
- Ensure you use relative paths (refer to warning icons for setup)
- setup classes similar to warnings class
Cruise Control Fixes
- Sorry didnt see this the first time :(
- Move cruise control into warning bar with other indicators (lights, motor, battery)
Add Gears
- Add Parking/Reverse/Drive gear icons to indicate which gear we are in
- Three different widgets (can be letters from icons8), only have 1 light up at a time
- Ensure the color is white
- Add a gear class that will keep track of any updates to the gear
Scale Range into Battery Progress Bar
- After the battery and range have been synced, the range value may be over 100, which the battery cannot handle
- There should be a scale function that appropriately scales the range value to values from 0 - 100
Use Layouts for Tire Pressure
- Currently the 4 tires are independent of each other and of the entire car, making it super easy to mess it up
- Use layouts to combine all 5 components into a singular unit
Remove Warning Class
- Remove the warning class
- Migrate the battery fault warning to the battery class
- Migrate the motor fault warning to a new motor class
Create UI components for Motor Warning Class
- Create 2 push buttons with text ON and OFF and names motorWarningON and motorWarningOFF
- Create a label for the icon and replace its initial text with motorWarning
- Create the required slots to allow for functionality when the user clicks on the button and implement said functions
Add Horn Icon
- https://icons8.com/icon/set/horn/ios-filled Check out the first one
- Use white or blue color form the recolor section
- Place it in the same row as the warning labels
- Add a class to control its state
Combine Range and Battery classes
The progress bar and range LCD number should be synced and preferably in the same class. Ensure that when changing the range, it also updates the battery. Ensure to have the range be scaled to the battery and not a hard coded value. This is to ensure that if we have a range below or over 100 miles that we are able to accurately represent that information.
Reduce Total Function Calls
- Memory wise it isnt very efficient to call a bunch of functions, especially if they are nested
- Also unnecessary repeated computation when the output is constant and used throughout the code
- Find such examples and create variables for them to use in various places
Integrate PiWiring (Add physical components to trigger events)
UCR Solar Car Logo on Bootup
- Display the UCR Solar Car Logo on Bootup
- Will require to use stacked widgets and switch between them
- Start on stackWidget_1 with UCR Solar Car Logo and once that has shown, switch to stackWidget_2 with Driver Interface
Have Indicators Blink
- When Indicators are ON, they should blink (you can check standard blink rates to find speed of blinks)
- "Create and start a QTimer and connect timeout() signal to a slot that will switch between the two first images"
- ^^Stackoverflow Solution?!
- Make sure it does not prevent the other components from working
Reduce Variable Memory Allocation - Distance Class
- Currently a lot of the variables have datatypes allocated that they do not completely utilize
- For example, in most cases, we do not need all 32 bits of an int instead we can get away with a int8_t or a uint_t
- Find examples in the stated class and replace those datatypes
- You only have to work on one class at a time to ensure nothing accidentally breaks in the process
Integrate QPixMap into Motor Warning Class
- Currently, the QPixMaps are generated outside the class and require a file path each time they are generated.
- Create a variable inside the Indicators class to hold the QPixMap and instead use that variable to build the QPixMap in the implementation files
- Keep in mind you will have to change the following functions: turn_on(), turn_off()
Update Wiki Links
- Some of the current wiki links/commands have not been updated due to the repo name change
- Change those commands/link
Rearrange Icons
- Rearrange such that the Warning Icons (Battery and Motor) are together and that the lights (Day and Night) are together
Create Driver Interface Documentation Checklist
- Check out the documentation https://www.americansolarchallenge.org/regulations/2023-formula-sun-grand-prix-regulations/
- Add a checklist in a README.md file that has the requirements we must fulfill for Driver Interface
- Link the appropriate section (rule number is enough) to the requirement for easy reference
Cruise Control Regulation
8.8.C Cruise Control - If the solar car is equipped with cruise control, it can only be activated by the driver. The cruise control must be designed to automatically deactivate when the brake controls are manually actuated by the driver, or when the car is shut off
Have cruise control ensure that it only turns on when the driving gear is DRIVE, it should not turn on when it is in PARK, REVERSE, NEUTRAL
Reduce Variable Memory Allocation - Horn Class
- Currently a lot of the variables have datatypes allocated that they do not completely utilize
- For example, in most cases, we do not need all 32 bits of an
int
instead we can get away with aint8_t
or auint_t
- Find examples in the stated class and replace those datatypes
- You only have to work on one class at a time to ensure nothing accidentally breaks in the process
Integrate QPixMap into Indicators Class
- Currently, the QPixMaps are generated outside the class and require a file path each time they are generated.
- Create a variable inside the Indicators class to hold the QPixMap and instead use that variable to build the QPixMap in the implementation files
- Keep in mind you will have to change the following functions: left_on(), right_on(), hazard_on()
Reduce Variable Memory Allocation - Gears Class
- Currently a lot of the variables have datatypes allocated that they do not completely utilize
- For example, in most cases, we do not need all 32 bits of an
int
instead we can get away with aint8_t
or auint_t
- Find examples in the stated class and replace those datatypes
- You only have to work on one class at a time to ensure nothing accidentally breaks in the process
Bootup Checks
- Simulations/Checks that will be run at the beginning (constructor or setup) that will turn on the icon and turn it off
- If the widget deals with a number, then increase that number to its maximum and back down
- Ensure to have delays so that the Driver can visibly see the Driver Interface is working
- Serves as a safety check to ensure that the Driver Interface is not broken
Rename Layout Components
- Currently, some layout items have conflicting names that cause warnings
- Remove these warnings
Integrate QPixMap into Lights Class
- Currently, the QPixMaps are generated outside the class and require a file path each time they are generated.
- Create a variable inside the Indicators class to hold the QPixMap and instead use that variable to build the QPixMap in the implementation files
- Keep in mind you will have to change the following functions: day_on(), night_on()
Make QWidgets Responsive
- Currently, the widgets have a fixed size, ideally we want this display to scale based on the size it is given.
Reduce Variable Memory Allocation - Lights Class
- Currently a lot of the variables have datatypes allocated that they do not completely utilize
- For example, in most cases, we do not need all 32 bits of an
int
instead we can get away with aint8_t
or auint_t
- Find examples in the stated class and replace those datatypes
- You only have to work on one class at a time to ensure nothing accidentally breaks in the process
Include Installation Instructions in README
- Create a README.md if not already created
- Include installation instructions so that anyone is able to install the software and contribute
- Include QT Installation https://www.qt.io/download-open-source?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5 (scroll to download button)
- Include QT Setup (Select Design Studio and QT for Desktop Environment)
- Include git clone instructions and how to open project in QT
Add Wiki Page on Formatting Code
- Format code using
clang-format
include instructions for usage on.h
and.cpp
files
Remove Test Buttons
- Remove test buttons near the end of development, scale driver interface accordingly
Change variables to snake_case
- Really nitpicky but all our variables should be in snake_case
- Make variables more consistent
Add Formatting to the `driverinterface.sh` script
Make sure to use clang-format
and format all .cpp
and all .h
files
Create Battery Warning Class
Create a Battery Warning Class with the following specifications:
- Inherit states.h
- private: states motor_warning; Ui::MainWindow* ui;
- public: constructor, void setup(Ui::MainWindow *ui), void turn_on(), void turn_off(), destructor
Refer to the existing classes for implementation regarding the Ui::MainWindow *ui parts
Make Application Full Screen on Launch
- Currently the application opens as a smaller window than the screen size of the device. It should take up the entire screen space!
Reduce Variable Memory Allocation - Indicators Class
- Currently a lot of the variables have datatypes allocated that they do not completely utilize
- For example, in most cases, we do not need all 32 bits of an
int
instead we can get away with aint8_t
or auint_t
- Find examples in the stated class and replace those datatypes
- You only have to work on one class at a time to ensure nothing accidentally breaks in the process
Script to have Driver Interface Auto Launch Upon Boot Up
- Configuration must be done directly in the Raspberry Pi
- Run
git pull origin main
- Run
qmake DriverInterface.pro
- Run
make
- Run
open DriverInterface
Integrate QPixMap into Battery Warning Class
- Currently, the QPixMaps are generated outside the class and require a file path each time they are generated.
- Create a variable inside the Indicators class to hold the QPixMap and instead use that variable to build the QPixMap in the implementation files
- Keep in mind you will have to change the following functions: turn_on(), turn_off()
Minor Color Change
Conditional Compiling
- Currently, the autostart script will compile the application each time there is a boot up, even if there have been no changes in code
- Add a simple if statement to
driver interface.sh
to ensure that the code will only compile if there have been changes, otherwise it will simply open the application
Change Background to Dark Color
- Raspberry Pi deployment has a white background due to light mode vs dark mode
- Change background to black or a lighter shade of black
Create UI components for Battery Warning Class
- Create 2 push buttons with text ON and OFF and names batteryWarningON and batteryWarningOFF
- Create a label for the icon and replace its initial text with batteryWarning
- Create the required slots to allow for functionality when the user clicks on the button and implement said functions
Create Relative File Paths/Resource Files for QT
- Currently, when you run the project, you need to change the file paths for the images manually to ensure it works on your computer
- Look into relative paths for QT (if vary due to OS, not feasible)
- Look into getting the current directory of the QT project and then building the image file path from there (should be easier, as long as there is a function to get the QT current directory)
- Resource files are integrated into QT I believe (longer approach?!)
Make adding warnings easier
- The current process to add warning labels/headups icons is to add a variable, add a file path, and add 2 functions (ON and OFF)
- The new process should only consist of adding a variable and setting its file path
- Try combing the current warnings into a vector, where using the index we can reference that warning and turn it ON or OFF
- Enum the vector indexes such that v.at(1) would be v.at(BATTERY)
Reduce Variable Memory Allocation - Battery Class
- Currently a lot of the variables have datatypes allocated that they do not completely utilize
- For example, in most cases, we do not need all 32 bits of an
int
instead we can get away with aint8_t
or auint_t
- Find examples in the stated class and replace those datatypes
- You only have to work on one class at a time to ensure nothing accidentally breaks in the process
Cruise Control Icon
- Request to add Cruise Control Indicator
- Simple ON or OFF states
- Create 2 buttons to test out the functionality
- Ensure you use relative paths (refer to warning icons for setup)
- setup classes similar to warnings class
Add Low Battery Warning
- Create another icon (last one I promise... maybe) for when the battery is lower than 30 miles
- Get this value from the range, not the battery (10% is not enough information for us to determine if we actually have low battery)
- For now use 30, this value will be changed once we have a final range value
- Use the
Low Battery
Icon from the link below, make sure to recolor it to red - https://icons8.com/icon/set/low-battery/ios-filled
- Add it in the warnings class along with motor and battery (feel free to rename battery to batteryFault so we can distinguish the two)
Use Horizontal Layout on Warning Icons
Icon Cleanup
- Parking and Drive have slightly white areas around the edges of the letter
- Honestly, not sure why, but maybe just try getting another image of the same type and color
Create Motor Warning Class
Create a Motor Warning Class with the following specifications:
- Inherit states.h
- private: states motor_warning; Ui::MainWindow* ui;
- public: constructor, void setup(Ui::MainWindow *ui), void turn_on(), void turn_off(), destructor
Refer to the existing classes for implementation regarding the Ui::MainWindow *ui parts
Switch Icons to Car Icons
Switch the following icons:
- ex. Current Icon (What to replace with! Offer suggestions if you find a better replacement)
- Night lights (Headlight) (Blue)
- Day Lights (Fog Light) (Green)
- Battery Warning (Car Battery) (Red)
- Motor Warning (Engine) (Red)
Use the following site: https://icons8.com/icon/set/transport/ios-filled
It will take you to a selection of icons and you can look for the replacements and download those. Before downloading make to recolor them to the correct color. Use the provided pallets for the colors!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.