Skip to content

Dashboard rev4 - #572

Open
noahjaye wants to merge 18 commits into
mainfrom
dashboard-rev4
Open

Dashboard rev4#572
noahjaye wants to merge 18 commits into
mainfrom
dashboard-rev4

Conversation

@noahjaye

Copy link
Copy Markdown
Contributor

No description provided.

@ManushPatell

ManushPatell commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

we can still use 0.1f, I'm not sure how to generate that though
:()

@@ -0,0 +1,2 @@
eclipse.preferences.version=1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this, not needed

etl::vector<int, 10> active_warning_ids_;
int warning_cycle_index_;
};
int warning_cycle_index_{0};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this brace initialization? I've never used it but if it is, is there a reason to opt for this and not "=0"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I am happy to switch to = 0 if it improves readability

/** Add a custom handler when assert happens e.g. to restart MCU. */
#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
#define LV_ASSERT_HANDLER while(1); /**< Halt by default */
#define LV_ASSERT_HANDLER while(0); /**< Halt by default */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when lvgl hits an assertion error, it often means the system is in an unsafe state. The while (0) allows the program to run despite an assertion error and that's dangerous.

I'd rather have the system halt, and we could debug from there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's look into the idea of including a watchdog reset, I'll link this in an issue for someone to tackle

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good


static void advance_leds(void) {
++led_counter;
HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin,

@ManushPatell ManushPatell Jul 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to keep this advance leds function. This was for debugging so we can revert this or comment out and explicitly mention it's for debugging dash

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good call, no point in having it normally.

void Initialize() {
HAL_Init();
uwTickPrio = 0;
HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

systick shouldnt be the most prioritized, revert the priorities of things back to normal. I don't think that was the solution to our dashboard bug

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was part of it, we'll test in the bay and go from there

void DelayMS(uint32_t ms) {
HAL_Delay(ms);
// HAL_Delay(ms);
for (volatile uint32_t i = 0; i < 18000 * ms; i++);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert delay back

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

/** Add a custom handler when assert happens e.g. to restart MCU. */
#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
#define LV_ASSERT_HANDLER while(1); /**< Halt by default */
#define LV_ASSERT_HANDLER while(0); /**< Halt by default */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert on stm32 platform

#include "bindings.hpp"
#include "generated/can/veh_bus.hpp"
#include "generated/can/veh_messages.hpp"
#include "gpio.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused gpio.h


void StartingHV::CreateGUI() {
lv_obj_t* title_label = lv_label_create(frame_);
title_label = lv_label_create(frame_);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason for this? don't see it changing anything, why remove it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason now, but I think moving towards changing titles post-creation is a good thing to do

@ManushPatell

Copy link
Copy Markdown
Contributor

This is enough to get started, I don't want to spam :()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants