Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
218a970
Updated background and label positions. Began refactoring style code
LPlusBonk Jun 15, 2025
d8e0747
Got vehicle state sprite to render, still needs to be driven properly…
LPlusBonk Jun 15, 2025
c42c41b
Implemented drive logic behind the vehicle state indicator
LPlusBonk Jun 15, 2025
5b5c567
Large fault text implemented
LPlusBonk Jun 15, 2025
4fc24b4
Hid scrollbars on screen and the fault text readout
LPlusBonk Jun 15, 2025
e42adf4
Maintained scroll position between redraws of the fault text for read…
LPlusBonk Jun 15, 2025
ef77805
Changed HV Capacity to display in kWh instead of volts. Scroll progre…
LPlusBonk Jun 15, 2025
5179485
Hides the fault bar on startup and only shows it when a fault occurs.…
LPlusBonk Jun 15, 2025
df1856e
Hides fault bar when there are no longer any active faults
LPlusBonk Jun 15, 2025
092dfc9
Merge pull request #5 from Citrous06/f33
mnigmann Jun 15, 2025
ce957e0
Added rudimentary bar graph implimentation but its buggy and untested…
LPlusBonk Jun 16, 2025
3f51703
Screen change working with CAN command
mnigmann Jun 16, 2025
747335b
fix: an attempt to fix artifacting
Citrous06 Jun 16, 2025
f314c87
actual fix
Citrous06 Jun 16, 2025
0832fcb
refactor: cleaned up code for the bar graphs
Citrous06 Jun 16, 2025
8cf54aa
fix: beginning to fix the current graph
Citrous06 Jun 16, 2025
263d852
Create endurance screen
mnigmann Jun 18, 2025
44f1781
Endurance screen change over CAN
mnigmann Jun 18, 2025
bfdb007
chore: cleaning up for pull request
Citrous06 Jun 20, 2025
1045cbe
Merge branch 'Bar-graph-testing' into f33
Citrous06 Jun 20, 2025
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.DS_Store
.vscode
build/
lib/Formula-DBC
lib/Formula-DBC
lib/Formula-DBC
3 changes: 2 additions & 1 deletion gtk/gtk_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <sys/time.h>
#include <stdlib.h>
#include <signal.h>

#include <libavcodec/avcodec.h>
#include <libavutil/opt.h>
#include <libavutil/imgutils.h>
Expand Down Expand Up @@ -134,8 +133,10 @@ static gboolean configure_callback(GtkWidget *widget, GdkEventConfigure *event,
}

static gboolean timeout_callback(gpointer data_pointer) {
gtk_globals *fd = (gtk_globals*)data_pointer;
//printf("loop\n");
loop();
gtk_widget_queue_draw(fd->drawing_area);
return TRUE;
}

Expand Down
29 changes: 25 additions & 4 deletions gtk/read_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,21 @@ uint8_t cf_available(cf_file *ptr) {
return 0;
}

int switched = 0;

void cf_read_message(cf_file *ptr, uint8_t *buf, uint8_t bufsize) {
uint64_t tdiff = time_usecs() - ptr->usec_offset;
if ((!switched) && (tdiff >= 10000000)) {
switched = 1;
memset(buf, 0, 16);
buf[0] = 1;
buf[1] = 1;
buf[4] = 2;
buf[5] = 7;
buf[8] = 2;
printf("Switching screens\n");
return;
}
uint8_t len = ptr->data[1];
if (len + 8 > bufsize) len = bufsize-8;
memcpy(buf, ptr->data, 8);
Expand All @@ -60,16 +74,23 @@ void cf_read_message(cf_file *ptr, uint8_t *buf, uint8_t bufsize) {
// Modify data for testing
switch ((buf[4] | (buf[5] << 8))) {
case 312:
buf[8] = (((time_usecs() - ptr->usec_offset) / 1000000) % 6)<<4;
buf[8] = ((tdiff / 1000000) % 6)<<4;
break;
case 301:
buf[8] = (((time_usecs() - ptr->usec_offset) / 1000000) % 7);
buf[8] = ((tdiff / 1000000) % 7);
break;
case 311:
*((uint32_t*)(buf+8)) = 1<<(((time_usecs() - ptr->usec_offset) / 1000000) % 32);
*((uint32_t*)(buf+8)) = 1<<((tdiff / 3000000) % 17);
break;
case 700:
*((uint32_t*)(buf+8)) = 1<<(((time_usecs() - ptr->usec_offset) / 1000000) % 11);
*((uint32_t*)(buf+8)) = 1<<((tdiff / 3000000) % 11);
break;
case 424:
buf[11] = 2;
break;
case 900:
*((uint32_t*)(buf+8)) = 200000;
break;
default:
break;
}
Expand Down
2 changes: 2 additions & 0 deletions gtk/testing_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ class PrintSerial {
inline PrintSerial();
void printf(const char* fmt, ...);
void begin(int baud);

};

void delay(int ms);
unsigned long millis();

extern PrintSerial Serial;

Expand Down
1 change: 0 additions & 1 deletion lib/Formula-DBC
Submodule Formula-DBC deleted from d4d79e
Loading