- Added initial version of Hierarchical Menu
- Beautified the Message Box a bit
This commit is contained in:
@@ -37,6 +37,7 @@ static float _Current_BusVoltage_V;
|
||||
// Function Declarations
|
||||
void Screen_Setup_Graph(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
|
||||
|
||||
static void Screen_Init (Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration);
|
||||
static void Screen_Tick (void);
|
||||
static void Screen_Click (uint button_return_value);
|
||||
static void Screen_Touch_Event (int16_t x, int16_t y);
|
||||
@@ -53,7 +54,19 @@ static void Screen_On_Object_Deselect (Object_ID object_id);
|
||||
*******************************************************************/
|
||||
void Screen_Setup_Graph(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration)
|
||||
{
|
||||
_Screen_Tick = Screen_Tick;
|
||||
Screen_Init(direction_out, direction_in, type, frame_duration);
|
||||
|
||||
for(int i=0;i<GRAPH_DATA_WDITH;i++) {
|
||||
_Data_BusVoltage[i] = 0;
|
||||
_Data_BusVoltage_Threshold_Overvoltage[i] = THRESHOLD_OVERVOLTAGE_mV;
|
||||
_Data_BusVoltage_Threshold_Undervoltage[i] = THRESHOLD_UNDERVOLTAGE_mV;
|
||||
}
|
||||
}
|
||||
|
||||
void Screen_Init(Screen_Transition_Direction direction_out, Screen_Transition_Direction direction_in, Easing type, uint32_t frame_duration)
|
||||
{
|
||||
_Screen_Last = Screen_Init;
|
||||
_Screen_Tick = Screen_Tick;
|
||||
_Screen_Click = Screen_Click;
|
||||
_Screen_Touch_Event = Screen_Touch_Event;
|
||||
_Screen_Action_CW = Screen_Action_CW;
|
||||
@@ -64,21 +77,12 @@ void Screen_Setup_Graph(Screen_Transition_Direction direction_out, Screen_Transi
|
||||
_Screen_On_Object_Deselect = Screen_On_Object_Deselect;
|
||||
|
||||
Display_Objects_Clear();
|
||||
|
||||
Display_Screen_Transition_Start(direction_out, direction_in, type, frame_duration);
|
||||
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
//////////////////////////////
|
||||
// Add Display Objects here //
|
||||
//////////////////////////////
|
||||
for(int i=0;i<GRAPH_DATA_WDITH;i++) {
|
||||
_Data_BusVoltage[i] = 0;
|
||||
_Data_BusVoltage_Threshold_Overvoltage[i] = THRESHOLD_OVERVOLTAGE_mV;
|
||||
_Data_BusVoltage_Threshold_Undervoltage[i] = THRESHOLD_UNDERVOLTAGE_mV;
|
||||
}
|
||||
|
||||
Font_ID Font_10_1 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_10x17, 1);
|
||||
Font_ID Font_10_1 = Display_Objects_Add_Font(_Font_DejaVu_Sans_Mono_10x17, 1);
|
||||
|
||||
Display_Objects_Add_Graph(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, false, _Data_BusVoltage, GRAPH_DATA_WDITH, 32000, 0, DISPLAY_COLOR_WHITE, 200, NO_STYLE, NO_ANIMATION);
|
||||
Display_Objects_Add_Graph(CENTER_MIDDLE, BOTH_IN_PERCENT, 50, 50, false, _Data_BusVoltage_Threshold_Overvoltage, GRAPH_DATA_WDITH, 32000, 0, DISPLAY_COLOR_RED, 200, NO_STYLE, NO_ANIMATION);
|
||||
|
||||
Reference in New Issue
Block a user