- Added function to read out the display_buffer via USB-Serial - Added basic structure and files for later complete firmware (still in progress) - Added Doc folder with schematic in it - Added Python script and batch file to read out the display buffer and open the image in gimp
214 lines
8.5 KiB
C
214 lines
8.5 KiB
C
/*
|
|
* Display_Default_Configurations.c
|
|
*
|
|
* Created: Sun Jul 06 2025 15:52:12
|
|
* Author Chris
|
|
*/
|
|
#include "Display_Default_Configurations.h"
|
|
|
|
// ============================================================================================
|
|
// Defines
|
|
|
|
|
|
// ============================================================================================
|
|
// Variables
|
|
extern const unsigned char _Font_Victor_Mono_Bold_8x19[];
|
|
extern const unsigned char _Font_Victor_Mono_Regular_6x11[];
|
|
extern const unsigned char _Font_Victor_Mono_Regular_7x13[];
|
|
extern const unsigned char _Font_DejaVu_Sans_Mono_10x17[];
|
|
|
|
Configuration_Menu_Select _Configuration_Default_Select_Menu = {
|
|
.X_Offset = 60,
|
|
.X_Indent = -4,
|
|
.Font = { _Font_Victor_Mono_Bold_8x19, _Font_Victor_Mono_Regular_7x13, _Font_Victor_Mono_Regular_6x11 },
|
|
.Color = { DISPLAY_COLOR_WHITE, DISPLAY_COLOR_LIGHTGREY, DISPLAY_COLOR_DARKGREY }
|
|
};
|
|
|
|
// Configuration_Menu_Icon_Row
|
|
|
|
Configuration_Select_YesNo _Configuration_Default_Select_YesNo = {
|
|
.Title_Font = _Font_DejaVu_Sans_Mono_10x17,
|
|
.Title_Color = DISPLAY_COLOR_LIGHTGREY,
|
|
.Title_Y_Center = DISPLAY_Y_CENTER-20,
|
|
|
|
.Value_Font = _Font_DejaVu_Sans_Mono_10x17,
|
|
.Value_Center_X_Offset = 20,
|
|
.Value_Y_Center = DISPLAY_Y_CENTER+20,
|
|
.Animation_Speed = 6
|
|
};
|
|
|
|
Configuration_Select_List _Configuration_Default_Select_List = {
|
|
.Font = _Font_DejaVu_Sans_Mono_10x17,
|
|
.List_Entry_Y_Gap = 10,
|
|
.Color_Selected = DISPLAY_COLOR_WHITE,
|
|
.Color_Not_Selected = DISPLAY_COLOR_DARKGREY
|
|
};
|
|
|
|
Configuration_Select_Value _Configuration_Default_Select_Value = {
|
|
.Title_Font = _Font_Victor_Mono_Bold_8x19,
|
|
.Title_Color = DISPLAY_COLOR_WHITE,
|
|
.Title_Y_Center = DISPLAY_Y_CENTER-50,
|
|
|
|
.Value_Font = _Font_DejaVu_Sans_Mono_10x17,
|
|
.Value_Color = DISPLAY_COLOR_LIGHTGREY,
|
|
.Value_Y_Center = DISPLAY_Y_CENTER+20,
|
|
|
|
.Show_Arc = true,
|
|
.Arc_Color = DISPLAY_COLOR_WHITE
|
|
};
|
|
|
|
Configuration_Select_RGB _Configuration_Default_Select_RGB = {
|
|
// Ring colors for each RGB component - vibrant but not overwhelming
|
|
.Ring_Color_Red = DISPLAY_COLOR_FROM_RGB888(255, 68, 68), // Bright red #ff4444
|
|
.Ring_Color_Green = DISPLAY_COLOR_FROM_RGB888(68, 255, 68), // Bright green #44ff44
|
|
.Ring_Color_Blue = DISPLAY_COLOR_FROM_RGB888(68, 68, 255), // Bright blue #4444ff
|
|
|
|
// Geometry settings optimized for 240x240 circular display
|
|
.Center_Preview_Radius = 70, // 140px diameter color preview (leaves 50px margin)
|
|
.Progress_Ring_Radius = 100, // 200px diameter progress ring (20px from edge)
|
|
.Progress_Ring_Thickness = 8, // Substantial ring thickness for visibility
|
|
.Indicator_Radius = 8, // 16px diameter indicator dot
|
|
|
|
// Colors for UI elements - clean monochrome scheme
|
|
.Preview_Border_Color = DISPLAY_COLOR_WHITE, // White border for contrast
|
|
.Preview_Border_Thickness = 3, // Visible but not thick border
|
|
.Indicator_Core_Color = DISPLAY_COLOR_WHITE, // White indicator core
|
|
.Indicator_Glow_Color = DISPLAY_COLOR_FROM_RGB888(200, 200, 255), // Subtle blue glow
|
|
.Background_Ring_Color = DISPLAY_COLOR_FROM_RGB888(64, 64, 64), // Dark gray background ring
|
|
.Background_Ring_Thickness = 2, // Thin background ring
|
|
|
|
// Previous marker settings - NEW
|
|
.Previous_Marker_Color = DISPLAY_COLOR_WHITE,
|
|
.Previous_Marker_Radius = 3,
|
|
.Previous_Marker_Ring_Offset = 15, // 15 pixels inside the main ring
|
|
.Show_Previous_Markers = true,
|
|
|
|
// Text display settings - clear hierarchy
|
|
.Component_Label_Font = _Font_Victor_Mono_Bold_8x19, // Bold for component labels (RED/GREEN/BLUE)
|
|
.Value_Font = _Font_DejaVu_Sans_Mono_10x17, // Large readable font for values
|
|
.Text_Color = DISPLAY_COLOR_WHITE, // High contrast white text
|
|
.Text_Y_Offset = 100, // 100px from bottom edge
|
|
|
|
// Animation and interaction settings
|
|
.Smooth_Animation_Steps = 8, // Smooth but not too slow transitions
|
|
.Enable_Encoder_Acceleration = true, // Enable fast value changes
|
|
.Acceleration_Threshold = 3, // Trigger acceleration after 3 fast steps
|
|
.Acceleration_Multiplier = 5 // 5x speed during fast rotation
|
|
};
|
|
|
|
// Alternative configuration for smaller displays or different aesthetics
|
|
Configuration_Select_RGB _Configuration_Compact_Select_RGB = {
|
|
// More subdued colors for compact interface
|
|
.Ring_Color_Red = DISPLAY_COLOR_FROM_RGB888(220, 80, 80), // Softer red
|
|
.Ring_Color_Green = DISPLAY_COLOR_FROM_RGB888(80, 220, 80), // Softer green
|
|
.Ring_Color_Blue = DISPLAY_COLOR_FROM_RGB888(80, 80, 220), // Softer blue
|
|
|
|
// Smaller geometry for compact displays
|
|
.Center_Preview_Radius = 50, // Smaller preview circle
|
|
.Progress_Ring_Radius = 80, // Closer to center
|
|
.Progress_Ring_Thickness = 6, // Thinner ring
|
|
.Indicator_Radius = 6, // Smaller indicator
|
|
|
|
// Minimal UI colors
|
|
.Preview_Border_Color = DISPLAY_COLOR_LIGHTGREY,
|
|
.Preview_Border_Thickness = 2,
|
|
.Indicator_Core_Color = DISPLAY_COLOR_WHITE,
|
|
.Indicator_Glow_Color = DISPLAY_COLOR_LIGHTGREY,
|
|
.Background_Ring_Color = DISPLAY_COLOR_DARKGREY,
|
|
.Background_Ring_Thickness = 1,
|
|
|
|
// Previous marker settings - NEW
|
|
.Previous_Marker_Color = DISPLAY_COLOR_WHITE,
|
|
.Previous_Marker_Radius = 3,
|
|
.Previous_Marker_Ring_Offset = 15, // 15 pixels inside the main ring
|
|
.Show_Previous_Markers = true,
|
|
|
|
// Smaller fonts for compact layout
|
|
.Component_Label_Font = _Font_Victor_Mono_Regular_6x11, // Smaller label font
|
|
.Value_Font = _Font_Victor_Mono_Bold_8x19, // Medium value font
|
|
.Text_Color = DISPLAY_COLOR_LIGHTGREY,
|
|
.Text_Y_Offset = 25,
|
|
|
|
// Faster, more responsive settings for compact interface
|
|
.Smooth_Animation_Steps = 4, // Faster transitions
|
|
.Enable_Encoder_Acceleration = true,
|
|
.Acceleration_Threshold = 2, // More sensitive acceleration
|
|
.Acceleration_Multiplier = 8 // Higher acceleration
|
|
};
|
|
|
|
// High contrast configuration for accessibility
|
|
Configuration_Select_RGB _Configuration_High_Contrast_Select_RGB = {
|
|
// Pure, high contrast colors
|
|
.Ring_Color_Red = DISPLAY_COLOR_RED, // Pure red
|
|
.Ring_Color_Green = DISPLAY_COLOR_GREEN, // Pure green
|
|
.Ring_Color_Blue = DISPLAY_COLOR_BLUE, // Pure blue
|
|
|
|
// Standard geometry
|
|
.Center_Preview_Radius = 70,
|
|
.Progress_Ring_Radius = 100,
|
|
.Progress_Ring_Thickness = 10, // Thicker for better visibility
|
|
.Indicator_Radius = 10, // Larger indicator
|
|
|
|
// High contrast UI
|
|
.Preview_Border_Color = DISPLAY_COLOR_WHITE,
|
|
.Preview_Border_Thickness = 4, // Thick border for definition
|
|
.Indicator_Core_Color = DISPLAY_COLOR_WHITE,
|
|
.Indicator_Glow_Color = DISPLAY_COLOR_WHITE, // No glow, just solid white
|
|
.Background_Ring_Color = DISPLAY_COLOR_BLACK, // Maximum contrast
|
|
.Background_Ring_Thickness = 3,
|
|
|
|
// Previous marker settings - NEW
|
|
.Previous_Marker_Color = DISPLAY_COLOR_WHITE,
|
|
.Previous_Marker_Radius = 3,
|
|
.Previous_Marker_Ring_Offset = 15, // 15 pixels inside the main ring
|
|
.Show_Previous_Markers = true,
|
|
|
|
// Large, clear fonts
|
|
.Component_Label_Font = _Font_DejaVu_Sans_Mono_10x17, // Larger labels
|
|
.Value_Font = _Font_Victor_Mono_Bold_8x19, // Bold values
|
|
.Text_Color = DISPLAY_COLOR_WHITE,
|
|
.Text_Y_Offset = 35,
|
|
|
|
// Conservative animation for accessibility
|
|
.Smooth_Animation_Steps = 12, // Slower, more predictable
|
|
.Enable_Encoder_Acceleration = false, // Disable acceleration for precision
|
|
.Acceleration_Threshold = 5,
|
|
.Acceleration_Multiplier = 2
|
|
};
|
|
|
|
Configuration_Entry_Indicator _Configuration_Default_Entry_Indicator_Arc = {
|
|
.Type = INDICATOR_ARC,
|
|
|
|
.Color_Selected = DISPLAY_COLOR_WHITE,
|
|
.Color_Unselected = DISPLAY_COLOR_DARKGREY,
|
|
|
|
.Options.Arc.Angle_Span = 120,
|
|
.Options.Arc.Thickness = 4,
|
|
.Options.Arc.Radius = 100
|
|
};
|
|
|
|
Configuration_Entry_Indicator _Configuration_Default_Entry_Indicator_Dot = {
|
|
.Type = INDICATOR_DOT,
|
|
|
|
.Color_Selected = DISPLAY_COLOR_WHITE,
|
|
.Color_Unselected = DISPLAY_COLOR_DARKGREY,
|
|
|
|
.Options.Dot.Dot_Distance = 20,
|
|
.Options.Dot.Dot_Size = 5,
|
|
.Options.Dot.Y = 200,
|
|
.Options.Dot.Unselected_Frame_Only = true
|
|
};
|
|
|
|
|
|
// ============================================================================================
|
|
// Function Declarations
|
|
|
|
|
|
/*******************************************************************
|
|
Functions
|
|
*******************************************************************/
|
|
|
|
|
|
/*******************************************************************
|
|
Internal Functions
|
|
*******************************************************************/ |