- First complete version of firmware. Currently being tested in the rehearsal room

- Added bunch of screens, fonts and images
 - Added script to read out frame buffer (function currently disabled in Firmware)
This commit is contained in:
2025-10-26 20:57:58 +01:00
parent 90bca063e6
commit 89c875e38f
62 changed files with 4668 additions and 489 deletions

View File

@@ -427,6 +427,7 @@ Object_ID Display_Objects_Add_Image(Anchor_Point anchor_point, Coordinates_Type
Image->Image = image;
Image->Rotation_Angle = Rotation_Angle;
Image->Alpha = UINT8_MAX;
Image->Scale = 1.0f;
return Display_Objects_Add(IMAGE, anchor_point, coordinates_type, x, y, selectable, (void *)Image, style_id, animation_id);
}
@@ -645,7 +646,7 @@ Object_ID Display_Objects_Add_Menu_Select(char* menu_titles, uint32_t menu_entry
return Display_Objects_Add(MENU_SELECT, LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, (void *)Menu_Select, NO_STYLE, NO_ANIMATION);
}
Object_ID Display_Objects_Add_Menu_Icon_Row(Icon_Row_Item* items, uint32_t item_count, uint32_t* selected_item, Configuration_Menu_Icon_Row* config)
Object_ID Display_Objects_Add_Menu_Icon_Row(Icon_Row_Item* items, uint32_t item_count, uint32_t* selected_item, const Configuration_Menu_Icon_Row* config)
{
Object_Menu_Icon_Row* Icon_Row = malloc(sizeof(Object_Menu_Icon_Row));
Icon_Row->Items = items;
@@ -709,7 +710,7 @@ Object_ID Display_Objects_Add_Menu_Ring(Menu_Ring_Item_Config* items, uint32_t i
return Display_Objects_Add(MENU_RING, LEFT_TOP, BOTH_IN_PIXEL, 0, 0, SELECTABLE, (void *)Menu_Ring, NO_STYLE, NO_ANIMATION);
}
Object_ID Display_Objects_Add_Menu_Hierarchical(const Menu_List** current_list, int32_t* selected_item, int32_t* scroll_offset, Configuration_Menu_Hierarchical* config)
Object_ID Display_Objects_Add_Menu_Hierarchical(const Menu_List** current_list, int32_t* selected_item, int32_t* scroll_offset, const Configuration_Menu_Hierarchical* config)
{
Object_Menu_Hierarchical* Menu_Hierarchical = malloc(sizeof(Object_Menu_Hierarchical));
Menu_Hierarchical->Current_List = current_list;
@@ -740,7 +741,7 @@ Object_ID Display_Objects_Add_Menu_Hierarchical(const Menu_List** current_list,
return Display_Objects_Add(MENU_HIERARCHICAL, LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, (void *)Menu_Hierarchical, NO_STYLE, NO_ANIMATION);
}
Object_ID Display_Objects_Add_Select_YesNo(char* title, uint32_t title_length, bool* value, Configuration_Select_YesNo* config)
Object_ID Display_Objects_Add_Select_YesNo(char* title, uint32_t title_length, bool* value, const Configuration_Select_YesNo* config)
{
Object_Select_YesNo* Select_YesNo = malloc(sizeof(Object_Select_YesNo));
Select_YesNo->Title = title;
@@ -751,19 +752,20 @@ Object_ID Display_Objects_Add_Select_YesNo(char* title, uint32_t title_length, b
return Display_Objects_Add(SELECT_YESNO, LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, (void *)Select_YesNo, NO_STYLE, NO_ANIMATION);
}
Object_ID Display_Objects_Add_Select_List(char* list_titles, uint32_t list_entry_count, uint32_t list_char_length, uint32_t* selected_entry, Configuration_Select_List* config)
Object_ID Display_Objects_Add_Select_List(char* list_titles, uint32_t list_entry_count, uint32_t list_char_length, uint32_t* selected_entry, const Configuration_Select_List* config)
{
Object_Select_List* Select_List = malloc(sizeof(Object_Select_List));
Select_List->List_Titles = list_titles;
Select_List->List_Entry_Count = list_entry_count;
Select_List->List_Char_Length = list_char_length;
Select_List->Selected_Entry = selected_entry;
Select_List->Initial_Entry = *selected_entry;
Select_List->Config = config;
return Display_Objects_Add(SELECT_LIST, LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, (void *)Select_List, NO_STYLE, NO_ANIMATION);
}
Object_ID Display_Objects_Add_Select_Value(char* title, uint32_t title_length, int32_t* value, int32_t max, int32_t min, char* format, Configuration_Select_Value* config)
Object_ID Display_Objects_Add_Select_Value(char* title, uint32_t title_length, int32_t* value, int32_t max, int32_t min, char* format, const Configuration_Select_Value* config)
{
Object_Select_Value* Select_Value = malloc(sizeof(Object_Select_Value));
Select_Value->Title = title;
@@ -777,7 +779,7 @@ Object_ID Display_Objects_Add_Select_Value(char* title, uint32_t title_length, i
return Display_Objects_Add(SELECT_VALUE, LEFT_TOP, BOTH_IN_PIXEL, 0, 0, NOT_SELECTABLE, (void *)Select_Value, NO_STYLE, NO_ANIMATION);
}
Object_ID Display_Objects_Add_Select_RGB(LED_Data_t* color_value, uint8_t* current_component, Configuration_Select_RGB* config)
Object_ID Display_Objects_Add_Select_RGB(LED_Data_t* color_value, uint8_t* current_component, const Configuration_Select_RGB* config)
{
if (color_value == NULL || config == NULL) {
return -1; // Invalid parameters
@@ -826,7 +828,7 @@ Object_ID Display_Objects_Add_Select_RGB(LED_Data_t* color_value, uint8_t* curre
);
}
Object_ID Display_Objects_Add_Entry_Indicator(uint32_t entry_count, int32_t* entry_value, Configuration_Entry_Indicator* config)
Object_ID Display_Objects_Add_Entry_Indicator(uint32_t entry_count, int32_t* entry_value, const Configuration_Entry_Indicator* config)
{
Object_Entry_Indicator* Entry_Indicator = malloc(sizeof(Object_Entry_Indicator));
Entry_Indicator->Entry_Count = entry_count;
@@ -894,6 +896,12 @@ void Display_Objects_Update_Color(Object_ID id, Display_Color color)
((Object_Shape*)(Object->Data))->Color = color;
break;
case VALUE_BAR_ARC:
if(((Object_Value_Bar_Arc*)(Object->Data))->Arc != NULL) {
((Object_Value_Bar_Arc*)(Object->Data))->Arc->Color = color;
}
break;
default:
break;
}
@@ -948,11 +956,7 @@ void Display_Objects_Update_Alpha(Object_ID id, uint8_t new_alpha)
{
Display_Object* Object = Display_Objects_Get_By_ID(id);
if(Object == NULL) {
return;
}
if(Object->Type != IMAGE) {
if(Object == NULL || Object->Type != IMAGE) {
return;
}
@@ -961,6 +965,19 @@ void Display_Objects_Update_Alpha(Object_ID id, uint8_t new_alpha)
IM->Alpha = new_alpha;
}
void Display_Objects_Update_Scale(Object_ID id, float new_scale)
{
Display_Object* Object = Display_Objects_Get_By_ID(id);
if(Object == NULL || Object->Type != IMAGE || new_scale < 0.0f) {
return;
}
Object_Image_Color* IM = (Object_Image_Color*)(Object->Data);
IM->Scale = new_scale;
}
void Display_Objects_Update_Max_Min(Object_ID id, uint max, uint min)
{
Display_Object* Object = Display_Objects_Get_By_ID(id);
@@ -976,6 +993,11 @@ void Display_Objects_Update_Max_Min(Object_ID id, uint max, uint min)
((Object_Value_Bar_Rect*)Object->Data)->Min = min;
break;
case VALUE_BAR_ARC:
((Object_Value_Bar_Arc*)Object->Data)->Max = max;
((Object_Value_Bar_Arc*)Object->Data)->Min = min;
break;
case GRAPH:
((Object_Graph*)Object->Data)->Max = max;
((Object_Graph*)Object->Data)->Min = min;