Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6fe6a2f
cleanup rn
Evan-Bertis-Sample May 8, 2026
016c8e4
making page manager and configuring application
Evan-Bertis-Sample May 8, 2026
aaeca78
fix logic errors with page creation
Evan-Bertis-Sample May 8, 2026
312edf7
Displaying textures
Evan-Bertis-Sample May 9, 2026
c461675
drive page changes
Evan-Bertis-Sample May 10, 2026
901ac19
Add asset references to drive page
Evan-Bertis-Sample May 10, 2026
5ca493a
Spinning teapot
Evan-Bertis-Sample May 10, 2026
fc44218
Adding background shader
Evan-Bertis-Sample May 12, 2026
1688582
Fix skybox shader
Evan-Bertis-Sample May 13, 2026
8c52d33
Add background color to background shader
Evan-Bertis-Sample May 13, 2026
aa0201a
Not quite functional bottom bar, but somewhat close
Evan-Bertis-Sample May 13, 2026
4bb4d66
Move text of bottom HUD towards bottom of the screen
Evan-Bertis-Sample May 14, 2026
6244247
Align text properly
Evan-Bertis-Sample May 14, 2026
be6796f
Drive status HUD without proper color or text!
Evan-Bertis-Sample May 14, 2026
b5237d3
Connected to CAN, regenerate DBC files!
Evan-Bertis-Sample May 14, 2026
71b1626
Colors for drive state
Evan-Bertis-Sample May 14, 2026
8a064b6
set up error page
kodeti May 21, 2026
56c60f1
move pages to ui folder
kodeti May 21, 2026
1fb58a1
finish setup
kodeti May 21, 2026
a875c28
Fix it such that the model rotates rather than the camera
Evan-Bertis-Sample May 21, 2026
f02a589
work on drive page
Evan-Bertis-Sample May 21, 2026
c07145e
Move files around and get intellisense working with ui folder!
Evan-Bertis-Sample May 23, 2026
7bbb16f
Add incomplete speedometer
Evan-Bertis-Sample May 23, 2026
52eebcb
Slightly less messed up speedometer
Evan-Bertis-Sample May 23, 2026
cf4d423
add error page layout, temp display
kodeti May 23, 2026
aa6896a
speedometer shader updates
Evan-Bertis-Sample May 23, 2026
37536b5
Needle in speedometer is fixed width, updated texture of speedometer …
Evan-Bertis-Sample May 23, 2026
99fd82d
Speedometer not hooked up to CAN
Evan-Bertis-Sample May 23, 2026
1949e98
basic battery percent shader
Evan-Bertis-Sample May 23, 2026
392fa1d
bms soc bar
Evan-Bertis-Sample May 23, 2026
de24070
Create shared elements class
Evan-Bertis-Sample May 23, 2026
e315628
Merge branch 'simple-ui' into error-page
Evan-Bertis-Sample May 23, 2026
c4a77cf
fix drive page compilation error
kodeti May 24, 2026
163c59b
error code list
kodeti May 24, 2026
5f288f4
update top/bot bars
kodeti May 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
# .clang-format
BasedOnStyle: Google
IndentWidth: 4
ContinuationIndentWidth: 4
ColumnLimit: 100

DerivePointerAlignment: false
PointerAlignment: Left
SortIncludes: CaseSensitive

AllowShortFunctionsOnASingleLine: InlineOnly
BreakStringLiterals: false

AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty

BinPackParameters: false
BinPackArguments: false
AlignAfterOpenBracket: DontAlign

PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakScopeResolution: 1000000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 1000

IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"(.*/)?[^/"]+\.hpp"$'
Priority: 1
- Regex: '^<.*>'
Priority: 2
- Regex: '^"(.*/)?[^/"]+\.hpp"$'
Priority: 1
- Regex: "^<okay/.*>"
Priority: 2
- Regex: "^<.*>"
Priority: 3

IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: '(\.cpp|\.cc|\.cxx)$'
IncludeIsMainRegex: "([-_](test|unittest))?$"
IncludeIsMainSourceRegex: '(\.cpp|\.cc|\.cxx)$'
Binary file added dash/assets/fonts/Lato-Black.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-BlackItalic.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-Bold.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-BoldItalic.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-Italic.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-Light.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-LightItalic.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-Regular.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-Thin.ttf
Binary file not shown.
Binary file added dash/assets/fonts/Lato-ThinItalic.ttf
Binary file not shown.
93 changes: 93 additions & 0 deletions dash/assets/fonts/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato"

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
48 changes: 48 additions & 0 deletions dash/assets/shaders/background.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#version 300 es
precision highp float;

out vec4 FragColor;

in vec3 v_color;
in vec3 v_normal;
in vec3 v_position;
in vec2 v_uv;
in vec3 v_cameraPosition;
in vec3 v_cameraDirection;

uniform sampler2D u_albedo; // optional, can be ignored if not used
uniform float u_timeMs;

float hash(vec2 p) {
p = fract(p * vec2(123.34, 456.21));
p += dot(p, p + 45.32);
return fract(p.x * p.y);
}

void main()
{
float t = u_timeMs * 0.001f;

vec2 scrollDir = normalize(vec2(-1.0, -1.0));
float scrollSpeed = 0.05f; // UV units per second

vec2 sampleUV = v_uv + scrollDir * t * scrollSpeed;
vec4 texColor = texture(u_albedo, sampleUV);
vec3 baseColor = v_color * texColor.rgb;

vec4 bgA = vec4(0.2941f, 0.2706f, 0.2667f, 1.0f);
vec4 bgB = vec4(0.1725f, 0.1569f, 0.1529f, 1.0f);

vec2 dir = normalize(vec2(1.0, -1.0));
float s = dot(v_uv - vec2(0.0, 1.0), dir)
/ dot(vec2(1.0, -1.0), dir);

vec4 bgColor = mix(bgA, bgB, s);

// screen-space dithering
float noise = hash(gl_FragCoord.xy) - 0.5;
bgColor.rgb += noise / 255.0;

FragColor = mix(bgColor, texColor, texColor.a);
// FragColor = vec4(sampleUV.x, sampleUV.y, 0.0f, 1.0f);
}
37 changes: 37 additions & 0 deletions dash/assets/shaders/background.vert
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#version 300 es
precision highp float;

// position, normal, color, uv

layout(location = 0) in vec3 a_pos;
layout(location = 1) in vec3 a_normal;
layout(location = 2) in vec4 a_color;
layout(location = 3) in vec2 a_uv;

uniform mat4 u_modelMatrix;
uniform mat4 u_viewMatrix;
uniform mat4 u_projectionMatrix;
uniform vec3 u_cameraPosition;
uniform vec3 u_cameraDirection;
uniform vec3 u_color;

out vec3 v_color;
out vec3 v_normal;
out vec3 v_position;
out vec2 v_uv;
out vec3 v_cameraPosition;
out vec3 v_cameraDirection;

void main() {
// Purposefully omitting the view matrix btw
mat4 mvp = u_projectionMatrix * u_modelMatrix;
vec4 pos = mvp * vec4(a_pos, 1.0f);
gl_Position = pos;

v_color = u_color;
v_normal = a_normal;
v_position = a_pos;
v_uv = a_uv;
v_cameraPosition = u_cameraPosition;
v_cameraDirection = u_cameraDirection;
}
41 changes: 41 additions & 0 deletions dash/assets/shaders/battery.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#version 300 es
precision highp float;

out vec4 FragColor;

in vec4 v_color;
in vec2 v_uv;

uniform sampler2D u_albedo;

uniform float u_percent;
uniform vec4 u_barColor;
uniform vec4 u_bgColor;

// Alpha-over compositing assuming dst is already the element below
vec4 alphaOver(vec4 dst, vec4 src) {
return vec4(
mix(dst.rgb, src.rgb, src.a),
dst.a + src.a * (1.0 - dst.a)
);
}

void main() {
vec4 texColor = texture(u_albedo, v_uv) * v_color;
float whiteMask = texColor.r * texColor.g * texColor.b;

float percent = clamp(u_percent, 0.0, 1.0);
float filled = step(v_uv.x, percent);

vec4 barRegionColor = mix(u_bgColor, u_barColor, filled);

vec4 maskedBarColor = vec4(
barRegionColor.rgb,
barRegionColor.a * whiteMask
);

vec4 color = vec4(0.0);
color = alphaOver(color, maskedBarColor);

FragColor = color;
}
37 changes: 37 additions & 0 deletions dash/assets/shaders/battery.vert
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#version 300 es
precision highp float;

// position, normal, color, uv

layout(location = 0) in vec3 a_pos;
layout(location = 1) in vec3 a_normal;
layout(location = 2) in vec4 a_color;
layout(location = 3) in vec2 a_uv;

uniform mat4 u_modelMatrix;
uniform mat4 u_viewMatrix;
uniform mat4 u_projectionMatrix;
uniform vec3 u_cameraPosition;
uniform vec3 u_cameraDirection;
uniform vec4 u_color;

out vec4 v_color;
out vec3 v_normal;
out vec3 v_position;
out vec2 v_uv;
out vec3 v_cameraPosition;
out vec3 v_cameraDirection;


void main() {
mat4 mvp = u_projectionMatrix * u_viewMatrix * u_modelMatrix;
vec4 pos = mvp * vec4(a_pos, 1.0f);
gl_Position = pos;

v_color = u_color;
v_normal = a_normal;
v_position = a_pos;
v_uv = a_uv;
v_cameraPosition = u_cameraPosition;
v_cameraDirection = u_cameraDirection;
}
Loading