Dashboard rev4 - #572
Conversation
|
we can still use 0.1f, I'm not sure how to generate that though |
| @@ -0,0 +1,2 @@ | |||
| eclipse.preferences.version=1 | |||
There was a problem hiding this comment.
remove this, not needed
| etl::vector<int, 10> active_warning_ids_; | ||
| int warning_cycle_index_; | ||
| }; | ||
| int warning_cycle_index_{0}; |
There was a problem hiding this comment.
is this brace initialization? I've never used it but if it is, is there a reason to opt for this and not "=0"
There was a problem hiding this comment.
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 */ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Let's look into the idea of including a watchdog reset, I'll link this in an issue for someone to tackle
|
|
||
| static void advance_leds(void) { | ||
| ++led_counter; | ||
| HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Yeah good call, no point in having it normally.
| void Initialize() { | ||
| HAL_Init(); | ||
| uwTickPrio = 0; | ||
| HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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++); |
| /** 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 */ |
There was a problem hiding this comment.
revert on stm32 platform
| #include "bindings.hpp" | ||
| #include "generated/can/veh_bus.hpp" | ||
| #include "generated/can/veh_messages.hpp" | ||
| #include "gpio.h" |
|
|
||
| void StartingHV::CreateGUI() { | ||
| lv_obj_t* title_label = lv_label_create(frame_); | ||
| title_label = lv_label_create(frame_); |
There was a problem hiding this comment.
any reason for this? don't see it changing anything, why remove it?
There was a problem hiding this comment.
No reason now, but I think moving towards changing titles post-creation is a good thing to do
|
This is enough to get started, I don't want to spam :() |
No description provided.