9 #include "ui_interface.h"
12 #include "uhh_nav_functions.h"
13 #include "ENUM_UhhMsg_Err.h"
17 #define DISPLAY_WIDTH 320
18 #define DISPLAY_HEIGHT 240
21 #define MAX_TRENDED_POINTS 6
24 #define UI_CMD_BUFF_SIZE 20 // Max amount of commands stored in buffer
27 #define DARKER_BY(rgb16, fraction) RGB24TORGB16( \
28 ((uint8)((((RGB16TORGB24(rgb16)) >> 16) & 0xFF) * (1.0 - (fraction))) << 16) + \
29 ((uint8)((((RGB16TORGB24(rgb16)) >> 8) & 0xFF) * (1.0 - (fraction))) << 8) + \
30 ((uint8)((((RGB16TORGB24(rgb16)) >> 0) & 0xFF) * (1.0 - (fraction))) << 0) \
36 extern char line[256];
43 extern unsigned short frame_buffer[DISPLAY_WIDTH][DISPLAY_HEIGHT];
44 extern unsigned short shadow_frame_buffer[DISPLAY_WIDTH][DISPLAY_HEIGHT];
76 uint8 default_position : 1;
77 uint8 pen_background : 1;
79 uint8 pen_up_arrow : 1;
89 unsigned short pixel[DISPLAY_HEIGHT][DISPLAY_WIDTH];
92 extern frame_t * g_frame_buffer_p;
98 extern void put_pixel_bounds_check(uint16 x, uint16 y, uint16 colour);
100 #define PUT_PIXEL(x,y,c) put_pixel_bounds_check((x),(y),(c))
104 #define PUT_PIXEL_NO_BOUNDS_CHECK(x,y,c) shadow_frame_buffer[(x)][(y)] = c;
105 #define GET_PIXEL(x,y) shadow_frame_buffer[(x)][(y)]
107 #elif defined (AMPIRE_TFT)
109 #define PUT_PIXEL_NO_BOUNDS_CHECK(x,y,c) g_frame_buffer_p->pixel[y][x] = c;
110 #define GET_PIXEL(x,y) g_frame_buffer_p->pixel[(y)][(x)]
114 #define GET_PIXEL(x,y) g_frame_buffer_p->pixel[319-(x)][(y)]
137 REFRESH_MENU_SELECTION,
147 OPERATOR_VERTICAL_BARGRAPH,
148 OPERATOR_HORIZONTAL_BARGRAPH,
149 OPERATOR_VERTICAL_TREND,
150 OPERATOR_HORIZONTAL_TREND,
152 OPERATOR_CONTROL_LOOP1,
153 OPERATOR_CONTROL_LOOP2,
154 OPERATOR_CONTROL_DUAL_LOOP,
155 OPERATOR_PROGRAM_SUMMARY,
156 OPERATOR_ALARM_SUMMARY,
157 OPERATOR_MESSAGE_SUMMARY,
160 OPERATOR_HORIZONTAL_HISTORY,
161 OPERATOR_VERTICAL_HISTORY,
162 OPERATOR_INST_ALARMS,
163 OPERATOR_USER_SCREEN,
164 OPERATOR_ALARM_PANEL,
166 OPERATOR_MODBUS_MASTER_USER_PAGE,
167 OPERATOR_ETHERNETIP_USER_PAGE,
168 OPERATOR_SATURATED_STEAM,
177 VIRTUAL_NUMERIC_KEYBOARD,
178 VIRTUAL_KEYBOARD_POPUP,
184 MESSAGE_SUMMARY_MENU,
189 USER_WIRING_EXPLORER_VIEW,
208 color_t status_bar_background_from;
209 color_t status_bar_background_to;
210 color_t status_bar_text_foreground;
212 color_t system_background_from;
213 color_t system_background_to;
215 color_t menu_item_background_from;
216 color_t menu_item_background_to;
217 color_t menu_item_background_selected_from;
218 color_t menu_item_background_selected_to;
219 color_t menu_item_text_foreground;
237 double home_page_timeout;
238 double summary_timeout;
253 uint8 cmd_buff [UI_CMD_BUFF_SIZE];
254 uint8 cmd_subset [UI_CMD_BUFF_SIZE];
259 update_flags_t update;
260 update_flags_t next_update;
261 update_flags_t feature_security_update;
264 paradigm_t previous_paradigm;
265 paradigm_t last_paradigm;
276 parameter_edit_t pmenu_edit;
277 uint8 pmenu_binary_cursor_position;
280 parameter_edit_t umenu_edit;
284 double faceplate_ticks;
288 bool vertical_history;
293 bool prohibit_scroll_commands;
309 uint8 sequential_trend_point[MAX_TRENDED_POINTS];
312 uint8 active_trend_point;
315 bool horizontal_bar_show_pv;
334 unicode_c passcode[89];
365 uint8 max_resolution;
377 #define RAISE_KEY 0x08
378 #define LOWER_KEY 0x04
379 #define SCROLL_KEY 0x02
380 #define PAGE_KEY 0x01
389 #define SCROLL_RAISE_CMD 5
390 #define SCROLL_BACK_CMD 6
391 #define SCROLL_DELAYED_CMD 7
392 #define SCROLL_RELEASED_CMD 8
393 #define RAISE_LOWER_CMD 9
394 #define RAISE_RELEASED_CMD 10
395 #define LOWER_RELEASED_CMD 11
396 #define PAGE_RELEASED_CMD 12
397 #define PAGE_RAISE_CMD 13
398 #define PAGE_LOWER_CMD 14
402 #define REPEAT_FIRST BIT0
403 #define REPEAT_500MS BIT1
404 #define REPEAT_200MS BIT2
405 #define REPEAT_2S BIT3
406 #define REPEAT_3S BIT4
410 #define HUNDRED_MILLISECONDS 100L
411 #define ONE_SECOND 1000L
412 #define ONE_MINUTE 60000L
413 #define ONE_HOUR 3600000L
414 #define SIXTY_MINUTES (ONE_MINUTE * 60)
415 #define HUNDRED_MINUTES (ONE_MINUTE * 100)
416 #define HUNDRED_HOURS (ONE_HOUR * 100)
417 #define MAX_DISPLAY_HOURS (ONE_HOUR * 500)
425 bool ui_get_cmd_buffer (uint8 * z_cmd_p, uint8 * z_cmd_subset_p);
426 void ui_add_cmd_buffer (uint8 z_command, uint8 z_command_subset);
427 void ui_reset_cmd_buffer (
void);
428 bool ui_process_generic_command (uint8 z_command, uint8 z_command_subset);
429 void ui_goto_next_operator_view (
void);
430 void ui_goto_previous_operator_view (
void);
431 void ui_operator_view_no_trends (DictRef_t z_title);
432 void uw_cisp_to_text (CISP_t param_cisp, unicode_p uc_src);
435 void ui_command_interpreter (uint16 z_period);
Definition: ui_private.h:235
Definition: stdtypes.h:134
Definition: stdtypes.h:116
Definition: ui_private.h:52
Definition: ui_private.h:358
Definition: ui_private.h:206
Definition: ui_private.h:87
Definition: ui_private.h:61
Definition: ui_private.h:198