initial
This commit is contained in:
parent
7f98f19916
commit
882b6447a9
33
README.md
33
README.md
|
@ -1,2 +1,35 @@
|
|||
# dash5_esp32s3
|
||||
rusEFI 5inch display dashboard
|
||||
|
||||
|
||||
Display devboard JC8048W550C
|
||||
CAN tranceiver TJA1050
|
||||
Power module MP1584
|
||||
|
||||
Connectors:
|
||||
|
||||
Adapter -- ECU wiring (JST XH 2.54 4pin)
|
||||
GND / 12V / CAN_L / CAN_H
|
||||
|
||||
Adapter -- Display devboard (4pin JST1.25)
|
||||
CAN tranceiver VCC -- 3.3V
|
||||
CAN tranceiver GND -- GND
|
||||
CAN tranceiver TX -- PIN_17
|
||||
CAN tranceiver RX -- PIN_18
|
||||
|
||||
(use 4pin connector near the USB)
|
||||
Power module MP1584 Vout -- 5V
|
||||
Power module MP1584 GND -- GND
|
||||
|
||||
![dashboard]()
|
||||
|
||||
![dashboard_video]()
|
||||
|
||||
Case 3D printed (PETG)
|
||||
|
||||
![case_plane1]()
|
||||
|
||||
![case_plane2]()
|
||||
|
||||
![case_plane3]()
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
%TF.GenerationSoftware,KiCad,Pcbnew,8.0.3*%
|
||||
%TF.CreationDate,2025-03-04T21:36:17+03:00*%
|
||||
%TF.ProjectId,5inch_dash_esp32s3,35696e63-685f-4646-9173-685f65737033,rev?*%
|
||||
%TF.SameCoordinates,PX71969d0PY6c4a2b0*%
|
||||
%TF.FileFunction,Profile,NP*%
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW 8.0.3) date 2025-03-04 21:36:17*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G01*
|
||||
G04 APERTURE LIST*
|
||||
%TA.AperFunction,Profile*%
|
||||
%ADD10C,0.050000*%
|
||||
%TD*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
X0Y30246000D02*
|
||||
X37366000Y30246000D01*
|
||||
X37366000Y0D01*
|
||||
X0Y0D01*
|
||||
X0Y30246000D01*
|
||||
M02*
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
M48
|
||||
; DRILL file {KiCad 8.0.3} date 2025-03-04T21:36:22+0300
|
||||
; FORMAT={-:-/ absolute / metric / decimal}
|
||||
; #@! TF.CreationDate,2025-03-04T21:36:22+03:00
|
||||
; #@! TF.GenerationSoftware,Kicad,Pcbnew,8.0.3
|
||||
; #@! TF.FileFunction,NonPlated,1,2,NPTH
|
||||
FMAT,2
|
||||
METRIC
|
||||
; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill
|
||||
T1C2.200
|
||||
%
|
||||
G90
|
||||
G05
|
||||
T1
|
||||
X3.068Y2.806
|
||||
X33.894Y27.05
|
||||
M30
|
|
@ -0,0 +1,19 @@
|
|||
M48
|
||||
; DRILL file {KiCad 8.0.3} date 2025-03-04T21:36:22+0300
|
||||
; FORMAT={-:-/ absolute / metric / decimal}
|
||||
; #@! TF.CreationDate,2025-03-04T21:36:22+03:00
|
||||
; #@! TF.GenerationSoftware,Kicad,Pcbnew,8.0.3
|
||||
; #@! TF.FileFunction,Plated,1,2,PTH
|
||||
FMAT,2
|
||||
METRIC
|
||||
; #@! TA.AperFunction,Plated,PTH,ComponentDrill
|
||||
T1C0.950
|
||||
%
|
||||
G90
|
||||
G05
|
||||
T1
|
||||
X9.458Y27.444
|
||||
X11.958Y27.444
|
||||
X14.458Y27.444
|
||||
X16.958Y27.444
|
||||
M30
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"board": {
|
||||
"active_layer": 41,
|
||||
"active_layer_preset": "All Layers",
|
||||
"auto_track_width": true,
|
||||
"hidden_netclasses": [],
|
||||
"hidden_nets": [],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"images": 0.6,
|
||||
"pads": 1.0,
|
||||
"tracks": 1.0,
|
||||
"vias": 1.0,
|
||||
"zones": 0.6
|
||||
},
|
||||
"selection_filter": {
|
||||
"dimensions": true,
|
||||
"footprints": true,
|
||||
"graphics": true,
|
||||
"keepouts": true,
|
||||
"lockedItems": false,
|
||||
"otherItems": true,
|
||||
"pads": true,
|
||||
"text": true,
|
||||
"tracks": true,
|
||||
"vias": true,
|
||||
"zones": true
|
||||
},
|
||||
"visible_items": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36,
|
||||
39,
|
||||
40
|
||||
],
|
||||
"visible_layers": "fffffff_ffffffff",
|
||||
"zone_display_mode": 0
|
||||
},
|
||||
"git": {
|
||||
"repo_password": "",
|
||||
"repo_type": "",
|
||||
"repo_username": "",
|
||||
"ssh_key": ""
|
||||
},
|
||||
"meta": {
|
||||
"filename": "5inch_dash_esp32s3.kicad_prl",
|
||||
"version": 3
|
||||
},
|
||||
"project": {
|
||||
"files": []
|
||||
}
|
||||
}
|
|
@ -0,0 +1,598 @@
|
|||
{
|
||||
"board": {
|
||||
"3dviewports": [],
|
||||
"design_settings": {
|
||||
"defaults": {
|
||||
"apply_defaults_to_fp_fields": false,
|
||||
"apply_defaults_to_fp_shapes": false,
|
||||
"apply_defaults_to_fp_text": false,
|
||||
"board_outline_line_width": 0.05,
|
||||
"copper_line_width": 0.2,
|
||||
"copper_text_italic": false,
|
||||
"copper_text_size_h": 1.5,
|
||||
"copper_text_size_v": 1.5,
|
||||
"copper_text_thickness": 0.3,
|
||||
"copper_text_upright": false,
|
||||
"courtyard_line_width": 0.05,
|
||||
"dimension_precision": 4,
|
||||
"dimension_units": 3,
|
||||
"dimensions": {
|
||||
"arrow_length": 1270000,
|
||||
"extension_offset": 500000,
|
||||
"keep_text_aligned": true,
|
||||
"suppress_zeroes": false,
|
||||
"text_position": 0,
|
||||
"units_format": 1
|
||||
},
|
||||
"fab_line_width": 0.1,
|
||||
"fab_text_italic": false,
|
||||
"fab_text_size_h": 1.0,
|
||||
"fab_text_size_v": 1.0,
|
||||
"fab_text_thickness": 0.15,
|
||||
"fab_text_upright": false,
|
||||
"other_line_width": 0.1,
|
||||
"other_text_italic": false,
|
||||
"other_text_size_h": 1.0,
|
||||
"other_text_size_v": 1.0,
|
||||
"other_text_thickness": 0.15,
|
||||
"other_text_upright": false,
|
||||
"pads": {
|
||||
"drill": 0.762,
|
||||
"height": 1.524,
|
||||
"width": 1.524
|
||||
},
|
||||
"silk_line_width": 0.1,
|
||||
"silk_text_italic": false,
|
||||
"silk_text_size_h": 1.0,
|
||||
"silk_text_size_v": 1.0,
|
||||
"silk_text_thickness": 0.1,
|
||||
"silk_text_upright": false,
|
||||
"zones": {
|
||||
"min_clearance": 0.5
|
||||
}
|
||||
},
|
||||
"diff_pair_dimensions": [
|
||||
{
|
||||
"gap": 0.0,
|
||||
"via_gap": 0.0,
|
||||
"width": 0.0
|
||||
}
|
||||
],
|
||||
"drc_exclusions": [],
|
||||
"meta": {
|
||||
"version": 2
|
||||
},
|
||||
"rule_severities": {
|
||||
"annular_width": "error",
|
||||
"clearance": "error",
|
||||
"connection_width": "warning",
|
||||
"copper_edge_clearance": "error",
|
||||
"copper_sliver": "warning",
|
||||
"courtyards_overlap": "error",
|
||||
"diff_pair_gap_out_of_range": "error",
|
||||
"diff_pair_uncoupled_length_too_long": "error",
|
||||
"drill_out_of_range": "error",
|
||||
"duplicate_footprints": "warning",
|
||||
"extra_footprint": "warning",
|
||||
"footprint": "error",
|
||||
"footprint_symbol_mismatch": "warning",
|
||||
"footprint_type_mismatch": "ignore",
|
||||
"hole_clearance": "error",
|
||||
"hole_near_hole": "error",
|
||||
"holes_co_located": "warning",
|
||||
"invalid_outline": "error",
|
||||
"isolated_copper": "warning",
|
||||
"item_on_disabled_layer": "error",
|
||||
"items_not_allowed": "error",
|
||||
"length_out_of_range": "error",
|
||||
"lib_footprint_issues": "warning",
|
||||
"lib_footprint_mismatch": "warning",
|
||||
"malformed_courtyard": "error",
|
||||
"microvia_drill_out_of_range": "error",
|
||||
"missing_courtyard": "ignore",
|
||||
"missing_footprint": "warning",
|
||||
"net_conflict": "warning",
|
||||
"npth_inside_courtyard": "ignore",
|
||||
"padstack": "warning",
|
||||
"pth_inside_courtyard": "ignore",
|
||||
"shorting_items": "error",
|
||||
"silk_edge_clearance": "warning",
|
||||
"silk_over_copper": "warning",
|
||||
"silk_overlap": "warning",
|
||||
"skew_out_of_range": "error",
|
||||
"solder_mask_bridge": "error",
|
||||
"starved_thermal": "error",
|
||||
"text_height": "warning",
|
||||
"text_thickness": "warning",
|
||||
"through_hole_pad_without_hole": "error",
|
||||
"too_many_vias": "error",
|
||||
"track_dangling": "warning",
|
||||
"track_width": "error",
|
||||
"tracks_crossing": "error",
|
||||
"unconnected_items": "error",
|
||||
"unresolved_variable": "error",
|
||||
"via_dangling": "warning",
|
||||
"zones_intersect": "error"
|
||||
},
|
||||
"rules": {
|
||||
"max_error": 0.005,
|
||||
"min_clearance": 0.35,
|
||||
"min_connection": 0.35,
|
||||
"min_copper_edge_clearance": 0.5,
|
||||
"min_hole_clearance": 0.35,
|
||||
"min_hole_to_hole": 0.6,
|
||||
"min_microvia_diameter": 0.2,
|
||||
"min_microvia_drill": 0.1,
|
||||
"min_resolved_spokes": 3,
|
||||
"min_silk_clearance": 0.0,
|
||||
"min_text_height": 0.8,
|
||||
"min_text_thickness": 0.08,
|
||||
"min_through_hole_diameter": 0.3,
|
||||
"min_track_width": 0.3,
|
||||
"min_via_annular_width": 0.1,
|
||||
"min_via_diameter": 0.5,
|
||||
"solder_mask_to_copper_clearance": 0.0,
|
||||
"use_height_for_length_calcs": true
|
||||
},
|
||||
"teardrop_options": [
|
||||
{
|
||||
"td_onpadsmd": true,
|
||||
"td_onroundshapesonly": false,
|
||||
"td_ontrackend": false,
|
||||
"td_onviapad": true
|
||||
}
|
||||
],
|
||||
"teardrop_parameters": [
|
||||
{
|
||||
"td_allow_use_two_tracks": true,
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_on_pad_in_zone": false,
|
||||
"td_target_name": "td_round_shape",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
},
|
||||
{
|
||||
"td_allow_use_two_tracks": true,
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_on_pad_in_zone": false,
|
||||
"td_target_name": "td_rect_shape",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
},
|
||||
{
|
||||
"td_allow_use_two_tracks": true,
|
||||
"td_curve_segcount": 0,
|
||||
"td_height_ratio": 1.0,
|
||||
"td_length_ratio": 0.5,
|
||||
"td_maxheight": 2.0,
|
||||
"td_maxlen": 1.0,
|
||||
"td_on_pad_in_zone": false,
|
||||
"td_target_name": "td_track_end",
|
||||
"td_width_to_size_filter_ratio": 0.9
|
||||
}
|
||||
],
|
||||
"track_widths": [
|
||||
0.0,
|
||||
0.5
|
||||
],
|
||||
"tuning_pattern_settings": {
|
||||
"diff_pair_defaults": {
|
||||
"corner_radius_percentage": 80,
|
||||
"corner_style": 1,
|
||||
"max_amplitude": 1.0,
|
||||
"min_amplitude": 0.2,
|
||||
"single_sided": false,
|
||||
"spacing": 1.0
|
||||
},
|
||||
"diff_pair_skew_defaults": {
|
||||
"corner_radius_percentage": 80,
|
||||
"corner_style": 1,
|
||||
"max_amplitude": 1.0,
|
||||
"min_amplitude": 0.2,
|
||||
"single_sided": false,
|
||||
"spacing": 0.6
|
||||
},
|
||||
"single_track_defaults": {
|
||||
"corner_radius_percentage": 80,
|
||||
"corner_style": 1,
|
||||
"max_amplitude": 1.0,
|
||||
"min_amplitude": 0.2,
|
||||
"single_sided": false,
|
||||
"spacing": 0.6
|
||||
}
|
||||
},
|
||||
"via_dimensions": [
|
||||
{
|
||||
"diameter": 0.0,
|
||||
"drill": 0.0
|
||||
}
|
||||
],
|
||||
"zones_allow_external_fillets": false
|
||||
},
|
||||
"ipc2581": {
|
||||
"dist": "",
|
||||
"distpn": "",
|
||||
"internal_id": "",
|
||||
"mfg": "",
|
||||
"mpn": ""
|
||||
},
|
||||
"layer_presets": [],
|
||||
"viewports": []
|
||||
},
|
||||
"boards": [],
|
||||
"cvpcb": {
|
||||
"equivalence_files": []
|
||||
},
|
||||
"erc": {
|
||||
"erc_exclusions": [],
|
||||
"meta": {
|
||||
"version": 0
|
||||
},
|
||||
"pin_map": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
[
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
],
|
||||
"rule_severities": {
|
||||
"bus_definition_conflict": "error",
|
||||
"bus_entry_needed": "error",
|
||||
"bus_to_bus_conflict": "error",
|
||||
"bus_to_net_conflict": "error",
|
||||
"conflicting_netclasses": "error",
|
||||
"different_unit_footprint": "error",
|
||||
"different_unit_net": "error",
|
||||
"duplicate_reference": "error",
|
||||
"duplicate_sheet_names": "error",
|
||||
"endpoint_off_grid": "warning",
|
||||
"extra_units": "error",
|
||||
"global_label_dangling": "warning",
|
||||
"hier_label_mismatch": "error",
|
||||
"label_dangling": "error",
|
||||
"lib_symbol_issues": "warning",
|
||||
"missing_bidi_pin": "warning",
|
||||
"missing_input_pin": "warning",
|
||||
"missing_power_pin": "error",
|
||||
"missing_unit": "warning",
|
||||
"multiple_net_names": "warning",
|
||||
"net_not_bus_member": "warning",
|
||||
"no_connect_connected": "warning",
|
||||
"no_connect_dangling": "warning",
|
||||
"pin_not_connected": "error",
|
||||
"pin_not_driven": "error",
|
||||
"pin_to_pin": "warning",
|
||||
"power_pin_not_driven": "error",
|
||||
"similar_labels": "warning",
|
||||
"simulation_model_issue": "ignore",
|
||||
"unannotated": "error",
|
||||
"unit_value_mismatch": "error",
|
||||
"unresolved_variable": "error",
|
||||
"wire_dangling": "error"
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"pinned_footprint_libs": [],
|
||||
"pinned_symbol_libs": []
|
||||
},
|
||||
"meta": {
|
||||
"filename": "5inch_dash_esp32s3.kicad_pro",
|
||||
"version": 1
|
||||
},
|
||||
"net_settings": {
|
||||
"classes": [
|
||||
{
|
||||
"bus_width": 12,
|
||||
"clearance": 0.2,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
"diff_pair_width": 0.2,
|
||||
"line_style": 0,
|
||||
"microvia_diameter": 0.3,
|
||||
"microvia_drill": 0.1,
|
||||
"name": "Default",
|
||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||
"track_width": 0.2,
|
||||
"via_diameter": 0.6,
|
||||
"via_drill": 0.3,
|
||||
"wire_width": 6
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"version": 3
|
||||
},
|
||||
"net_colors": null,
|
||||
"netclass_assignments": null,
|
||||
"netclass_patterns": []
|
||||
},
|
||||
"pcbnew": {
|
||||
"last_paths": {
|
||||
"gencad": "",
|
||||
"idf": "",
|
||||
"netlist": "",
|
||||
"plot": "./",
|
||||
"pos_files": "",
|
||||
"specctra_dsn": "",
|
||||
"step": "5inch_dash_esp32s3.step",
|
||||
"svg": "",
|
||||
"vrml": ""
|
||||
},
|
||||
"page_layout_descr_file": ""
|
||||
},
|
||||
"schematic": {
|
||||
"annotate_start_num": 0,
|
||||
"bom_export_filename": "",
|
||||
"bom_fmt_presets": [],
|
||||
"bom_fmt_settings": {
|
||||
"field_delimiter": ",",
|
||||
"keep_line_breaks": false,
|
||||
"keep_tabs": false,
|
||||
"name": "CSV",
|
||||
"ref_delimiter": ",",
|
||||
"ref_range_delimiter": "",
|
||||
"string_delimiter": "\""
|
||||
},
|
||||
"bom_presets": [],
|
||||
"bom_settings": {
|
||||
"exclude_dnp": false,
|
||||
"fields_ordered": [
|
||||
{
|
||||
"group_by": false,
|
||||
"label": "Reference",
|
||||
"name": "Reference",
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"group_by": true,
|
||||
"label": "Value",
|
||||
"name": "Value",
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"group_by": false,
|
||||
"label": "Datasheet",
|
||||
"name": "Datasheet",
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"group_by": false,
|
||||
"label": "Footprint",
|
||||
"name": "Footprint",
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"group_by": false,
|
||||
"label": "Qty",
|
||||
"name": "${QUANTITY}",
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"group_by": true,
|
||||
"label": "DNP",
|
||||
"name": "${DNP}",
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"filter_string": "",
|
||||
"group_symbols": true,
|
||||
"name": "Grouped By Value",
|
||||
"sort_asc": true,
|
||||
"sort_field": "Обозначение"
|
||||
},
|
||||
"connection_grid_size": 50.0,
|
||||
"drawing": {
|
||||
"dashed_lines_dash_length_ratio": 12.0,
|
||||
"dashed_lines_gap_length_ratio": 3.0,
|
||||
"default_line_thickness": 6.0,
|
||||
"default_text_size": 50.0,
|
||||
"field_names": [],
|
||||
"intersheets_ref_own_page": false,
|
||||
"intersheets_ref_prefix": "",
|
||||
"intersheets_ref_short": false,
|
||||
"intersheets_ref_show": false,
|
||||
"intersheets_ref_suffix": "",
|
||||
"junction_size_choice": 3,
|
||||
"label_size_ratio": 0.375,
|
||||
"operating_point_overlay_i_precision": 3,
|
||||
"operating_point_overlay_i_range": "~A",
|
||||
"operating_point_overlay_v_precision": 3,
|
||||
"operating_point_overlay_v_range": "~V",
|
||||
"overbar_offset_ratio": 1.23,
|
||||
"pin_symbol_size": 25.0,
|
||||
"text_offset_ratio": 0.15
|
||||
},
|
||||
"legacy_lib_dir": "",
|
||||
"legacy_lib_list": [],
|
||||
"meta": {
|
||||
"version": 1
|
||||
},
|
||||
"net_format_name": "",
|
||||
"page_layout_descr_file": "",
|
||||
"plot_directory": "",
|
||||
"spice_current_sheet_as_root": false,
|
||||
"spice_external_command": "spice \"%I\"",
|
||||
"spice_model_current_sheet_as_root": true,
|
||||
"spice_save_all_currents": false,
|
||||
"spice_save_all_dissipations": false,
|
||||
"spice_save_all_voltages": false,
|
||||
"subpart_first_id": 65,
|
||||
"subpart_id_separator": 0
|
||||
},
|
||||
"sheets": [
|
||||
[
|
||||
"341b0a8b-c11d-48c4-bb64-19b364ea664c",
|
||||
"Корневой лист"
|
||||
]
|
||||
],
|
||||
"text_variables": {}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,564 @@
|
|||
// #define DEBUG
|
||||
|
||||
#include "lvgl.h"
|
||||
#include "lv_conf.h"
|
||||
// #include <examples/lv_examples.h>
|
||||
// #include <demos/lv_demos.h>
|
||||
#include "ui.h"
|
||||
|
||||
static SemaphoreHandle_t dataMutex;
|
||||
static SemaphoreHandle_t uiMutex;
|
||||
|
||||
#define LGFX_USE_V1
|
||||
#include <LovyanGFX.hpp>
|
||||
#include <lgfx/v1/platforms/esp32s3/Panel_RGB.hpp>
|
||||
#include <lgfx/v1/platforms/esp32s3/Bus_RGB.hpp>
|
||||
|
||||
/*******************************************************************************/
|
||||
// Dislay driver config
|
||||
class LGFX : public lgfx::LGFX_Device {
|
||||
|
||||
lgfx::Bus_RGB _bus_instance;
|
||||
lgfx::Touch_GT911 _touch_instance;
|
||||
lgfx::Panel_RGB _panel_instance;
|
||||
|
||||
public:
|
||||
LGFX(void) {
|
||||
{
|
||||
auto cfg = _bus_instance.config();
|
||||
cfg.panel = &_panel_instance;
|
||||
|
||||
// Configure sync and clock pins.
|
||||
cfg.pin_henable = GPIO_NUM_40;
|
||||
cfg.pin_vsync = GPIO_NUM_41;
|
||||
cfg.pin_hsync = GPIO_NUM_39;
|
||||
cfg.pin_pclk = GPIO_NUM_42;
|
||||
cfg.freq_write = 14000000; // 14000000
|
||||
// Configure data pins.
|
||||
cfg.pin_d0 = GPIO_NUM_8; // B0
|
||||
cfg.pin_d1 = GPIO_NUM_3; // B1
|
||||
cfg.pin_d2 = GPIO_NUM_46; // B2
|
||||
cfg.pin_d3 = GPIO_NUM_9; // B3
|
||||
cfg.pin_d4 = GPIO_NUM_1; // B4
|
||||
|
||||
cfg.pin_d5 = GPIO_NUM_5; // G0
|
||||
cfg.pin_d6 = GPIO_NUM_6; // G1
|
||||
cfg.pin_d7 = GPIO_NUM_7; // G2
|
||||
cfg.pin_d8 = GPIO_NUM_15; // G3
|
||||
cfg.pin_d9 = GPIO_NUM_16; // G4
|
||||
cfg.pin_d10 = GPIO_NUM_4; // G5
|
||||
|
||||
cfg.pin_d11 = GPIO_NUM_45; // R0
|
||||
cfg.pin_d12 = GPIO_NUM_48; // R1
|
||||
cfg.pin_d13 = GPIO_NUM_47; // R2
|
||||
cfg.pin_d14 = GPIO_NUM_21; // R3
|
||||
cfg.pin_d15 = GPIO_NUM_14; // R4
|
||||
|
||||
// Configure timing parameters for horizontal and vertical sync.
|
||||
cfg.hsync_polarity = 0;
|
||||
cfg.hsync_front_porch = 8; //8;
|
||||
cfg.hsync_pulse_width = 4; //4;
|
||||
cfg.hsync_back_porch = 8; //8;
|
||||
|
||||
cfg.vsync_polarity = 0;
|
||||
cfg.vsync_front_porch = 8; //8;
|
||||
cfg.vsync_pulse_width = 4; //4;
|
||||
cfg.vsync_back_porch = 8; //8;
|
||||
|
||||
// Configure polarity for clock and data transmission.
|
||||
cfg.pclk_active_neg = 1;
|
||||
cfg.de_idle_high = 1; // 0
|
||||
cfg.pclk_idle_high = 1; // 0
|
||||
|
||||
_bus_instance.config(cfg);
|
||||
_panel_instance.setBus(&_bus_instance);
|
||||
}
|
||||
|
||||
{
|
||||
auto cfg = _panel_instance.config();
|
||||
cfg.memory_width = 800;
|
||||
cfg.memory_height = 480;
|
||||
cfg.panel_width = 800;
|
||||
cfg.panel_height = 480;
|
||||
cfg.offset_x = 0;
|
||||
cfg.offset_y = 0;
|
||||
// cfg.offset_rotation = 0;
|
||||
// cfg.dummy_read_pixel = 16;
|
||||
// cfg.dummy_read_bits = 1;
|
||||
// cfg.readable = false; //true
|
||||
// cfg.invert = false;
|
||||
// cfg.rgb_order = false;
|
||||
// cfg.dlen_16bit = true; // false
|
||||
// cfg.bus_shared = false; // true
|
||||
_panel_instance.config(cfg);
|
||||
}
|
||||
{
|
||||
auto cfg = _touch_instance.config();
|
||||
cfg.x_min = 0;
|
||||
cfg.x_max = 799;
|
||||
cfg.y_min = 0;
|
||||
cfg.y_max = 479;
|
||||
cfg.pin_int = GPIO_NUM_NC;
|
||||
cfg.pin_rst = GPIO_NUM_38;
|
||||
cfg.bus_shared = false;
|
||||
cfg.offset_rotation = 0;
|
||||
cfg.i2c_port = 1;
|
||||
cfg.pin_sda = GPIO_NUM_19;
|
||||
cfg.pin_scl = GPIO_NUM_20;
|
||||
cfg.freq = 400000;
|
||||
|
||||
_touch_instance.config(cfg);
|
||||
_panel_instance.setTouch(&_touch_instance);
|
||||
}
|
||||
|
||||
setPanel(&_panel_instance);
|
||||
}
|
||||
};
|
||||
|
||||
static LGFX display;
|
||||
|
||||
void disp_flush_callback(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *px_map) {
|
||||
uint32_t w = (area->x2 - area->x1 + 1);
|
||||
uint32_t h = (area->y2 - area->y1 + 1);
|
||||
|
||||
display.startWrite();
|
||||
display.setAddrWindow(area->x1, area->y1, w, h);
|
||||
display.pushPixelsDMA((uint16_t *)px_map, w * h, true);
|
||||
// display.writePixels((uint16_t *)px_map, w * h, true);
|
||||
display.endWrite();
|
||||
// display.pushImageDMA(area->x1, area->y1, w, h, (lgfx::swap565_t *)&px_map->full);
|
||||
|
||||
lv_disp_flush_ready(disp);
|
||||
}
|
||||
|
||||
void touchpad_read(lv_indev_drv_t *indev_driver, lv_indev_data_t *data) {
|
||||
int32_t x, y;
|
||||
data->state = LV_INDEV_STATE_REL;
|
||||
if (display.getTouch(&x, &y)) {
|
||||
data->state = LV_INDEV_STATE_PR;
|
||||
data->point.x = x;
|
||||
data->point.y = y;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************/
|
||||
// Widget updaters
|
||||
#include <Ticker.h>
|
||||
#define PERIOD_FAST_MS 20
|
||||
#define PERIOD_MID_MS 200
|
||||
#define PERIOD_SLOW_MS 800
|
||||
|
||||
Ticker updateUiFast;
|
||||
Ticker updateUiMid;
|
||||
Ticker updateUiSlow;
|
||||
|
||||
typedef struct struct_message {
|
||||
int rpm;
|
||||
int speed;
|
||||
int clt;
|
||||
int iat;
|
||||
float afr;
|
||||
float Vbat;
|
||||
int fuelLevel;
|
||||
float map;
|
||||
float oilPress;
|
||||
float fuelPress;
|
||||
bool mainRelay;
|
||||
bool fuelPump;
|
||||
bool fan1;
|
||||
bool fan2;
|
||||
} struct_message;
|
||||
|
||||
volatile static struct_message myData;
|
||||
volatile static struct_message old_myData;
|
||||
|
||||
static void fastUpdate() {
|
||||
// void fastUpdate(void *pvParameters){
|
||||
// while (1) {
|
||||
if (xSemaphoreTake(dataMutex, portMAX_DELAY) == pdTRUE) {
|
||||
#ifdef DEBUG
|
||||
Serial.println("fastUpdate");
|
||||
#endif
|
||||
if (xSemaphoreTake(uiMutex, portMAX_DELAY) == pdTRUE) {
|
||||
// RPM
|
||||
if (myData.rpm != old_myData.rpm) {
|
||||
int val = myData.rpm / 10;
|
||||
lv_bar_set_value(ui_rpmBar0, val, LV_ANIM_OFF);
|
||||
if (val > 600) {
|
||||
lv_obj_set_style_bg_color(ui_rpmBar0, lv_color_hex(0xFF0000), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(ui_rpmBar0, lv_color_hex(0xE0FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
}
|
||||
lv_label_set_text_fmt(ui_rpmVal0, "%d0", val);
|
||||
old_myData.rpm = myData.rpm;
|
||||
}
|
||||
// MAP
|
||||
if (myData.map != old_myData.map) {
|
||||
lv_bar_set_value(ui_mapBar0, myData.map, LV_ANIM_OFF);
|
||||
lv_label_set_text_fmt(ui_mapVal0, "%.0f", myData.map);
|
||||
old_myData.map = myData.map;
|
||||
}
|
||||
// AFR
|
||||
if (myData.afr != old_myData.afr) {
|
||||
int l_bar = myData.afr * 10 - 150;
|
||||
lv_bar_set_value(ui_afrBar0, l_bar, LV_ANIM_OFF);
|
||||
lv_label_set_text_fmt(ui_afrVal0, "%0.1f", myData.afr);
|
||||
|
||||
if ((l_bar > 10) || (l_bar < -25)) {
|
||||
lv_obj_set_style_bg_color(ui_afrBar0, lv_color_hex(0xFF0000), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else if (l_bar > 0) {
|
||||
lv_obj_set_style_bg_color(ui_afrBar0, lv_color_hex(0x00FFFF), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(ui_afrBar0, lv_color_hex(0xE0FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
}
|
||||
old_myData.afr = myData.afr;
|
||||
}
|
||||
xSemaphoreGive(uiMutex);
|
||||
}
|
||||
xSemaphoreGive(dataMutex);
|
||||
}
|
||||
// vTaskDelay(pdMS_TO_TICKS(PERIOD_FAST_MS));
|
||||
// }
|
||||
}
|
||||
|
||||
static void midUpdate() {
|
||||
// void midUpdate(void *pvParameters) {
|
||||
// while (1) {
|
||||
if (xSemaphoreTake(dataMutex, portMAX_DELAY) == pdTRUE) {
|
||||
#ifdef DEBUG
|
||||
Serial.println("midUpdate");
|
||||
#endif
|
||||
if (xSemaphoreTake(uiMutex, portMAX_DELAY) == pdTRUE) {
|
||||
// VSS
|
||||
if (myData.speed != old_myData.speed) {
|
||||
lv_label_set_text_fmt(ui_speedVal0, "%d", myData.speed);
|
||||
old_myData.speed = myData.speed;
|
||||
}
|
||||
// OIL Press
|
||||
if (myData.oilPress != old_myData.oilPress) {
|
||||
lv_bar_set_value(ui_oilPressBar0, myData.oilPress, LV_ANIM_ON);
|
||||
lv_label_set_text_fmt(ui_oilPressVal0, "%.1f", myData.oilPress / 100);
|
||||
if (myData.oilPress > 180) {
|
||||
lv_obj_set_style_bg_color(ui_oilPressBar0, lv_color_hex(0xE6FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(ui_oilPressBar0, lv_color_hex(0xFF0000), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
}
|
||||
old_myData.oilPress = myData.oilPress;
|
||||
}
|
||||
// Fuel Press
|
||||
if (myData.fuelPress != old_myData.fuelPress) {
|
||||
lv_bar_set_value(ui_fuelPressBar0, myData.fuelPress, LV_ANIM_ON); ///set low press
|
||||
lv_label_set_text_fmt(ui_fuelPressVal0, "%.1f", myData.fuelPress / 100);
|
||||
if (myData.fuelPress > 270) {
|
||||
lv_obj_set_style_bg_color(ui_fuelPressBar0, lv_color_hex(0xE6FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(ui_fuelPressBar0, lv_color_hex(0xFF0000), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
}
|
||||
old_myData.fuelPress = myData.fuelPress;
|
||||
}
|
||||
xSemaphoreGive(uiMutex);
|
||||
}
|
||||
xSemaphoreGive(dataMutex);
|
||||
}
|
||||
// vTaskDelay(pdMS_TO_TICKS(PERIOD_MID_MS));
|
||||
// }
|
||||
}
|
||||
|
||||
static void slowUpdate() {
|
||||
// void slowUpdate(void *pvParameters) {
|
||||
// while (1) {
|
||||
if (xSemaphoreTake(dataMutex, portMAX_DELAY) == pdTRUE) {
|
||||
#ifdef DEBUG
|
||||
Serial.println("slowUpdate");
|
||||
#endif
|
||||
if (xSemaphoreTake(uiMutex, portMAX_DELAY) == pdTRUE) {
|
||||
// CLT
|
||||
if (myData.clt != old_myData.clt) {
|
||||
lv_bar_set_value(ui_cltBar0, myData.clt, LV_ANIM_ON);
|
||||
lv_label_set_text_fmt(ui_cltVal0, "%d", myData.clt);
|
||||
if (myData.clt < 102) {
|
||||
lv_obj_set_style_bg_color(ui_cltBar0, lv_color_hex(0xE6FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(ui_cltBar0, lv_color_hex(0xFF0000), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
}
|
||||
old_myData.clt = myData.clt;
|
||||
}
|
||||
// IAT
|
||||
if (myData.iat != old_myData.iat) {
|
||||
lv_bar_set_value(ui_iatBar0, myData.iat, LV_ANIM_ON);
|
||||
lv_label_set_text_fmt(ui_iatVal0, "%d", myData.iat);
|
||||
old_myData.iat = myData.iat;
|
||||
}
|
||||
// Vbat
|
||||
if (myData.Vbat != old_myData.Vbat) {
|
||||
lv_bar_set_value(ui_vBattBar0, myData.Vbat * 10, LV_ANIM_ON);
|
||||
lv_label_set_text_fmt(ui_vBattVal0, "%0.1f", myData.Vbat);
|
||||
if (myData.Vbat < 12) {
|
||||
lv_obj_set_style_bg_color(ui_vBattBar0, lv_color_hex(0xFF0000), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else if (myData.Vbat > 15) {
|
||||
lv_obj_set_style_bg_color(ui_vBattBar0, lv_color_hex(0xFF0000), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(ui_vBattBar0, lv_color_hex(0xFFFFFF), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
}
|
||||
old_myData.Vbat = myData.Vbat;
|
||||
}
|
||||
// Fuel level
|
||||
if (myData.fuelLevel != old_myData.fuelLevel) {
|
||||
lv_bar_set_value(ui_fuelLevelBar0, myData.fuelLevel, LV_ANIM_ON);
|
||||
lv_label_set_text_fmt(ui_fuelLevelVal0, "%d", myData.fuelLevel);
|
||||
if (myData.fuelLevel > 15) {
|
||||
lv_obj_set_style_bg_color(ui_fuelLevelBar0, lv_color_hex(0xFFFFFF), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(ui_fuelLevelBar0, lv_color_hex(0xFF0000), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
}
|
||||
old_myData.fuelLevel = myData.fuelLevel;
|
||||
}
|
||||
xSemaphoreGive(uiMutex);
|
||||
}
|
||||
xSemaphoreGive(dataMutex);
|
||||
}
|
||||
// vTaskDelay(pdMS_TO_TICKS(PERIOD_SLOW_MS));
|
||||
// }
|
||||
}
|
||||
|
||||
/*******************************************************************************/
|
||||
//CAN Receiver
|
||||
#include "driver/twai.h"
|
||||
// Pins used to connect to CAN bus transceiver:
|
||||
#define RX_PIN 18
|
||||
#define TX_PIN 17
|
||||
|
||||
// Interval:
|
||||
#define POLLING_RATE_MS 50
|
||||
|
||||
void TaskCANReceiver(void *pvParameters) {
|
||||
twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)TX_PIN, (gpio_num_t)RX_PIN, TWAI_MODE_NORMAL); //TWAI_MODE_LISTEN_ONLY);
|
||||
twai_timing_config_t t_config = TWAI_TIMING_CONFIG_500KBITS();
|
||||
twai_filter_config_t f_config = {
|
||||
.acceptance_code = 0x20000000U << 3, //0x200,// << 21,
|
||||
.acceptance_mask = 0x007FFFFFU << 3, // << 21,
|
||||
.single_filter = false
|
||||
};
|
||||
|
||||
// Install TWAI driver
|
||||
if (twai_driver_install(&g_config, &t_config, &f_config) != ESP_OK) {
|
||||
#ifdef DEBUG
|
||||
Serial.println("Failed to install driver");
|
||||
#endif
|
||||
while (1) {}
|
||||
}
|
||||
|
||||
// Start TWAI driver
|
||||
if (twai_start() != ESP_OK) {
|
||||
#ifdef DEBUG
|
||||
Serial.println("Failed to start driver");
|
||||
#endif
|
||||
while (1) {}
|
||||
}
|
||||
|
||||
// Reconfigure alerts to detect frame receive, Bus-Off error and RX queue full states
|
||||
uint32_t alerts_to_enable = TWAI_ALERT_RX_DATA; // | TWAI_ALERT_ERR_PASS | TWAI_ALERT_BUS_ERROR | TWAI_ALERT_RX_QUEUE_FULL;
|
||||
if (twai_reconfigure_alerts(alerts_to_enable, NULL) != ESP_OK) {
|
||||
#ifdef DEBUG
|
||||
Serial.println("Failed to reconfigure alerts");
|
||||
#endif
|
||||
while (1) {}
|
||||
}
|
||||
|
||||
dataMutex = xSemaphoreCreateMutex();
|
||||
|
||||
updateUiFast.attach_ms(PERIOD_FAST_MS, fastUpdate);
|
||||
updateUiMid.attach_ms(PERIOD_MID_MS, midUpdate);
|
||||
updateUiSlow.attach_ms(PERIOD_SLOW_MS, slowUpdate);
|
||||
|
||||
while (1) {
|
||||
uint32_t alerts_triggered;
|
||||
twai_read_alerts(&alerts_triggered, pdMS_TO_TICKS(POLLING_RATE_MS));
|
||||
// Check if message is received
|
||||
if (alerts_triggered & TWAI_ALERT_RX_DATA) {
|
||||
// One or more messages received. Handle all.
|
||||
twai_message_t message;
|
||||
while (twai_receive(&message, 0) == ESP_OK) {
|
||||
|
||||
// ID 0x200
|
||||
// SG_ WarningCounter : 0|16@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ LastError : 16|16@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ RevLimAct : 32|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ MainRelayAct : 33|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ FuelPumpAct : 34|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ CELAct : 35|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ EGOHeatAct : 36|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ LambdaProtectAct : 37|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ CurrentGear : 40|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ DistanceTraveled : 48|16@1+ (0.1,0) [0|6553.5] "km" Vector__XXX
|
||||
// SG_ Fan : 38|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
// SG_ Fan2 : 39|1@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
// ID 0x201
|
||||
// SG_ RPM : 0|16@1+ (1,0) [0|0] "RPM" Vector__XXX
|
||||
// SG_ IgnitionTiming : 16|16@1- (0.02,0) [0|0] "deg" Vector__XXX
|
||||
// SG_ InjDuty : 32|8@1+ (0.5,0) [0|100] "%" Vector__XXX
|
||||
// SG_ IgnDuty : 40|8@1+ (0.5,0) [0|100] "%" Vector__XXX
|
||||
// SG_ VehicleSpeed : 48|8@1+ (1,0) [0|255] "kph" Vector__XXX
|
||||
// SG_ FlexPct : 56|8@1+ (1,0) [0|100] "%" Vector__XXX
|
||||
|
||||
// ID 0x202
|
||||
// SG_ PPS : 0|16@1- (0.01,0) [0|100] "%" Vector__XXX
|
||||
// SG_ TPS1 : 16|16@1- (0.01,0) [0|100] "%" Vector__XXX
|
||||
// SG_ TPS2 : 32|16@1- (0.01,0) [0|100] "%" Vector__XXX
|
||||
// SG_ Wastegate : 48|16@1- (0.01,0) [0|100] "%" Vector__XXX
|
||||
|
||||
// ID 0x203
|
||||
// SG_ MAP : 0|16@1+ (0.03333333,0) [0|0] "kPa" Vector__XXX
|
||||
// SG_ CoolantTemp : 16|8@1+ (1,-40) [-40|200] "deg C" Vector__XXX
|
||||
// SG_ IntakeTemp : 24|8@1+ (1,-40) [-40|200] "deg C" Vector__XXX
|
||||
// SG_ AUX1Temp : 32|8@1+ (1,-40) [-40|200] "deg C" Vector__XXX
|
||||
// SG_ AUX2Temp : 40|8@1+ (1,-40) [-40|200] "deg C" Vector__XXX
|
||||
// SG_ MCUTemp : 48|8@1+ (1,-40) [-40|100] "deg C" Vector__XXX
|
||||
// SG_ FuelLevel : 56|8@1+ (0.5,0) [0|0] "%" Vector__XXX
|
||||
|
||||
// ID 0x204
|
||||
// SG_ OilPress : 16|16@1+ (0.03333333,0) [0|0] "kPa" Vector__XXX
|
||||
// SG_ OilTemperature : 32|8@1+ (1,-40) [-40|215] "deg C" Vector__XXX
|
||||
// SG_ FuelTemperature : 40|8@1+ (1,-40) [-40|215] "deg C" Vector__XXX
|
||||
// SG_ BattVolt : 48|16@1+ (0.001,0) [0|25] "mV" Vector__XXX
|
||||
|
||||
// ID 0x207
|
||||
// SG_ Lam1 : 0|16@1+ (0.0001,0) [0|2] "lambda" Vector__XXX
|
||||
// SG_ Lam2 : 16|16@1+ (0.0001,0) [0|2] "lambda" Vector__XXX
|
||||
// SG_ FpLow : 32|16@1+ (0.03333333,0) [0|0] "kPa" Vector__XXX
|
||||
// SG_ FpHigh : 48|16@1+ (0.1,0) [0|0] "bar" Vector__XXX
|
||||
if (xSemaphoreTake(dataMutex, portMAX_DELAY) == pdTRUE) {
|
||||
switch (message.identifier) {
|
||||
case 0x201:
|
||||
myData.rpm = (message.data[1] << 8 | message.data[0]);
|
||||
myData.speed = message.data[6];
|
||||
break;
|
||||
case 0x203:
|
||||
myData.map = (message.data[1] << 8 | message.data[0]) * 0.0333;
|
||||
myData.clt = message.data[2] - 40;
|
||||
myData.iat = message.data[3] - 40;
|
||||
myData.fuelLevel = message.data[7] / 2;
|
||||
break;
|
||||
case 0x204:
|
||||
myData.oilPress = (message.data[3] << 8 | message.data[2]) * 0.0333;
|
||||
myData.Vbat = (message.data[7] << 8 | message.data[6]) * 0.001;
|
||||
break;
|
||||
case 0x207:
|
||||
myData.afr = (message.data[1] << 8 | message.data[0]) * 0.00147;
|
||||
myData.fuelPress = (message.data[5] << 8 | message.data[4]) * 0.0333;
|
||||
break;
|
||||
}
|
||||
xSemaphoreGive(dataMutex);
|
||||
}
|
||||
}
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(5));
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************/
|
||||
|
||||
/*******************************************************************************/
|
||||
// Initial setup
|
||||
static int brightnessVal;
|
||||
|
||||
void setBrightness(int val) {
|
||||
if (val <= 55) {
|
||||
brightnessVal = 55;
|
||||
} else {
|
||||
if (val >= 255) {
|
||||
brightnessVal = 255;
|
||||
} else {
|
||||
brightnessVal = val;
|
||||
}
|
||||
}
|
||||
ledcWrite(GPIO_NUM_2, brightnessVal);
|
||||
}
|
||||
|
||||
void upBrightness(lv_event_t *e) {
|
||||
setBrightness(brightnessVal + 40);
|
||||
}
|
||||
void downBribrightness(lv_event_t *e) {
|
||||
setBrightness(brightnessVal - 40);
|
||||
}
|
||||
|
||||
const uint32_t screenWidth = 800;
|
||||
const uint32_t screenHeight = 480;
|
||||
static lv_disp_draw_buf_t draw_buf;
|
||||
static lv_color_t *disp_draw_buf1;
|
||||
static lv_color_t *disp_draw_buf2;
|
||||
static lv_disp_drv_t disp_drv;
|
||||
|
||||
void setup(void) {
|
||||
brightnessVal = 205;
|
||||
#ifdef DEBUG
|
||||
Serial.begin(115200);
|
||||
Serial.println("Setup starting");
|
||||
#endif
|
||||
ledcAttach(GPIO_NUM_2, 600, 8);
|
||||
ledcWrite(GPIO_NUM_2, brightnessVal);
|
||||
|
||||
display.init();
|
||||
display.fillScreen(TFT_BLACK);
|
||||
uiMutex = xSemaphoreCreateMutex();
|
||||
|
||||
lv_init();
|
||||
|
||||
disp_draw_buf1 = (lv_color_t *)heap_caps_malloc(sizeof(lv_color_t) * screenWidth * screenHeight / 10, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
disp_draw_buf2 = (lv_color_t *)heap_caps_malloc(sizeof(lv_color_t) * screenWidth * screenHeight / 10, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
// disp_draw_buf2 = (lv_color_t *)heap_caps_malloc(sizeof(lv_color_t) * screenWidth * screenHeight / 10, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
|
||||
lv_disp_draw_buf_init(&draw_buf, disp_draw_buf1, disp_draw_buf2, screenWidth * screenHeight / 10);
|
||||
|
||||
/* Initialize the display */
|
||||
lv_disp_drv_init(&disp_drv);
|
||||
/* Change the following line to your display resolution */
|
||||
disp_drv.hor_res = screenWidth;
|
||||
disp_drv.ver_res = screenHeight;
|
||||
disp_drv.flush_cb = disp_flush_callback;
|
||||
disp_drv.draw_buf = &draw_buf;
|
||||
lv_disp_drv_register(&disp_drv);
|
||||
|
||||
static lv_indev_drv_t indev_drv;
|
||||
lv_indev_drv_init(&indev_drv);
|
||||
indev_drv.type = LV_INDEV_TYPE_POINTER;
|
||||
indev_drv.read_cb = &touchpad_read;
|
||||
lv_indev_drv_register(&indev_drv);
|
||||
|
||||
// lv_demo_benchmark();
|
||||
// lv_demo_widgets();
|
||||
|
||||
// Crate task get data and updater
|
||||
xTaskCreatePinnedToCore(TaskCANReceiver, "TaskCANReceiver", 4 * 1024, NULL, 1, NULL, 0);
|
||||
// xTaskCreatePinnedToCore(fastUpdate, "fastUpdate", 4 * 1024, NULL, 1, NULL, 0);
|
||||
// xTaskCreatePinnedToCore(midUpdate, "midUpdate", 1 * 1024, NULL, 1, NULL, 0);
|
||||
// xTaskCreatePinnedToCore(slowUpdate, "slowUpdate", 1 * 1024, NULL, 1, NULL, 0);
|
||||
// xTaskCreatePinnedToCore(tickerUi, "tickerUi", 4 * 1024, NULL, 1, NULL, 0);
|
||||
|
||||
// updateUiFast.attach_ms(PERIOD_FAST_MS, fastUpdate);
|
||||
// updateUiMid.attach_ms(PERIOD_MID_MS, midUpdate);
|
||||
// updateUiSlow.attach_ms(PERIOD_SLOW_MS, slowUpdate);
|
||||
|
||||
ui_init();
|
||||
|
||||
#ifdef DEBUG
|
||||
Serial.println("Setup done");
|
||||
#endif
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
if (xSemaphoreTake(uiMutex, portMAX_DELAY) == pdTRUE) {
|
||||
lv_timer_handler();
|
||||
xSemaphoreGive(uiMutex);
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(5));
|
||||
}
|
||||
|
||||
/* void tickerUi(void *pvParameters) {
|
||||
while (1) {
|
||||
lv_timer_handler();
|
||||
vTaskDelay(pdMS_TO_TICKS(5));
|
||||
}
|
||||
} */
|
|
@ -0,0 +1,785 @@
|
|||
/**
|
||||
* @file lv_conf.h
|
||||
* Configuration file for v8.4.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copy this file as `lv_conf.h`
|
||||
* 1. simply next to the `lvgl` folder
|
||||
* 2. or any other places and
|
||||
* - define `LV_CONF_INCLUDE_SIMPLE`
|
||||
* - add the path as include path
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
#if 1 /*Set it to "1" to enable content*/
|
||||
|
||||
#ifndef LV_CONF_H
|
||||
#define LV_CONF_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*====================
|
||||
COLOR SETTINGS
|
||||
*====================*/
|
||||
|
||||
/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
|
||||
#define LV_COLOR_DEPTH 16
|
||||
|
||||
/*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/
|
||||
#define LV_COLOR_16_SWAP 0
|
||||
|
||||
/*Enable features to draw on transparent background.
|
||||
*It's required if opa, and transform_* style properties are used.
|
||||
*Can be also used if the UI is above another layer, e.g. an OSD menu or video player.*/
|
||||
#define LV_COLOR_SCREEN_TRANSP 1
|
||||
|
||||
/* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently.
|
||||
* 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */
|
||||
#define LV_COLOR_MIX_ROUND_OFS 0
|
||||
|
||||
/*Images pixels with this color will not be drawn if they are chroma keyed)*/
|
||||
#define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00) /*pure green*/
|
||||
|
||||
/*=========================
|
||||
MEMORY SETTINGS
|
||||
*=========================*/
|
||||
|
||||
/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/
|
||||
#define LV_MEM_CUSTOM 1
|
||||
#if LV_MEM_CUSTOM == 0
|
||||
/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
|
||||
#define LV_MEM_SIZE (256U * 1024U) /*[bytes]*/
|
||||
|
||||
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
|
||||
#define LV_MEM_ADR 0 /*0: unused*/
|
||||
/*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
|
||||
#if LV_MEM_ADR == 0
|
||||
#undef LV_MEM_POOL_INCLUDE
|
||||
#undef LV_MEM_POOL_ALLOC
|
||||
#endif
|
||||
|
||||
#else /*LV_MEM_CUSTOM*/
|
||||
// #define LV_MEM_SIZE (256U * 1024U)
|
||||
#define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
|
||||
#define LV_MEM_CUSTOM_ALLOC malloc
|
||||
#define LV_MEM_CUSTOM_FREE free
|
||||
#define LV_MEM_CUSTOM_REALLOC realloc
|
||||
#endif /*LV_MEM_CUSTOM*/
|
||||
|
||||
/*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms.
|
||||
*You will see an error log message if there wasn't enough buffers. */
|
||||
#define LV_MEM_BUF_MAX_NUM 16
|
||||
|
||||
/*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster).*/
|
||||
#define LV_MEMCPY_MEMSET_STD 0
|
||||
|
||||
/*====================
|
||||
HAL SETTINGS
|
||||
*====================*/
|
||||
|
||||
/*Default display refresh period. LVG will redraw changed areas with this period time*/
|
||||
#define LV_DISP_DEF_REFR_PERIOD 20 /*[ms]*/
|
||||
|
||||
/*Input device read period in milliseconds*/
|
||||
#define LV_INDEV_DEF_READ_PERIOD 30 /*[ms]*/
|
||||
|
||||
/*Use a custom tick source that tells the elapsed time in milliseconds.
|
||||
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
||||
#define LV_TICK_CUSTOM 1
|
||||
#if LV_TICK_CUSTOM
|
||||
// #define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
||||
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
||||
/*If using lvgl as ESP32 component*/
|
||||
#define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
|
||||
#endif /*LV_TICK_CUSTOM*/
|
||||
|
||||
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
||||
*(Not so important, you can adjust it to modify default sizes and spaces)*/
|
||||
#define LV_DPI_DEF 180 /*[px/inch]*/
|
||||
|
||||
/*=======================
|
||||
* FEATURE CONFIGURATION
|
||||
*=======================*/
|
||||
|
||||
/*-------------
|
||||
* Drawing
|
||||
*-----------*/
|
||||
|
||||
/*Enable complex draw engine.
|
||||
*Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/
|
||||
#define LV_DRAW_COMPLEX 1
|
||||
#if LV_DRAW_COMPLEX != 0
|
||||
|
||||
/*Allow buffering some shadow calculation.
|
||||
*LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
|
||||
*Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
|
||||
#define LV_SHADOW_CACHE_SIZE 0
|
||||
|
||||
/* Set number of maximally cached circle data.
|
||||
* The circumference of 1/4 circle are saved for anti-aliasing
|
||||
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
|
||||
* 0: to disable caching */
|
||||
#define LV_CIRCLE_CACHE_SIZE 4
|
||||
#endif /*LV_DRAW_COMPLEX*/
|
||||
|
||||
/**
|
||||
* "Simple layers" are used when a widget has `style_opa < 255` to buffer the widget into a layer
|
||||
* and blend it as an image with the given opacity.
|
||||
* Note that `bg_opa`, `text_opa` etc don't require buffering into layer)
|
||||
* The widget can be buffered in smaller chunks to avoid using large buffers.
|
||||
*
|
||||
* - LV_LAYER_SIMPLE_BUF_SIZE: [bytes] the optimal target buffer size. LVGL will try to allocate it
|
||||
* - LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE: [bytes] used if `LV_LAYER_SIMPLE_BUF_SIZE` couldn't be allocated.
|
||||
*
|
||||
* Both buffer sizes are in bytes.
|
||||
* "Transformed layers" (where transform_angle/zoom properties are used) use larger buffers
|
||||
* and can't be drawn in chunks. So these settings affects only widgets with opacity.
|
||||
*/
|
||||
#define LV_LAYER_SIMPLE_BUF_SIZE (24 * 1024)
|
||||
#define LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE (3 * 1024)
|
||||
|
||||
/*Default image cache size. Image caching keeps the images opened.
|
||||
*If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added)
|
||||
*With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
|
||||
*However the opened images might consume additional RAM.
|
||||
*0: to disable caching*/
|
||||
#define LV_IMG_CACHE_DEF_SIZE 0
|
||||
|
||||
/*Number of stops allowed per gradient. Increase this to allow more stops.
|
||||
*This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/
|
||||
#define LV_GRADIENT_MAX_STOPS 2
|
||||
|
||||
/*Default gradient buffer size.
|
||||
*When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again.
|
||||
*LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes.
|
||||
*If the cache is too small the map will be allocated only while it's required for the drawing.
|
||||
*0 mean no caching.*/
|
||||
#define LV_GRAD_CACHE_DEF_SIZE (4 * 1024)
|
||||
|
||||
/*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display)
|
||||
*LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface
|
||||
*The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */
|
||||
#define LV_DITHER_GRADIENT 1
|
||||
#if LV_DITHER_GRADIENT
|
||||
/*Add support for error diffusion dithering.
|
||||
*Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing.
|
||||
*The increase in memory consumption is (24 bits * object's width)*/
|
||||
#define LV_DITHER_ERROR_DIFFUSION 0
|
||||
#endif
|
||||
|
||||
/*Maximum buffer size to allocate for rotation.
|
||||
*Only used if software rotation is enabled in the display driver.*/
|
||||
#define LV_DISP_ROT_MAX_BUF (10*1024)
|
||||
|
||||
/*-------------
|
||||
* GPU
|
||||
*-----------*/
|
||||
|
||||
/*Use Arm's 2D acceleration library Arm-2D */
|
||||
#define LV_USE_GPU_ARM2D 0
|
||||
|
||||
/*Use STM32's DMA2D (aka Chrom Art) GPU*/
|
||||
#define LV_USE_GPU_STM32_DMA2D 0
|
||||
#if LV_USE_GPU_STM32_DMA2D
|
||||
/*Must be defined to include path of CMSIS header of target processor
|
||||
e.g. "stm32f7xx.h" or "stm32f4xx.h"*/
|
||||
#define LV_GPU_DMA2D_CMSIS_INCLUDE
|
||||
#endif
|
||||
|
||||
/*Enable RA6M3 G2D GPU*/
|
||||
#define LV_USE_GPU_RA6M3_G2D 0
|
||||
#if LV_USE_GPU_RA6M3_G2D
|
||||
/*include path of target processor
|
||||
e.g. "hal_data.h"*/
|
||||
#define LV_GPU_RA6M3_G2D_INCLUDE "hal_data.h"
|
||||
#endif
|
||||
|
||||
/*Use SWM341's DMA2D GPU*/
|
||||
#define LV_USE_GPU_SWM341_DMA2D 0
|
||||
#if LV_USE_GPU_SWM341_DMA2D
|
||||
#define LV_GPU_SWM341_DMA2D_INCLUDE "SWM341.h"
|
||||
#endif
|
||||
|
||||
/*Use NXP's PXP GPU iMX RTxxx platforms*/
|
||||
#define LV_USE_GPU_NXP_PXP 0
|
||||
#if LV_USE_GPU_NXP_PXP
|
||||
/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
|
||||
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS
|
||||
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
|
||||
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
|
||||
*/
|
||||
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
|
||||
#endif
|
||||
|
||||
/*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
|
||||
#define LV_USE_GPU_NXP_VG_LITE 0
|
||||
|
||||
/*Use SDL renderer API*/
|
||||
#define LV_USE_GPU_SDL 0
|
||||
#if LV_USE_GPU_SDL
|
||||
#define LV_GPU_SDL_INCLUDE_PATH <SDL2/SDL.h>
|
||||
/*Texture cache size, 8MB by default*/
|
||||
#define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8)
|
||||
/*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/
|
||||
#define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6))
|
||||
#endif
|
||||
|
||||
/*-------------
|
||||
* Logging
|
||||
*-----------*/
|
||||
|
||||
/*Enable the log module*/
|
||||
#define LV_USE_LOG 0
|
||||
#if LV_USE_LOG
|
||||
|
||||
/*How important log should be added:
|
||||
*LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
|
||||
*LV_LOG_LEVEL_INFO Log important events
|
||||
*LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
|
||||
*LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
|
||||
*LV_LOG_LEVEL_USER Only logs added by the user
|
||||
*LV_LOG_LEVEL_NONE Do not log anything*/
|
||||
#define LV_LOG_LEVEL LV_LOG_LEVEL_NONE
|
||||
|
||||
/*1: Print the log with 'printf';
|
||||
*0: User need to register a callback with `lv_log_register_print_cb()`*/
|
||||
#define LV_LOG_PRINTF 0
|
||||
|
||||
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
|
||||
#define LV_LOG_TRACE_MEM 1
|
||||
#define LV_LOG_TRACE_TIMER 1
|
||||
#define LV_LOG_TRACE_INDEV 1
|
||||
#define LV_LOG_TRACE_DISP_REFR 1
|
||||
#define LV_LOG_TRACE_EVENT 1
|
||||
#define LV_LOG_TRACE_OBJ_CREATE 1
|
||||
#define LV_LOG_TRACE_LAYOUT 1
|
||||
#define LV_LOG_TRACE_ANIM 1
|
||||
|
||||
#endif /*LV_USE_LOG*/
|
||||
|
||||
/*-------------
|
||||
* Asserts
|
||||
*-----------*/
|
||||
|
||||
/*Enable asserts if an operation is failed or an invalid data is found.
|
||||
*If LV_USE_LOG is enabled an error message will be printed on failure*/
|
||||
#define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/
|
||||
#define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
|
||||
#define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized. (Very fast, recommended)*/
|
||||
#define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
|
||||
#define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/
|
||||
|
||||
/*Add a custom handler when assert happens e.g. to restart the MCU*/
|
||||
#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
|
||||
#define LV_ASSERT_HANDLER while(1); /*Halt by default*/
|
||||
|
||||
/*-------------
|
||||
* Others
|
||||
*-----------*/
|
||||
|
||||
/*1: Show CPU usage and FPS count*/
|
||||
#define LV_USE_PERF_MONITOR 1
|
||||
#if LV_USE_PERF_MONITOR
|
||||
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
|
||||
#endif
|
||||
|
||||
/*1: Show the used memory and the memory fragmentation
|
||||
* Requires LV_MEM_CUSTOM = 0*/
|
||||
#define LV_USE_MEM_MONITOR 1
|
||||
#if LV_USE_MEM_MONITOR
|
||||
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
|
||||
#endif
|
||||
|
||||
/*1: Draw random colored rectangles over the redrawn areas*/
|
||||
#define LV_USE_REFR_DEBUG 0
|
||||
|
||||
/*Change the built in (v)snprintf functions*/
|
||||
#define LV_SPRINTF_CUSTOM 0
|
||||
#if LV_SPRINTF_CUSTOM
|
||||
#define LV_SPRINTF_INCLUDE <stdio.h>
|
||||
#define lv_snprintf snprintf
|
||||
#define lv_vsnprintf vsnprintf
|
||||
#else /*LV_SPRINTF_CUSTOM*/
|
||||
#define LV_SPRINTF_USE_FLOAT 1
|
||||
#endif /*LV_SPRINTF_CUSTOM*/
|
||||
|
||||
#define LV_USE_USER_DATA 1
|
||||
|
||||
/*Garbage Collector settings
|
||||
*Used if lvgl is bound to higher level language and the memory is managed by that language*/
|
||||
#define LV_ENABLE_GC 0
|
||||
#if LV_ENABLE_GC != 0
|
||||
#define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
|
||||
#endif /*LV_ENABLE_GC*/
|
||||
|
||||
/*=====================
|
||||
* COMPILER SETTINGS
|
||||
*====================*/
|
||||
|
||||
/*For big endian systems set to 1*/
|
||||
#define LV_BIG_ENDIAN_SYSTEM 0
|
||||
|
||||
/*Define a custom attribute to `lv_tick_inc` function*/
|
||||
#define LV_ATTRIBUTE_TICK_INC
|
||||
|
||||
/*Define a custom attribute to `lv_timer_handler` function*/
|
||||
#define LV_ATTRIBUTE_TIMER_HANDLER
|
||||
|
||||
/*Define a custom attribute to `lv_disp_flush_ready` function*/
|
||||
#define LV_ATTRIBUTE_FLUSH_READY
|
||||
|
||||
/*Required alignment size for buffers*/
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
|
||||
|
||||
/*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default).
|
||||
* E.g. __attribute__((aligned(4)))*/
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
|
||||
/*Attribute to mark large constant arrays for example font's bitmaps*/
|
||||
#define LV_ATTRIBUTE_LARGE_CONST DRAM_ATTR
|
||||
|
||||
/*Compiler prefix for a big array declaration in RAM*/
|
||||
#define LV_ATTRIBUTE_LARGE_RAM_ARRAY EXT_RAM_BSS_ATTR
|
||||
|
||||
/*Place performance critical functions into a faster memory (e.g RAM)*/
|
||||
#define LV_ATTRIBUTE_FAST_MEM IRAM_ATTR
|
||||
|
||||
/*Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible*/
|
||||
#define LV_ATTRIBUTE_DMA
|
||||
|
||||
/*Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
|
||||
*should also appear on LVGL binding API such as Micropython.*/
|
||||
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/
|
||||
|
||||
/*Extend the default -32k..32k coordinate range to -4M..4M by using int32_t for coordinates instead of int16_t*/
|
||||
#define LV_USE_LARGE_COORD 0
|
||||
|
||||
/*==================
|
||||
* FONT USAGE
|
||||
*===================*/
|
||||
|
||||
/*Montserrat fonts with ASCII range and some symbols using bpp = 4
|
||||
*https://fonts.google.com/specimen/Montserrat*/
|
||||
#define LV_FONT_MONTSERRAT_8 0
|
||||
#define LV_FONT_MONTSERRAT_10 0
|
||||
#define LV_FONT_MONTSERRAT_12 0
|
||||
#define LV_FONT_MONTSERRAT_14 1
|
||||
#define LV_FONT_MONTSERRAT_16 0
|
||||
#define LV_FONT_MONTSERRAT_18 0
|
||||
#define LV_FONT_MONTSERRAT_20 0
|
||||
#define LV_FONT_MONTSERRAT_22 0
|
||||
#define LV_FONT_MONTSERRAT_24 1
|
||||
#define LV_FONT_MONTSERRAT_26 0
|
||||
#define LV_FONT_MONTSERRAT_28 0
|
||||
#define LV_FONT_MONTSERRAT_30 0
|
||||
#define LV_FONT_MONTSERRAT_32 0
|
||||
#define LV_FONT_MONTSERRAT_34 0
|
||||
#define LV_FONT_MONTSERRAT_36 0
|
||||
#define LV_FONT_MONTSERRAT_38 0
|
||||
#define LV_FONT_MONTSERRAT_40 0
|
||||
#define LV_FONT_MONTSERRAT_42 0
|
||||
#define LV_FONT_MONTSERRAT_44 0
|
||||
#define LV_FONT_MONTSERRAT_46 0
|
||||
#define LV_FONT_MONTSERRAT_48 0
|
||||
|
||||
/*Demonstrate special features*/
|
||||
#define LV_FONT_MONTSERRAT_12_SUBPX 0
|
||||
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
|
||||
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/
|
||||
#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
|
||||
|
||||
/*Pixel perfect monospace fonts*/
|
||||
#define LV_FONT_UNSCII_8 0
|
||||
#define LV_FONT_UNSCII_16 0
|
||||
|
||||
/*Optionally declare custom fonts here.
|
||||
*You can use these fonts as default font too and they will be available globally.
|
||||
*E.g. #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/
|
||||
#define LV_FONT_CUSTOM_DECLARE
|
||||
|
||||
/*Always set a default font*/
|
||||
#define LV_FONT_DEFAULT &lv_font_montserrat_14
|
||||
|
||||
/*Enable handling large font and/or fonts with a lot of characters.
|
||||
*The limit depends on the font size, font face and bpp.
|
||||
*Compiler error will be triggered if a font needs it.*/
|
||||
#define LV_FONT_FMT_TXT_LARGE 0
|
||||
|
||||
/*Enables/disables support for compressed fonts.*/
|
||||
#define LV_USE_FONT_COMPRESSED 0
|
||||
|
||||
/*Enable subpixel rendering*/
|
||||
#define LV_USE_FONT_SUBPX 0
|
||||
#if LV_USE_FONT_SUBPX
|
||||
/*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
|
||||
#define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/
|
||||
#endif
|
||||
|
||||
/*Enable drawing placeholders when glyph dsc is not found*/
|
||||
#define LV_USE_FONT_PLACEHOLDER 1
|
||||
|
||||
/*=================
|
||||
* TEXT SETTINGS
|
||||
*=================*/
|
||||
|
||||
/**
|
||||
* Select a character encoding for strings.
|
||||
* Your IDE or editor should have the same character encoding
|
||||
* - LV_TXT_ENC_UTF8
|
||||
* - LV_TXT_ENC_ASCII
|
||||
*/
|
||||
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
||||
|
||||
/*Can break (wrap) texts on these chars*/
|
||||
#define LV_TXT_BREAK_CHARS " ,.;:-_"
|
||||
|
||||
/*If a word is at least this long, will break wherever "prettiest"
|
||||
*To disable, set to a value <= 0*/
|
||||
#define LV_TXT_LINE_BREAK_LONG_LEN 0
|
||||
|
||||
/*Minimum number of characters in a long word to put on a line before a break.
|
||||
*Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
|
||||
#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
|
||||
|
||||
/*Minimum number of characters in a long word to put on a line after a break.
|
||||
*Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
|
||||
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
|
||||
|
||||
/*The control character to use for signalling text recoloring.*/
|
||||
#define LV_TXT_COLOR_CMD "#"
|
||||
|
||||
/*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts.
|
||||
*The direction will be processed according to the Unicode Bidirectional Algorithm:
|
||||
*https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
|
||||
#define LV_USE_BIDI 0
|
||||
#if LV_USE_BIDI
|
||||
/*Set the default direction. Supported values:
|
||||
*`LV_BASE_DIR_LTR` Left-to-Right
|
||||
*`LV_BASE_DIR_RTL` Right-to-Left
|
||||
*`LV_BASE_DIR_AUTO` detect texts base direction*/
|
||||
#define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
|
||||
#endif
|
||||
|
||||
/*Enable Arabic/Persian processing
|
||||
*In these languages characters should be replaced with an other form based on their position in the text*/
|
||||
#define LV_USE_ARABIC_PERSIAN_CHARS 0
|
||||
|
||||
/*==================
|
||||
* WIDGET USAGE
|
||||
*================*/
|
||||
|
||||
/*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/
|
||||
|
||||
#define LV_USE_ARC 1
|
||||
|
||||
#define LV_USE_BAR 1
|
||||
|
||||
#define LV_USE_BTN 1
|
||||
|
||||
#define LV_USE_BTNMATRIX 1
|
||||
|
||||
#define LV_USE_CANVAS 1
|
||||
|
||||
#define LV_USE_CHECKBOX 1
|
||||
|
||||
#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/
|
||||
|
||||
#define LV_USE_IMG 1 /*Requires: lv_label*/
|
||||
|
||||
#define LV_USE_LABEL 1
|
||||
#if LV_USE_LABEL
|
||||
#define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/
|
||||
#define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/
|
||||
#endif
|
||||
|
||||
#define LV_USE_LINE 1
|
||||
|
||||
#define LV_USE_ROLLER 1 /*Requires: lv_label*/
|
||||
#if LV_USE_ROLLER
|
||||
#define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/
|
||||
#endif
|
||||
|
||||
#define LV_USE_SLIDER 1 /*Requires: lv_bar*/
|
||||
|
||||
#define LV_USE_SWITCH 1
|
||||
|
||||
#define LV_USE_TEXTAREA 1 /*Requires: lv_label*/
|
||||
#if LV_USE_TEXTAREA != 0
|
||||
#define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
|
||||
#endif
|
||||
|
||||
#define LV_USE_TABLE 1
|
||||
|
||||
/*==================
|
||||
* EXTRA COMPONENTS
|
||||
*==================*/
|
||||
|
||||
/*-----------
|
||||
* Widgets
|
||||
*----------*/
|
||||
#define LV_USE_ANIMIMG 1
|
||||
|
||||
#define LV_USE_CALENDAR 1
|
||||
#if LV_USE_CALENDAR
|
||||
#define LV_CALENDAR_WEEK_STARTS_MONDAY 0
|
||||
#if LV_CALENDAR_WEEK_STARTS_MONDAY
|
||||
#define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}
|
||||
#else
|
||||
#define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}
|
||||
#endif
|
||||
|
||||
#define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
|
||||
#define LV_USE_CALENDAR_HEADER_ARROW 1
|
||||
#define LV_USE_CALENDAR_HEADER_DROPDOWN 1
|
||||
#endif /*LV_USE_CALENDAR*/
|
||||
|
||||
#define LV_USE_CHART 1
|
||||
|
||||
#define LV_USE_COLORWHEEL 1
|
||||
|
||||
#define LV_USE_IMGBTN 1
|
||||
|
||||
#define LV_USE_KEYBOARD 1
|
||||
|
||||
#define LV_USE_LED 1
|
||||
|
||||
#define LV_USE_LIST 1
|
||||
|
||||
#define LV_USE_MENU 1
|
||||
|
||||
#define LV_USE_METER 1
|
||||
|
||||
#define LV_USE_MSGBOX 1
|
||||
|
||||
#define LV_USE_SPAN 1
|
||||
#if LV_USE_SPAN
|
||||
/*A line text can contain maximum num of span descriptor */
|
||||
#define LV_SPAN_SNIPPET_STACK_SIZE 64
|
||||
#endif
|
||||
|
||||
#define LV_USE_SPINBOX 1
|
||||
|
||||
#define LV_USE_SPINNER 1
|
||||
|
||||
#define LV_USE_TABVIEW 1
|
||||
|
||||
#define LV_USE_TILEVIEW 1
|
||||
|
||||
#define LV_USE_WIN 1
|
||||
|
||||
/*-----------
|
||||
* Themes
|
||||
*----------*/
|
||||
|
||||
/*A simple, impressive and very complete theme*/
|
||||
#define LV_USE_THEME_DEFAULT 1
|
||||
#if LV_USE_THEME_DEFAULT
|
||||
|
||||
/*0: Light mode; 1: Dark mode*/
|
||||
#define LV_THEME_DEFAULT_DARK 0
|
||||
|
||||
/*1: Enable grow on press*/
|
||||
#define LV_THEME_DEFAULT_GROW 1
|
||||
|
||||
/*Default transition time in [ms]*/
|
||||
#define LV_THEME_DEFAULT_TRANSITION_TIME 80
|
||||
#endif /*LV_USE_THEME_DEFAULT*/
|
||||
|
||||
/*A very simple theme that is a good starting point for a custom theme*/
|
||||
#define LV_USE_THEME_BASIC 1
|
||||
|
||||
/*A theme designed for monochrome displays*/
|
||||
#define LV_USE_THEME_MONO 1
|
||||
|
||||
/*-----------
|
||||
* Layouts
|
||||
*----------*/
|
||||
|
||||
/*A layout similar to Flexbox in CSS.*/
|
||||
#define LV_USE_FLEX 1
|
||||
|
||||
/*A layout similar to Grid in CSS.*/
|
||||
#define LV_USE_GRID 1
|
||||
|
||||
/*---------------------
|
||||
* 3rd party libraries
|
||||
*--------------------*/
|
||||
|
||||
/*File system interfaces for common APIs */
|
||||
|
||||
/*API for fopen, fread, etc*/
|
||||
#define LV_USE_FS_STDIO 0
|
||||
#if LV_USE_FS_STDIO
|
||||
#define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
||||
#define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*API for open, read, etc*/
|
||||
#define LV_USE_FS_POSIX 0
|
||||
#if LV_USE_FS_POSIX
|
||||
#define LV_FS_POSIX_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_POSIX_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
||||
#define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*API for CreateFile, ReadFile, etc*/
|
||||
#define LV_USE_FS_WIN32 0
|
||||
#if LV_USE_FS_WIN32
|
||||
#define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_WIN32_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
||||
#define LV_FS_WIN32_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*API for FATFS (needs to be added separately). Uses f_open, f_read, etc*/
|
||||
#define LV_USE_FS_FATFS 0
|
||||
#if LV_USE_FS_FATFS
|
||||
#define LV_FS_FATFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_FATFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*API for LittleFS (library needs to be added separately). Uses lfs_file_open, lfs_file_read, etc*/
|
||||
#define LV_USE_FS_LITTLEFS 0
|
||||
#if LV_USE_FS_LITTLEFS
|
||||
#define LV_FS_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_LITTLEFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*PNG decoder library*/
|
||||
#define LV_USE_PNG 0
|
||||
|
||||
/*BMP decoder library*/
|
||||
#define LV_USE_BMP 0
|
||||
|
||||
/* JPG + split JPG decoder library.
|
||||
* Split JPG is a custom format optimized for embedded systems. */
|
||||
#define LV_USE_SJPG 0
|
||||
|
||||
/*GIF decoder library*/
|
||||
#define LV_USE_GIF 0
|
||||
|
||||
/*QR code library*/
|
||||
#define LV_USE_QRCODE 0
|
||||
|
||||
/*FreeType library*/
|
||||
#define LV_USE_FREETYPE 0
|
||||
#if LV_USE_FREETYPE
|
||||
/*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
|
||||
#define LV_FREETYPE_CACHE_SIZE (16 * 1024)
|
||||
#if LV_FREETYPE_CACHE_SIZE >= 0
|
||||
/* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */
|
||||
/* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */
|
||||
/* if font size >= 256, must be configured as image cache */
|
||||
#define LV_FREETYPE_SBIT_CACHE 0
|
||||
/* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
|
||||
/* (0:use system defaults) */
|
||||
#define LV_FREETYPE_CACHE_FT_FACES 0
|
||||
#define LV_FREETYPE_CACHE_FT_SIZES 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*Tiny TTF library*/
|
||||
#define LV_USE_TINY_TTF 0
|
||||
#if LV_USE_TINY_TTF
|
||||
/*Load TTF data from files*/
|
||||
#define LV_TINY_TTF_FILE_SUPPORT 0
|
||||
#endif
|
||||
|
||||
/*Rlottie library*/
|
||||
#define LV_USE_RLOTTIE 0
|
||||
|
||||
/*FFmpeg library for image decoding and playing videos
|
||||
*Supports all major image formats so do not enable other image decoder with it*/
|
||||
#define LV_USE_FFMPEG 0
|
||||
#if LV_USE_FFMPEG
|
||||
/*Dump input information to stderr*/
|
||||
#define LV_FFMPEG_DUMP_FORMAT 0
|
||||
#endif
|
||||
|
||||
/*-----------
|
||||
* Others
|
||||
*----------*/
|
||||
|
||||
/*1: Enable API to take snapshot for object*/
|
||||
#define LV_USE_SNAPSHOT 0
|
||||
|
||||
/*1: Enable Monkey test*/
|
||||
#define LV_USE_MONKEY 0
|
||||
|
||||
/*1: Enable grid navigation*/
|
||||
#define LV_USE_GRIDNAV 0
|
||||
|
||||
/*1: Enable lv_obj fragment*/
|
||||
#define LV_USE_FRAGMENT 0
|
||||
|
||||
/*1: Support using images as font in label or span widgets */
|
||||
#define LV_USE_IMGFONT 0
|
||||
|
||||
/*1: Enable a published subscriber based messaging system */
|
||||
#define LV_USE_MSG 0
|
||||
|
||||
/*1: Enable Pinyin input method*/
|
||||
/*Requires: lv_keyboard*/
|
||||
#define LV_USE_IME_PINYIN 0
|
||||
#if LV_USE_IME_PINYIN
|
||||
/*1: Use default thesaurus*/
|
||||
/*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/
|
||||
#define LV_IME_PINYIN_USE_DEFAULT_DICT 1
|
||||
/*Set the maximum number of candidate panels that can be displayed*/
|
||||
/*This needs to be adjusted according to the size of the screen*/
|
||||
#define LV_IME_PINYIN_CAND_TEXT_NUM 6
|
||||
|
||||
/*Use 9 key input(k9)*/
|
||||
#define LV_IME_PINYIN_USE_K9_MODE 1
|
||||
#if LV_IME_PINYIN_USE_K9_MODE == 1
|
||||
#define LV_IME_PINYIN_K9_CAND_TEXT_NUM 3
|
||||
#endif // LV_IME_PINYIN_USE_K9_MODE
|
||||
#endif
|
||||
|
||||
/*==================
|
||||
* EXAMPLES
|
||||
*==================*/
|
||||
|
||||
/*Enable the examples to be built with the library*/
|
||||
#define LV_BUILD_EXAMPLES 1
|
||||
|
||||
/*===================
|
||||
* DEMO USAGE
|
||||
====================*/
|
||||
|
||||
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
|
||||
#define LV_USE_DEMO_WIDGETS 1
|
||||
#if LV_USE_DEMO_WIDGETS
|
||||
#define LV_DEMO_WIDGETS_SLIDESHOW 0
|
||||
#endif
|
||||
|
||||
/*Demonstrate the usage of encoder and keyboard*/
|
||||
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 1
|
||||
|
||||
/*Benchmark your system*/
|
||||
#define LV_USE_DEMO_BENCHMARK 1
|
||||
#if LV_USE_DEMO_BENCHMARK
|
||||
/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/
|
||||
#define LV_DEMO_BENCHMARK_RGB565A8 1
|
||||
#endif
|
||||
|
||||
/*Stress test for LVGL*/
|
||||
#define LV_USE_DEMO_STRESS 0
|
||||
|
||||
/*Music player demo*/
|
||||
#define LV_USE_DEMO_MUSIC 0
|
||||
#if LV_USE_DEMO_MUSIC
|
||||
#define LV_DEMO_MUSIC_SQUARE 0
|
||||
#define LV_DEMO_MUSIC_LANDSCAPE 0
|
||||
#define LV_DEMO_MUSIC_ROUND 0
|
||||
#define LV_DEMO_MUSIC_LARGE 0
|
||||
#define LV_DEMO_MUSIC_AUTO_PLAY 0
|
||||
#endif
|
||||
|
||||
/*--END OF LV_CONF_H--*/
|
||||
|
||||
#endif /*LV_CONF_H*/
|
||||
|
||||
#endif /*End of "Content enable"*/
|
|
@ -0,0 +1,110 @@
|
|||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.5.0
|
||||
// LVGL version: 8.3.11
|
||||
// Project name: SquareLine_Project
|
||||
|
||||
#include "ui.h"
|
||||
#include "ui_helpers.h"
|
||||
|
||||
///////////////////// VARIABLES ////////////////////
|
||||
|
||||
|
||||
// SCREEN: ui_mainScreen
|
||||
void ui_mainScreen_screen_init(void);
|
||||
void ui_event_mainScreen(lv_event_t * e);
|
||||
lv_obj_t * ui_mainScreen;
|
||||
lv_obj_t * ui_rpmBar0;
|
||||
lv_obj_t * ui_rpmVal0;
|
||||
lv_obj_t * ui_rpmLabel1;
|
||||
lv_obj_t * ui_speedVal0;
|
||||
lv_obj_t * ui_speedLabel1;
|
||||
lv_obj_t * ui_afrBar0;
|
||||
lv_obj_t * ui_afrVal0;
|
||||
lv_obj_t * ui_cltBar0;
|
||||
lv_obj_t * ui_cltVal0;
|
||||
lv_obj_t * ui_iatBar0;
|
||||
lv_obj_t * ui_iatVal0;
|
||||
lv_obj_t * ui_vBattBar0;
|
||||
lv_obj_t * ui_vBattVal0;
|
||||
lv_obj_t * ui_mapBar0;
|
||||
lv_obj_t * ui_mapVal0;
|
||||
lv_obj_t * ui_oilPressBar0;
|
||||
lv_obj_t * ui_oilPressVal0;
|
||||
lv_obj_t * ui_fuelPressBar0;
|
||||
lv_obj_t * ui_fuelPressVal0;
|
||||
lv_obj_t * ui_fuelLevelBar0;
|
||||
lv_obj_t * ui_fuelLevelVal0;
|
||||
lv_obj_t * ui_Label1;
|
||||
lv_obj_t * ui_Label2;
|
||||
lv_obj_t * ui_Label3;
|
||||
lv_obj_t * ui_Label4;
|
||||
lv_obj_t * ui_Label5;
|
||||
lv_obj_t * ui_Label6;
|
||||
lv_obj_t * ui_Label7;
|
||||
lv_obj_t * ui_cltLabel1;
|
||||
lv_obj_t * ui_iatLabel1;
|
||||
lv_obj_t * ui_vBattLabel1;
|
||||
lv_obj_t * ui_oilPressLabel1;
|
||||
lv_obj_t * ui_fuelPressLabel1;
|
||||
lv_obj_t * ui_fuelLevelLabel1;
|
||||
lv_obj_t * ui_afrLabel1;
|
||||
lv_obj_t * ui_mapLabel1;
|
||||
lv_obj_t * ui_LabelClt40;
|
||||
lv_obj_t * ui_LabelClt80;
|
||||
lv_obj_t * ui_LabelClt120;
|
||||
lv_obj_t * ui_LabelIat0;
|
||||
lv_obj_t * ui_LabelIat40;
|
||||
lv_obj_t * ui_LabelIat80;
|
||||
lv_obj_t * ui_LabelVbatt16;
|
||||
lv_obj_t * ui_LabelVbatt10;
|
||||
lv_obj_t * ui_LabelVbatt13;
|
||||
lv_obj_t * ui_LabelAfr10;
|
||||
lv_obj_t * ui_LabelAfr15;
|
||||
lv_obj_t * ui_LabelAfr20;
|
||||
lv_obj_t * ui_LabelMap100;
|
||||
lv_obj_t * ui_LabelMap50;
|
||||
lv_obj_t * ui_LabelMap0;
|
||||
lv_obj_t * ui_LabelOil0;
|
||||
lv_obj_t * ui_LabelOil25;
|
||||
lv_obj_t * ui_LabelOil5;
|
||||
lv_obj_t * ui_LabelFuelP1;
|
||||
lv_obj_t * ui_LabelFuelP3;
|
||||
lv_obj_t * ui_LabelFuelP5;
|
||||
lv_obj_t * ui_LabelFuelLevelF;
|
||||
lv_obj_t * ui_LabelFuelLevelH;
|
||||
lv_obj_t * ui_LabelFuelLevelE;
|
||||
// CUSTOM VARIABLES
|
||||
|
||||
// EVENTS
|
||||
lv_obj_t * ui____initial_actions0;
|
||||
|
||||
// IMAGES AND IMAGE SETS
|
||||
|
||||
///////////////////// TEST LVGL SETTINGS ////////////////////
|
||||
#if LV_COLOR_DEPTH != 16
|
||||
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
|
||||
#endif
|
||||
#if LV_COLOR_16_SWAP !=0
|
||||
#error "LV_COLOR_16_SWAP should be 0 to match SquareLine Studio's settings"
|
||||
#endif
|
||||
|
||||
///////////////////// ANIMATIONS ////////////////////
|
||||
|
||||
///////////////////// FUNCTIONS ////////////////////
|
||||
void ui_event_mainScreen(lv_event_t * e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
///////////////////// SCREENS ////////////////////
|
||||
|
||||
void ui_init(void)
|
||||
{
|
||||
lv_disp_t * dispp = lv_disp_get_default();
|
||||
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
|
||||
false, LV_FONT_DEFAULT);
|
||||
lv_disp_set_theme(dispp, theme);
|
||||
ui_mainScreen_screen_init();
|
||||
ui____initial_actions0 = lv_obj_create(NULL);
|
||||
lv_disp_load_scr(ui_mainScreen);
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.5.0
|
||||
// LVGL version: 8.3.11
|
||||
// Project name: SquareLine_Project
|
||||
|
||||
#ifndef _SQUARELINE_PROJECT_UI_H
|
||||
#define _SQUARELINE_PROJECT_UI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#include "lvgl.h"
|
||||
#elif __has_include("lvgl/lvgl.h")
|
||||
#include "lvgl/lvgl.h"
|
||||
#else
|
||||
#include "lvgl.h"
|
||||
#endif
|
||||
#else
|
||||
#include "lvgl.h"
|
||||
#endif
|
||||
|
||||
#include "ui_helpers.h"
|
||||
#include "ui_events.h"
|
||||
|
||||
// SCREEN: ui_mainScreen
|
||||
void ui_mainScreen_screen_init(void);
|
||||
void ui_event_mainScreen(lv_event_t * e);
|
||||
extern lv_obj_t * ui_mainScreen;
|
||||
extern lv_obj_t * ui_rpmBar0;
|
||||
extern lv_obj_t * ui_rpmVal0;
|
||||
extern lv_obj_t * ui_rpmLabel1;
|
||||
extern lv_obj_t * ui_speedVal0;
|
||||
extern lv_obj_t * ui_speedLabel1;
|
||||
extern lv_obj_t * ui_afrBar0;
|
||||
extern lv_obj_t * ui_afrVal0;
|
||||
extern lv_obj_t * ui_cltBar0;
|
||||
extern lv_obj_t * ui_cltVal0;
|
||||
extern lv_obj_t * ui_iatBar0;
|
||||
extern lv_obj_t * ui_iatVal0;
|
||||
extern lv_obj_t * ui_vBattBar0;
|
||||
extern lv_obj_t * ui_vBattVal0;
|
||||
extern lv_obj_t * ui_mapBar0;
|
||||
extern lv_obj_t * ui_mapVal0;
|
||||
extern lv_obj_t * ui_oilPressBar0;
|
||||
extern lv_obj_t * ui_oilPressVal0;
|
||||
extern lv_obj_t * ui_fuelPressBar0;
|
||||
extern lv_obj_t * ui_fuelPressVal0;
|
||||
extern lv_obj_t * ui_fuelLevelBar0;
|
||||
extern lv_obj_t * ui_fuelLevelVal0;
|
||||
extern lv_obj_t * ui_Label1;
|
||||
extern lv_obj_t * ui_Label2;
|
||||
extern lv_obj_t * ui_Label3;
|
||||
extern lv_obj_t * ui_Label4;
|
||||
extern lv_obj_t * ui_Label5;
|
||||
extern lv_obj_t * ui_Label6;
|
||||
extern lv_obj_t * ui_Label7;
|
||||
extern lv_obj_t * ui_cltLabel1;
|
||||
extern lv_obj_t * ui_iatLabel1;
|
||||
extern lv_obj_t * ui_vBattLabel1;
|
||||
extern lv_obj_t * ui_oilPressLabel1;
|
||||
extern lv_obj_t * ui_fuelPressLabel1;
|
||||
extern lv_obj_t * ui_fuelLevelLabel1;
|
||||
extern lv_obj_t * ui_afrLabel1;
|
||||
extern lv_obj_t * ui_mapLabel1;
|
||||
extern lv_obj_t * ui_LabelClt40;
|
||||
extern lv_obj_t * ui_LabelClt80;
|
||||
extern lv_obj_t * ui_LabelClt120;
|
||||
extern lv_obj_t * ui_LabelIat0;
|
||||
extern lv_obj_t * ui_LabelIat40;
|
||||
extern lv_obj_t * ui_LabelIat80;
|
||||
extern lv_obj_t * ui_LabelVbatt16;
|
||||
extern lv_obj_t * ui_LabelVbatt10;
|
||||
extern lv_obj_t * ui_LabelVbatt13;
|
||||
extern lv_obj_t * ui_LabelAfr10;
|
||||
extern lv_obj_t * ui_LabelAfr15;
|
||||
extern lv_obj_t * ui_LabelAfr20;
|
||||
extern lv_obj_t * ui_LabelMap100;
|
||||
extern lv_obj_t * ui_LabelMap50;
|
||||
extern lv_obj_t * ui_LabelMap0;
|
||||
extern lv_obj_t * ui_LabelOil0;
|
||||
extern lv_obj_t * ui_LabelOil25;
|
||||
extern lv_obj_t * ui_LabelOil5;
|
||||
extern lv_obj_t * ui_LabelFuelP1;
|
||||
extern lv_obj_t * ui_LabelFuelP3;
|
||||
extern lv_obj_t * ui_LabelFuelP5;
|
||||
extern lv_obj_t * ui_LabelFuelLevelF;
|
||||
extern lv_obj_t * ui_LabelFuelLevelH;
|
||||
extern lv_obj_t * ui_LabelFuelLevelE;
|
||||
// CUSTOM VARIABLES
|
||||
|
||||
// EVENTS
|
||||
|
||||
extern lv_obj_t * ui____initial_actions0;
|
||||
|
||||
// FONTS
|
||||
LV_FONT_DECLARE(ui_font_FontIndicator);
|
||||
LV_FONT_DECLARE(ui_font_FontIndicatorLabel);
|
||||
LV_FONT_DECLARE(ui_font_FontLabel);
|
||||
LV_FONT_DECLARE(ui_font_FontRPM);
|
||||
LV_FONT_DECLARE(ui_font_FontSpeed);
|
||||
|
||||
// UI INIT
|
||||
void ui_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,5 @@
|
|||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.5.0
|
||||
// LVGL version: 8.3.11
|
||||
// Project name: SquareLine_Project
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.5.0
|
||||
// LVGL version: 8.3.11
|
||||
// Project name: SquareLine_Project
|
||||
|
||||
#ifndef _UI_EVENTS_H
|
||||
#define _UI_EVENTS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,228 @@
|
|||
/*******************************************************************************
|
||||
* Size: 18 px
|
||||
* Bpp: 1
|
||||
* Opts: --bpp 1 --size 18 --font D:/Users/Desktop/rusefi_dash_5 -lite/assets/Fussion-3zgAz.ttf -o D:/Users/Desktop/rusefi_dash_5 -lite/assets\ui_font_FontIndicator.c --format lvgl --symbols -.0123456789 --no-compress --no-prefilter
|
||||
******************************************************************************/
|
||||
|
||||
#include "ui.h"
|
||||
|
||||
#ifndef UI_FONT_FONTINDICATOR
|
||||
#define UI_FONT_FONTINDICATOR 1
|
||||
#endif
|
||||
|
||||
#if UI_FONT_FONTINDICATOR
|
||||
|
||||
/*-----------------
|
||||
* BITMAPS
|
||||
*----------------*/
|
||||
|
||||
/*Store the image of the glyphs*/
|
||||
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
|
||||
/* U+002D "-" */
|
||||
0xff, 0xff, 0xf0,
|
||||
|
||||
/* U+002E "." */
|
||||
0xff,
|
||||
|
||||
/* U+0030 "0" */
|
||||
0x1f, 0xff, 0x1f, 0xff, 0xde, 0x1, 0xfe, 0x0,
|
||||
0xff, 0x0, 0x7f, 0x80, 0x3f, 0xc0, 0x1f, 0xe0,
|
||||
0xf, 0xf0, 0x7, 0xf8, 0x7, 0xff, 0xff, 0xcf,
|
||||
0xff, 0xc0,
|
||||
|
||||
/* U+0031 "1" */
|
||||
0xfd, 0xfc, 0x78, 0xf1, 0xe3, 0xc7, 0x8f, 0x1e,
|
||||
0x3c, 0x78, 0xf0,
|
||||
|
||||
/* U+0032 "2" */
|
||||
0x7f, 0xfe, 0x3f, 0xff, 0x80, 0x3, 0xe0, 0x0,
|
||||
0xf0, 0x0, 0x79, 0xff, 0xfd, 0xff, 0xfd, 0xf0,
|
||||
0x0, 0xf0, 0x0, 0x78, 0x0, 0x3f, 0xff, 0xdf,
|
||||
0xff, 0xe0,
|
||||
|
||||
/* U+0033 "3" */
|
||||
0xff, 0xfc, 0xff, 0xfe, 0x0, 0x1f, 0x0, 0xf,
|
||||
0x0, 0xf, 0x7f, 0xfe, 0x7f, 0xfe, 0x0, 0xf,
|
||||
0x0, 0xf, 0x0, 0x1f, 0xff, 0xfe, 0xff, 0xfc,
|
||||
|
||||
/* U+0034 "4" */
|
||||
0x7, 0xff, 0x87, 0xff, 0xc7, 0x81, 0xe7, 0x80,
|
||||
0xf7, 0x80, 0x7f, 0x80, 0x3f, 0xc0, 0x1f, 0xff,
|
||||
0xff, 0xff, 0xff, 0x80, 0x3, 0xc0, 0x1, 0xe0,
|
||||
0x0, 0xf0,
|
||||
|
||||
/* U+0035 "5" */
|
||||
0x7f, 0xff, 0x7f, 0xff, 0xbc, 0x0, 0x1e, 0x0,
|
||||
0xf, 0x0, 0x7, 0xff, 0xfd, 0xff, 0xfe, 0x0,
|
||||
0xf, 0x0, 0x7, 0x80, 0x7, 0xdf, 0xff, 0xcf,
|
||||
0xff, 0xc0,
|
||||
|
||||
/* U+0036 "6" */
|
||||
0x1f, 0xff, 0x1f, 0xff, 0x9e, 0x0, 0x1e, 0x0,
|
||||
0xf, 0x0, 0x7, 0xff, 0xff, 0xff, 0xff, 0xe0,
|
||||
0xf, 0xf0, 0x7, 0xf8, 0x7, 0xff, 0xff, 0xcf,
|
||||
0xff, 0xc0,
|
||||
|
||||
/* U+0037 "7" */
|
||||
0xff, 0xff, 0xff, 0xfc, 0x0, 0x78, 0x0, 0xf0,
|
||||
0x3, 0xe0, 0xf, 0x80, 0x3e, 0x0, 0xf8, 0x3,
|
||||
0xe0, 0xf, 0x80, 0x3e, 0x0, 0xf8, 0x0,
|
||||
|
||||
/* U+0038 "8" */
|
||||
0x3f, 0xfe, 0x3f, 0xff, 0xbe, 0x3, 0xfe, 0x0,
|
||||
0xff, 0x0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xe0,
|
||||
0xf, 0xf0, 0x7, 0xfc, 0x7, 0xdf, 0xff, 0xc7,
|
||||
0xff, 0xc0,
|
||||
|
||||
/* U+0039 "9" */
|
||||
0x3f, 0xfe, 0x3f, 0xff, 0xbe, 0x3, 0xfe, 0x0,
|
||||
0xff, 0x0, 0x7f, 0xff, 0xfd, 0xff, 0xfe, 0x0,
|
||||
0xf, 0x0, 0x7, 0x80, 0x7, 0xdf, 0xff, 0xcf,
|
||||
0xff, 0xc0
|
||||
};
|
||||
|
||||
|
||||
/*---------------------
|
||||
* GLYPH DESCRIPTION
|
||||
*--------------------*/
|
||||
|
||||
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
|
||||
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
|
||||
{.bitmap_index = 0, .adv_w = 191, .box_w = 10, .box_h = 2, .ofs_x = 1, .ofs_y = 5},
|
||||
{.bitmap_index = 3, .adv_w = 96, .box_w = 4, .box_h = 2, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 4, .adv_w = 296, .box_w = 17, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 30, .adv_w = 134, .box_w = 7, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 41, .adv_w = 296, .box_w = 17, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 67, .adv_w = 286, .box_w = 16, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 91, .adv_w = 295, .box_w = 17, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 117, .adv_w = 296, .box_w = 17, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 143, .adv_w = 296, .box_w = 17, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 169, .adv_w = 267, .box_w = 15, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 192, .adv_w = 305, .box_w = 17, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 218, .adv_w = 296, .box_w = 17, .box_h = 12, .ofs_x = 1, .ofs_y = 0}
|
||||
};
|
||||
|
||||
/*---------------------
|
||||
* CHARACTER MAPPING
|
||||
*--------------------*/
|
||||
|
||||
static const uint8_t glyph_id_ofs_list_0[] = {
|
||||
0, 1, 0, 2, 3, 4, 5, 6,
|
||||
7, 8, 9, 10, 11
|
||||
};
|
||||
|
||||
/*Collect the unicode lists and glyph_id offsets*/
|
||||
static const lv_font_fmt_txt_cmap_t cmaps[] =
|
||||
{
|
||||
{
|
||||
.range_start = 45, .range_length = 13, .glyph_id_start = 1,
|
||||
.unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_0, .list_length = 13, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL
|
||||
}
|
||||
};
|
||||
|
||||
/*-----------------
|
||||
* KERNING
|
||||
*----------------*/
|
||||
|
||||
|
||||
/*Map glyph_ids to kern left classes*/
|
||||
static const uint8_t kern_left_class_mapping[] =
|
||||
{
|
||||
0, 0, 0, 0, 1, 2, 3, 4,
|
||||
5, 6, 7, 3, 8
|
||||
};
|
||||
|
||||
/*Map glyph_ids to kern right classes*/
|
||||
static const uint8_t kern_right_class_mapping[] =
|
||||
{
|
||||
0, 0, 0, 1, 2, 3, 4, 5,
|
||||
6, 1, 7, 8, 9
|
||||
};
|
||||
|
||||
/*Kern values between classes*/
|
||||
static const int8_t kern_class_values[] =
|
||||
{
|
||||
-1, 0, -3, -5, -5, -3, -11, -3,
|
||||
-3, -6, -13, 0, -11, -11, -5, -15,
|
||||
-9, -5, -3, -13, -6, 0, -8, -5,
|
||||
-15, -5, -6, -1, -10, -3, -5, 0,
|
||||
-3, -11, -3, -3, -4, -13, -6, -11,
|
||||
-7, 0, -15, -5, -11, -4, -13, -6,
|
||||
-11, -7, -10, -15, -5, -11, -10, -11,
|
||||
-13, -11, -14, -6, 0, -12, -8, -2,
|
||||
-13, -6, -11, -6, -4, -14, -4, 0
|
||||
};
|
||||
|
||||
|
||||
/*Collect the kern class' data in one place*/
|
||||
static const lv_font_fmt_txt_kern_classes_t kern_classes =
|
||||
{
|
||||
.class_pair_values = kern_class_values,
|
||||
.left_class_mapping = kern_left_class_mapping,
|
||||
.right_class_mapping = kern_right_class_mapping,
|
||||
.left_class_cnt = 8,
|
||||
.right_class_cnt = 9,
|
||||
};
|
||||
|
||||
/*--------------------
|
||||
* ALL CUSTOM DATA
|
||||
*--------------------*/
|
||||
|
||||
#if LVGL_VERSION_MAJOR == 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
#endif
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#endif
|
||||
.glyph_bitmap = glyph_bitmap,
|
||||
.glyph_dsc = glyph_dsc,
|
||||
.cmaps = cmaps,
|
||||
.kern_dsc = &kern_classes,
|
||||
.kern_scale = 16,
|
||||
.cmap_num = 1,
|
||||
.bpp = 1,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR == 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*-----------------
|
||||
* PUBLIC FONT
|
||||
*----------------*/
|
||||
|
||||
/*Initialize a public general font descriptor*/
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
const lv_font_t ui_font_FontIndicator = {
|
||||
#else
|
||||
lv_font_t ui_font_FontIndicator = {
|
||||
#endif
|
||||
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
|
||||
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
|
||||
.line_height = 12, /*The maximum line height required by the font*/
|
||||
.base_line = 0, /*Baseline measured from the bottom of the line*/
|
||||
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
|
||||
.subpx = LV_FONT_SUBPX_NONE,
|
||||
#endif
|
||||
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
|
||||
.underline_position = 0,
|
||||
.underline_thickness = 0,
|
||||
#endif
|
||||
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
|
||||
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
|
||||
.fallback = NULL,
|
||||
#endif
|
||||
.user_data = NULL,
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /*#if UI_FONT_FONTINDICATOR*/
|
||||
|
|
@ -0,0 +1,321 @@
|
|||
/*******************************************************************************
|
||||
* Size: 10 px
|
||||
* Bpp: 8
|
||||
* Opts: --bpp 8 --size 10 --font D:/Users/Desktop/rusefi_dash5-minimal/assets/Fussion-3zgAz.ttf -o D:/Users/Desktop/rusefi_dash5-minimal/assets\ui_font_FontIndicatorLabel.c --format lvgl --symbols 0123456789efh-. --no-compress --no-prefilter
|
||||
******************************************************************************/
|
||||
|
||||
#include "ui.h"
|
||||
|
||||
#ifndef UI_FONT_FONTINDICATORLABEL
|
||||
#define UI_FONT_FONTINDICATORLABEL 1
|
||||
#endif
|
||||
|
||||
#if UI_FONT_FONTINDICATORLABEL
|
||||
|
||||
/*-----------------
|
||||
* BITMAPS
|
||||
*----------------*/
|
||||
|
||||
/*Store the image of the glyphs*/
|
||||
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
|
||||
/* U+002D "-" */
|
||||
0x77, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x1d, 0xd,
|
||||
0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x2,
|
||||
|
||||
/* U+002E "." */
|
||||
0x31, 0x64, 0x52, 0x7f, 0xff, 0xd3,
|
||||
|
||||
/* U+0030 "0" */
|
||||
0x0, 0x1a, 0xdc, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0x8b, 0x14, 0xd5, 0xff, 0x69, 0xc, 0xc,
|
||||
0xc, 0xa2, 0xff, 0xc8, 0x7a, 0xff, 0xd2, 0x0,
|
||||
0x0, 0x0, 0x0, 0x8c, 0xff, 0xc8, 0x7d, 0xff,
|
||||
0xd0, 0x0, 0x0, 0x0, 0x0, 0x8c, 0xff, 0xc8,
|
||||
0x80, 0xff, 0xd0, 0x0, 0x0, 0x0, 0x0, 0x8c,
|
||||
0xff, 0xc8, 0x80, 0xff, 0xdf, 0xf, 0xc, 0xc,
|
||||
0x11, 0xc5, 0xff, 0xb3, 0x47, 0xfb, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xd7, 0x15,
|
||||
|
||||
/* U+0031 "1" */
|
||||
0x7f, 0xff, 0xff, 0xd9, 0xc, 0x5, 0x46, 0xff,
|
||||
0xff, 0x24, 0x0, 0x2c, 0xff, 0xff, 0x24, 0x0,
|
||||
0x2d, 0xff, 0xff, 0x24, 0x0, 0x30, 0xff, 0xff,
|
||||
0x24, 0x0, 0x30, 0xff, 0xff, 0x24, 0x0, 0x2f,
|
||||
0xff, 0xff, 0x23,
|
||||
|
||||
/* U+0032 "2" */
|
||||
0x2b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xd0, 0xf, 0x1, 0xc, 0xc, 0xc, 0xc, 0xc,
|
||||
0x14, 0xcd, 0xff, 0xaa, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x96, 0xff, 0xc4, 0x0, 0x91,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xfd, 0xff, 0x99,
|
||||
0x66, 0xff, 0xf2, 0x3d, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x4, 0x80, 0xff, 0xd2, 0xc, 0xc, 0xc,
|
||||
0xc, 0xc, 0xc, 0x5, 0x71, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x6f,
|
||||
|
||||
/* U+0033 "3" */
|
||||
0x7b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x8e, 0x0, 0x5, 0xc, 0xc, 0xc, 0xc, 0xc,
|
||||
0x36, 0xf7, 0xff, 0x56, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0xe0, 0xff, 0x6d, 0x0, 0xc6,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xfe, 0xf2, 0x13,
|
||||
0x0, 0x19, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe4,
|
||||
0xff, 0x66, 0x5, 0xc, 0xc, 0xc, 0xc, 0xc,
|
||||
0x30, 0xf4, 0xff, 0x5e, 0x7f, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0x96, 0x0,
|
||||
|
||||
/* U+0034 "4" */
|
||||
0x0, 0x0, 0x22, 0xe3, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xaf, 0x0, 0x1f, 0xe1, 0xfc, 0x5c, 0xc,
|
||||
0xc, 0x95, 0xff, 0xc0, 0x1a, 0xdd, 0xfd, 0x5c,
|
||||
0x0, 0x0, 0x0, 0x90, 0xff, 0xc0, 0x7f, 0xff,
|
||||
0xcc, 0x0, 0x0, 0x0, 0x0, 0x90, 0xff, 0xc0,
|
||||
0x78, 0xff, 0xfc, 0xec, 0xec, 0xec, 0xec, 0xf7,
|
||||
0xff, 0xc0, 0x5, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
|
||||
0x1c, 0x9c, 0xff, 0xc0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x8f, 0xff, 0xae,
|
||||
|
||||
/* U+0035 "5" */
|
||||
0x46, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0x6f, 0x80, 0xff, 0xdf, 0xf, 0xc, 0xc,
|
||||
0xc, 0xc, 0xc, 0x4, 0x80, 0xff, 0xd9, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x56, 0xff,
|
||||
0xff, 0xf1, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xa8,
|
||||
0x0, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x9b,
|
||||
0xff, 0xc4, 0x2, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x15, 0xc5, 0xff, 0xb1, 0x2b, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xd5, 0x14,
|
||||
|
||||
/* U+0036 "6" */
|
||||
0x0, 0x1b, 0xde, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0x6f, 0x11, 0xd5, 0xff, 0x6c, 0xc, 0xc,
|
||||
0xc, 0xc, 0xc, 0x4, 0x7c, 0xff, 0xd3, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0xff,
|
||||
0xfd, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xa8,
|
||||
0x80, 0xff, 0xd6, 0x20, 0x20, 0x20, 0x20, 0x9d,
|
||||
0xff, 0xc4, 0x80, 0xff, 0xde, 0xf, 0xc, 0xc,
|
||||
0x12, 0xc5, 0xff, 0xb0, 0x49, 0xfc, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xd5, 0x14,
|
||||
|
||||
/* U+0037 "7" */
|
||||
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xb5, 0x5, 0xc, 0xc, 0xc, 0xc, 0xc, 0x92,
|
||||
0xff, 0xc4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15,
|
||||
0xd9, 0xff, 0xb2, 0x0, 0x0, 0x0, 0x0, 0xf,
|
||||
0xce, 0xff, 0xd8, 0x16, 0x0, 0x0, 0x0, 0x9,
|
||||
0xc2, 0xff, 0xe0, 0x1d, 0x0, 0x0, 0x0, 0x5,
|
||||
0xb5, 0xff, 0xe7, 0x24, 0x0, 0x0, 0x0, 0x0,
|
||||
0xa7, 0xff, 0xec, 0x2c, 0x0, 0x0, 0x0,
|
||||
|
||||
/* U+0038 "8" */
|
||||
0x0, 0x7d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xea, 0x27, 0x0, 0x42, 0xff, 0xfe, 0x47, 0xc,
|
||||
0xc, 0xd, 0xaa, 0xff, 0xd6, 0x0, 0x58, 0xff,
|
||||
0xfa, 0x9, 0x0, 0x0, 0x0, 0x6e, 0xff, 0xec,
|
||||
0x0, 0x39, 0xff, 0xff, 0xf4, 0xf0, 0xf0, 0xf0,
|
||||
0xfb, 0xff, 0xcf, 0x0, 0x7d, 0xff, 0xe1, 0x23,
|
||||
0x20, 0x20, 0x20, 0x63, 0xff, 0xff, 0x16, 0x71,
|
||||
0xff, 0xed, 0x28, 0xc, 0xc, 0xc, 0x7d, 0xff,
|
||||
0xf6, 0xf, 0x4, 0xaa, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xf7, 0x44, 0x0,
|
||||
|
||||
/* U+0039 "9" */
|
||||
0x1, 0xa1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xd5, 0x14, 0x6a, 0xff, 0xf0, 0x29, 0x8, 0x8,
|
||||
0xe, 0xc8, 0xff, 0xb0, 0x80, 0xff, 0xd9, 0x0,
|
||||
0x0, 0x0, 0x0, 0x8c, 0xff, 0xc4, 0x56, 0xff,
|
||||
0xff, 0xf1, 0xf0, 0xf0, 0xf0, 0xf9, 0xff, 0xc4,
|
||||
0x0, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x9b,
|
||||
0xff, 0xc4, 0x2, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x15, 0xc5, 0xff, 0xb0, 0x2b, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xd5, 0x14,
|
||||
|
||||
/* U+0065 "e" */
|
||||
0x0, 0x21, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0x8b, 0x20, 0xe2, 0xfc, 0x5e, 0xc, 0xc,
|
||||
0xc, 0xa1, 0xff, 0xc4, 0x7f, 0xff, 0xd0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x93, 0xff, 0xc4, 0x80, 0xff,
|
||||
0xfc, 0xec, 0xec, 0xec, 0xec, 0xfd, 0xff, 0x9c,
|
||||
0x80, 0xff, 0xd5, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
|
||||
0x1c, 0x4, 0x80, 0xff, 0xe2, 0x10, 0xc, 0xc,
|
||||
0xc, 0xc, 0xc, 0x0, 0x47, 0xfc, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x17,
|
||||
|
||||
/* U+0066 "f" */
|
||||
0x0, 0x1f, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0x1b, 0x1f, 0xe0, 0xfb, 0x5f, 0xc, 0xc,
|
||||
0xc, 0xc, 0xc, 0x0, 0x7b, 0xff, 0xd0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xff,
|
||||
0xfc, 0xec, 0xec, 0xec, 0xec, 0xec, 0x66, 0x0,
|
||||
0x7f, 0xff, 0xd5, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c,
|
||||
0xb, 0x0, 0x80, 0xff, 0xd0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x70, 0xff, 0xcf, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
|
||||
/* U+0068 "h" */
|
||||
0x6e, 0xff, 0xcf, 0x0, 0x0, 0x0, 0x0, 0x8b,
|
||||
0xff, 0xb3, 0x80, 0xff, 0xd0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x8c, 0xff, 0xc4, 0x80, 0xff, 0xd0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x8c, 0xff, 0xc4, 0x80, 0xff,
|
||||
0xfc, 0xec, 0xec, 0xec, 0xec, 0xf7, 0xff, 0xc4,
|
||||
0x80, 0xff, 0xd5, 0x1c, 0x1c, 0x1c, 0x1c, 0x99,
|
||||
0xff, 0xc4, 0x80, 0xff, 0xd0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x8c, 0xff, 0xc4, 0x70, 0xff, 0xcf, 0x0,
|
||||
0x0, 0x0, 0x0, 0x8b, 0xff, 0xb5
|
||||
};
|
||||
|
||||
|
||||
/*---------------------
|
||||
* GLYPH DESCRIPTION
|
||||
*--------------------*/
|
||||
|
||||
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
|
||||
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
|
||||
{.bitmap_index = 0, .adv_w = 106, .box_w = 7, .box_h = 2, .ofs_x = 0, .ofs_y = 2},
|
||||
{.bitmap_index = 14, .adv_w = 53, .box_w = 3, .box_h = 2, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 20, .adv_w = 164, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 90, .adv_w = 74, .box_w = 5, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 125, .adv_w = 164, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 195, .adv_w = 159, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 265, .adv_w = 164, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 335, .adv_w = 164, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 405, .adv_w = 164, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 475, .adv_w = 148, .box_w = 9, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 538, .adv_w = 169, .box_w = 11, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 615, .adv_w = 164, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 685, .adv_w = 164, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 755, .adv_w = 154, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 825, .adv_w = 164, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0}
|
||||
};
|
||||
|
||||
/*---------------------
|
||||
* CHARACTER MAPPING
|
||||
*--------------------*/
|
||||
|
||||
static const uint16_t unicode_list_0[] = {
|
||||
0x0, 0x1, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8,
|
||||
0x9, 0xa, 0xb, 0xc, 0x38, 0x39, 0x3b
|
||||
};
|
||||
|
||||
/*Collect the unicode lists and glyph_id offsets*/
|
||||
static const lv_font_fmt_txt_cmap_t cmaps[] =
|
||||
{
|
||||
{
|
||||
.range_start = 45, .range_length = 60, .glyph_id_start = 1,
|
||||
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 15, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
|
||||
}
|
||||
};
|
||||
|
||||
/*-----------------
|
||||
* KERNING
|
||||
*----------------*/
|
||||
|
||||
|
||||
/*Map glyph_ids to kern left classes*/
|
||||
static const uint8_t kern_left_class_mapping[] =
|
||||
{
|
||||
0, 0, 0, 0, 1, 2, 3, 4,
|
||||
5, 6, 7, 3, 8, 0, 9, 10
|
||||
};
|
||||
|
||||
/*Map glyph_ids to kern right classes*/
|
||||
static const uint8_t kern_right_class_mapping[] =
|
||||
{
|
||||
0, 0, 0, 1, 2, 3, 4, 5,
|
||||
6, 1, 7, 8, 9, 10, 11, 12
|
||||
};
|
||||
|
||||
/*Kern values between classes*/
|
||||
static const int8_t kern_class_values[] =
|
||||
{
|
||||
-1, 0, -2, -3, -3, -1, -6, -2,
|
||||
-2, 0, 0, 0, -3, -7, 0, -6,
|
||||
-6, -3, -8, -5, -3, 0, 0, 0,
|
||||
-2, -7, -3, 0, -4, -3, -8, -3,
|
||||
-3, 0, 0, 0, -1, -5, -2, -3,
|
||||
0, -1, -6, -2, -2, 0, 0, 0,
|
||||
-2, -7, -4, -6, -4, 0, -8, -3,
|
||||
-6, 0, 0, 0, -2, -7, -4, -6,
|
||||
-4, -6, -8, -3, -6, 0, 0, 0,
|
||||
-6, -6, -7, -6, -8, -3, 0, -6,
|
||||
-4, 0, 0, 0, -1, -7, -3, -6,
|
||||
-3, -2, -8, -2, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, -11, -11, -5, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, -1, 0, 0
|
||||
};
|
||||
|
||||
|
||||
/*Collect the kern class' data in one place*/
|
||||
static const lv_font_fmt_txt_kern_classes_t kern_classes =
|
||||
{
|
||||
.class_pair_values = kern_class_values,
|
||||
.left_class_mapping = kern_left_class_mapping,
|
||||
.right_class_mapping = kern_right_class_mapping,
|
||||
.left_class_cnt = 10,
|
||||
.right_class_cnt = 12,
|
||||
};
|
||||
|
||||
/*--------------------
|
||||
* ALL CUSTOM DATA
|
||||
*--------------------*/
|
||||
|
||||
#if LVGL_VERSION_MAJOR == 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
#endif
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#endif
|
||||
.glyph_bitmap = glyph_bitmap,
|
||||
.glyph_dsc = glyph_dsc,
|
||||
.cmaps = cmaps,
|
||||
.kern_dsc = &kern_classes,
|
||||
.kern_scale = 16,
|
||||
.cmap_num = 1,
|
||||
.bpp = 8,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR == 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*-----------------
|
||||
* PUBLIC FONT
|
||||
*----------------*/
|
||||
|
||||
/*Initialize a public general font descriptor*/
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
const lv_font_t ui_font_FontIndicatorLabel = {
|
||||
#else
|
||||
lv_font_t ui_font_FontIndicatorLabel = {
|
||||
#endif
|
||||
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
|
||||
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
|
||||
.line_height = 7, /*The maximum line height required by the font*/
|
||||
.base_line = 0, /*Baseline measured from the bottom of the line*/
|
||||
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
|
||||
.subpx = LV_FONT_SUBPX_NONE,
|
||||
#endif
|
||||
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
|
||||
.underline_position = 0,
|
||||
.underline_thickness = 0,
|
||||
#endif
|
||||
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
|
||||
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
|
||||
.fallback = NULL,
|
||||
#endif
|
||||
.user_data = NULL,
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /*#if UI_FONT_FONTINDICATORLABEL*/
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,260 @@
|
|||
/*******************************************************************************
|
||||
* Size: 26 px
|
||||
* Bpp: 2
|
||||
* Opts: --bpp 2 --size 26 --font D:/Users/Desktop/rusefi_dash_5 -lite/assets/SuperBrigade-xRoW0.otf -o D:/Users/Desktop/rusefi_dash_5 -lite/assets\ui_font_FontRPM.c --format lvgl --symbols 0123456789 --no-compress --no-prefilter
|
||||
******************************************************************************/
|
||||
|
||||
#include "ui.h"
|
||||
|
||||
#ifndef UI_FONT_FONTRPM
|
||||
#define UI_FONT_FONTRPM 1
|
||||
#endif
|
||||
|
||||
#if UI_FONT_FONTRPM
|
||||
|
||||
/*-----------------
|
||||
* BITMAPS
|
||||
*----------------*/
|
||||
|
||||
/*Store the image of the glyphs*/
|
||||
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
|
||||
/* U+0030 "0" */
|
||||
0x0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0,
|
||||
0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x7f,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0xff, 0xff,
|
||||
0x80, 0xf, 0xff, 0xf8, 0x1, 0xff, 0xff, 0x40,
|
||||
0x1f, 0xff, 0xf0, 0x2, 0xff, 0xff, 0x0, 0x3f,
|
||||
0xff, 0xe0, 0x3, 0xff, 0xfd, 0x0, 0x7f, 0xff,
|
||||
0xd0, 0x7, 0xff, 0xfc, 0x0, 0xbf, 0xff, 0xc0,
|
||||
0xf, 0xff, 0xf8, 0x0, 0xff, 0xff, 0x80, 0x1f,
|
||||
0xff, 0xf4, 0x1, 0xff, 0xff, 0x0, 0x2f, 0xff,
|
||||
0xf0, 0x3, 0xff, 0xfe, 0x0, 0x3f, 0xff, 0xff,
|
||||
0xff, 0xff, 0xfd, 0x0, 0x3f, 0xff, 0xff, 0xff,
|
||||
0xff, 0xfc, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff,
|
||||
0xf4, 0x0,
|
||||
|
||||
/* U+0031 "1" */
|
||||
0x2f, 0xff, 0xff, 0xfd, 0x3f, 0xff, 0xff, 0xfc,
|
||||
0x7f, 0xff, 0xff, 0xf8, 0x0, 0x1f, 0xff, 0xf0,
|
||||
0x0, 0x3f, 0xff, 0xe0, 0x0, 0x7f, 0xff, 0xd0,
|
||||
0x0, 0xbf, 0xff, 0xc0, 0x0, 0xff, 0xff, 0x80,
|
||||
0x1, 0xff, 0xff, 0x0, 0x3, 0xff, 0xfe, 0x0,
|
||||
0x7, 0xff, 0xfd, 0x0, 0xb, 0xff, 0xfc, 0x0,
|
||||
0xf, 0xff, 0xf4, 0x0, 0x1f, 0xff, 0xf0, 0x0,
|
||||
|
||||
/* U+0032 "2" */
|
||||
0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0,
|
||||
0xf, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x0, 0x1f,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfd, 0x0, 0x0, 0x0,
|
||||
0x0, 0xb, 0xff, 0xfc, 0x0, 0x0, 0x0, 0x0,
|
||||
0xf, 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, 0xf,
|
||||
0xff, 0xf0, 0x0, 0x1b, 0xff, 0xff, 0xff, 0xff,
|
||||
0xe0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
|
||||
0x2, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x3,
|
||||
0xff, 0xfd, 0x0, 0x0, 0x0, 0x0, 0xb, 0xff,
|
||||
0xfc, 0x0, 0x0, 0x0, 0x0, 0xf, 0xff, 0xff,
|
||||
0xff, 0xff, 0xfe, 0x0, 0x1f, 0xff, 0xff, 0xff,
|
||||
0xff, 0xfd, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff,
|
||||
0xfc, 0x0,
|
||||
|
||||
/* U+0033 "3" */
|
||||
0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0,
|
||||
0xf, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x1f,
|
||||
0xff, 0xff, 0xff, 0xff, 0xf4, 0x0, 0x0, 0x0,
|
||||
0x0, 0x1f, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x3f, 0xff, 0xe0, 0x0, 0x0, 0x0, 0x0, 0x3f,
|
||||
0xff, 0xc0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x40, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0,
|
||||
0x2, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0,
|
||||
0x0, 0x0, 0x3, 0xff, 0xfe, 0x0, 0x0, 0x0,
|
||||
0x0, 0x7, 0xff, 0xfd, 0x0, 0xf, 0xff, 0xff,
|
||||
0xff, 0xff, 0xfc, 0x0, 0x1f, 0xff, 0xff, 0xff,
|
||||
0xff, 0xf0, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff,
|
||||
0xc0, 0x0,
|
||||
|
||||
/* U+0034 "4" */
|
||||
0x0, 0xbf, 0xff, 0xc0, 0xf, 0xff, 0xf8, 0x3,
|
||||
0xff, 0xfd, 0x0, 0x7f, 0xff, 0xd0, 0x1f, 0xff,
|
||||
0xf0, 0x2, 0xff, 0xff, 0x0, 0xff, 0xff, 0x80,
|
||||
0xf, 0xff, 0xf8, 0x7, 0xff, 0xfd, 0x0, 0xbf,
|
||||
0xff, 0xc0, 0x2f, 0xff, 0xf0, 0x3, 0xff, 0xfe,
|
||||
0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xb,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff,
|
||||
0xff, 0xff, 0xff, 0xfd, 0x0, 0x0, 0x0, 0x0,
|
||||
0x2f, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0xff,
|
||||
0xff, 0x80, 0x0, 0x0, 0x0, 0x7, 0xff, 0xfd,
|
||||
0x0, 0x0, 0x0, 0x0, 0x2f, 0xff, 0xf0, 0x0,
|
||||
0x0, 0x0, 0x0, 0xff, 0xff, 0x40, 0x0,
|
||||
|
||||
/* U+0035 "5" */
|
||||
0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0,
|
||||
0x3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x1,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x0, 0xff,
|
||||
0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff,
|
||||
0xd0, 0x0, 0x0, 0x0, 0x0, 0x2f, 0xff, 0xf0,
|
||||
0x0, 0x0, 0x0, 0x0, 0xf, 0xff, 0xff, 0xff,
|
||||
0xff, 0xf4, 0x0, 0x7, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0x0, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xc0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, 0xe0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xf0, 0x0,
|
||||
0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x1f,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0xf, 0xff,
|
||||
0xff, 0xff, 0xff, 0xf8, 0x0, 0x0,
|
||||
|
||||
/* U+0036 "6" */
|
||||
0x0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x0,
|
||||
0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x7f,
|
||||
0xff, 0xff, 0xff, 0xff, 0xf8, 0x0, 0xff, 0xff,
|
||||
0x80, 0x0, 0x0, 0x0, 0x1, 0xff, 0xff, 0x40,
|
||||
0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x0, 0x0,
|
||||
0x0, 0x0, 0x3, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xc0, 0x7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
|
||||
0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x1f,
|
||||
0xff, 0xf4, 0x2, 0xff, 0xff, 0x0, 0x2f, 0xff,
|
||||
0xf0, 0x3, 0xff, 0xfe, 0x0, 0x3f, 0xff, 0xff,
|
||||
0xff, 0xff, 0xfc, 0x0, 0x3f, 0xff, 0xff, 0xff,
|
||||
0xff, 0xf8, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff,
|
||||
0xf0, 0x0,
|
||||
|
||||
/* U+0037 "7" */
|
||||
0x0, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf,
|
||||
0xff, 0xff, 0xff, 0xff, 0xf4, 0x1, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xbf,
|
||||
0xff, 0xd0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xfc,
|
||||
0x0, 0x0, 0x0, 0x7f, 0xff, 0xfe, 0x0, 0x0,
|
||||
0x0, 0x3f, 0xff, 0xfe, 0x0, 0x0, 0x0, 0x2f,
|
||||
0xff, 0xfe, 0x0, 0x0, 0x0, 0x2f, 0xff, 0xfe,
|
||||
0x0, 0x0, 0x0, 0x1f, 0xff, 0xfd, 0x0, 0x0,
|
||||
0x0, 0x7, 0xff, 0xfd, 0x0, 0x0, 0x0, 0x0,
|
||||
0xff, 0xff, 0x80, 0x0, 0x0, 0x0, 0x2f, 0xff,
|
||||
0xf0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xfe, 0x0,
|
||||
0x0, 0x0, 0x0,
|
||||
|
||||
/* U+0038 "8" */
|
||||
0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40,
|
||||
0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x7,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x3, 0xff,
|
||||
0xfe, 0x0, 0xf, 0xff, 0xf4, 0x0, 0xff, 0xff,
|
||||
0x40, 0x7, 0xff, 0xfc, 0x0, 0x7f, 0xff, 0xc0,
|
||||
0x2, 0xff, 0xfd, 0x0, 0x1f, 0xff, 0xd0, 0xff,
|
||||
0xff, 0xfe, 0x0, 0xb, 0xff, 0xf0, 0x7f, 0xff,
|
||||
0xff, 0x0, 0xb, 0xff, 0xf8, 0x2f, 0xff, 0xff,
|
||||
0xd0, 0x3, 0xff, 0xfd, 0x0, 0x1f, 0xff, 0xf0,
|
||||
0x2, 0xff, 0xff, 0x0, 0xf, 0xff, 0xf8, 0x0,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x0, 0x7f,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfe, 0x0, 0x2f, 0xff,
|
||||
0xff, 0xff, 0xff, 0xfd, 0x0, 0x0,
|
||||
|
||||
/* U+0039 "9" */
|
||||
0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x7f, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0x3, 0xff, 0xfe, 0x0,
|
||||
0xf, 0xff, 0xf4, 0x1f, 0xff, 0xf4, 0x0, 0x7f,
|
||||
0xff, 0xc0, 0xbf, 0xff, 0xc0, 0x3, 0xff, 0xfe,
|
||||
0x3, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xf4, 0xf,
|
||||
0xff, 0xff, 0xf0, 0xbf, 0xff, 0xc0, 0x1f, 0xff,
|
||||
0xff, 0x43, 0xff, 0xfd, 0x0, 0x0, 0x0, 0x0,
|
||||
0x1f, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0xff,
|
||||
0xff, 0x80, 0x0, 0x0, 0x0, 0x7, 0xff, 0xfd,
|
||||
0x0, 0x0, 0x0, 0x0, 0x2f, 0xff, 0xf0, 0x0,
|
||||
0x0, 0x0, 0x0, 0xff, 0xff, 0x40, 0x0
|
||||
};
|
||||
|
||||
|
||||
/*---------------------
|
||||
* GLYPH DESCRIPTION
|
||||
*--------------------*/
|
||||
|
||||
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
|
||||
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
|
||||
{.bitmap_index = 0, .adv_w = 388, .box_w = 28, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 98, .adv_w = 253, .box_w = 16, .box_h = 14, .ofs_x = 5, .ofs_y = 0},
|
||||
{.bitmap_index = 154, .adv_w = 379, .box_w = 28, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 252, .adv_w = 365, .box_w = 28, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 350, .adv_w = 388, .box_w = 27, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
|
||||
{.bitmap_index = 445, .adv_w = 379, .box_w = 29, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
|
||||
{.bitmap_index = 547, .adv_w = 384, .box_w = 28, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 645, .adv_w = 357, .box_w = 26, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
|
||||
{.bitmap_index = 736, .adv_w = 404, .box_w = 29, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
|
||||
{.bitmap_index = 838, .adv_w = 404, .box_w = 27, .box_h = 14, .ofs_x = 3, .ofs_y = 0}
|
||||
};
|
||||
|
||||
/*---------------------
|
||||
* CHARACTER MAPPING
|
||||
*--------------------*/
|
||||
|
||||
|
||||
|
||||
/*Collect the unicode lists and glyph_id offsets*/
|
||||
static const lv_font_fmt_txt_cmap_t cmaps[] =
|
||||
{
|
||||
{
|
||||
.range_start = 48, .range_length = 10, .glyph_id_start = 1,
|
||||
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*--------------------
|
||||
* ALL CUSTOM DATA
|
||||
*--------------------*/
|
||||
|
||||
#if LVGL_VERSION_MAJOR == 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
#endif
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#endif
|
||||
.glyph_bitmap = glyph_bitmap,
|
||||
.glyph_dsc = glyph_dsc,
|
||||
.cmaps = cmaps,
|
||||
.kern_dsc = NULL,
|
||||
.kern_scale = 0,
|
||||
.cmap_num = 1,
|
||||
.bpp = 2,
|
||||
.kern_classes = 0,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR == 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*-----------------
|
||||
* PUBLIC FONT
|
||||
*----------------*/
|
||||
|
||||
/*Initialize a public general font descriptor*/
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
const lv_font_t ui_font_FontRPM = {
|
||||
#else
|
||||
lv_font_t ui_font_FontRPM = {
|
||||
#endif
|
||||
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
|
||||
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
|
||||
.line_height = 14, /*The maximum line height required by the font*/
|
||||
.base_line = 0, /*Baseline measured from the bottom of the line*/
|
||||
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
|
||||
.subpx = LV_FONT_SUBPX_NONE,
|
||||
#endif
|
||||
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
|
||||
.underline_position = -3,
|
||||
.underline_thickness = 1,
|
||||
#endif
|
||||
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
|
||||
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
|
||||
.fallback = NULL,
|
||||
#endif
|
||||
.user_data = NULL,
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /*#if UI_FONT_FONTRPM*/
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,347 @@
|
|||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.5.0
|
||||
// LVGL version: 8.3.11
|
||||
// Project name: SquareLine_Project
|
||||
|
||||
#include "ui_helpers.h"
|
||||
|
||||
void _ui_bar_set_property(lv_obj_t * target, int id, int val)
|
||||
{
|
||||
if(id == _UI_BAR_PROPERTY_VALUE_WITH_ANIM) lv_bar_set_value(target, val, LV_ANIM_ON);
|
||||
if(id == _UI_BAR_PROPERTY_VALUE) lv_bar_set_value(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
|
||||
void _ui_basic_set_property(lv_obj_t * target, int id, int val)
|
||||
{
|
||||
if(id == _UI_BASIC_PROPERTY_POSITION_X) lv_obj_set_x(target, val);
|
||||
if(id == _UI_BASIC_PROPERTY_POSITION_Y) lv_obj_set_y(target, val);
|
||||
if(id == _UI_BASIC_PROPERTY_WIDTH) lv_obj_set_width(target, val);
|
||||
if(id == _UI_BASIC_PROPERTY_HEIGHT) lv_obj_set_height(target, val);
|
||||
}
|
||||
|
||||
|
||||
void _ui_dropdown_set_property(lv_obj_t * target, int id, int val)
|
||||
{
|
||||
if(id == _UI_DROPDOWN_PROPERTY_SELECTED) lv_dropdown_set_selected(target, val);
|
||||
}
|
||||
|
||||
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val)
|
||||
{
|
||||
if(id == _UI_IMAGE_PROPERTY_IMAGE) lv_img_set_src(target, val);
|
||||
}
|
||||
|
||||
void _ui_label_set_property(lv_obj_t * target, int id, const char * val)
|
||||
{
|
||||
if(id == _UI_LABEL_PROPERTY_TEXT) lv_label_set_text(target, val);
|
||||
}
|
||||
|
||||
|
||||
void _ui_roller_set_property(lv_obj_t * target, int id, int val)
|
||||
{
|
||||
if(id == _UI_ROLLER_PROPERTY_SELECTED_WITH_ANIM) lv_roller_set_selected(target, val, LV_ANIM_ON);
|
||||
if(id == _UI_ROLLER_PROPERTY_SELECTED) lv_roller_set_selected(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
|
||||
void _ui_slider_set_property(lv_obj_t * target, int id, int val)
|
||||
{
|
||||
if(id == _UI_SLIDER_PROPERTY_VALUE_WITH_ANIM) lv_slider_set_value(target, val, LV_ANIM_ON);
|
||||
if(id == _UI_SLIDER_PROPERTY_VALUE) lv_slider_set_value(target, val, LV_ANIM_OFF);
|
||||
}
|
||||
|
||||
|
||||
void _ui_screen_change(lv_obj_t ** target, lv_scr_load_anim_t fademode, int spd, int delay, void (*target_init)(void))
|
||||
{
|
||||
if(*target == NULL)
|
||||
target_init();
|
||||
lv_scr_load_anim(*target, fademode, spd, delay, false);
|
||||
}
|
||||
|
||||
void _ui_screen_delete(lv_obj_t ** target)
|
||||
{
|
||||
if(*target == NULL) {
|
||||
lv_obj_del(*target);
|
||||
target = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void _ui_arc_increment(lv_obj_t * target, int val)
|
||||
{
|
||||
int old = lv_arc_get_value(target);
|
||||
lv_arc_set_value(target, old + val);
|
||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
||||
}
|
||||
|
||||
void _ui_bar_increment(lv_obj_t * target, int val, int anm)
|
||||
{
|
||||
int old = lv_bar_get_value(target);
|
||||
lv_bar_set_value(target, old + val, anm);
|
||||
}
|
||||
|
||||
void _ui_slider_increment(lv_obj_t * target, int val, int anm)
|
||||
{
|
||||
int old = lv_slider_get_value(target);
|
||||
lv_slider_set_value(target, old + val, anm);
|
||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
||||
}
|
||||
|
||||
void _ui_keyboard_set_target(lv_obj_t * keyboard, lv_obj_t * textarea)
|
||||
{
|
||||
lv_keyboard_set_textarea(keyboard, textarea);
|
||||
}
|
||||
|
||||
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value)
|
||||
{
|
||||
if(value == _UI_MODIFY_FLAG_TOGGLE) {
|
||||
if(lv_obj_has_flag(target, flag)) lv_obj_clear_flag(target, flag);
|
||||
else lv_obj_add_flag(target, flag);
|
||||
}
|
||||
else if(value == _UI_MODIFY_FLAG_ADD) lv_obj_add_flag(target, flag);
|
||||
else lv_obj_clear_flag(target, flag);
|
||||
}
|
||||
void _ui_state_modify(lv_obj_t * target, int32_t state, int value)
|
||||
{
|
||||
if(value == _UI_MODIFY_STATE_TOGGLE) {
|
||||
if(lv_obj_has_state(target, state)) lv_obj_clear_state(target, state);
|
||||
else lv_obj_add_state(target, state);
|
||||
}
|
||||
else if(value == _UI_MODIFY_STATE_ADD) lv_obj_add_state(target, state);
|
||||
else lv_obj_clear_state(target, state);
|
||||
}
|
||||
|
||||
|
||||
void _ui_textarea_move_cursor(lv_obj_t * target, int val)
|
||||
|
||||
{
|
||||
|
||||
if(val == UI_MOVE_CURSOR_UP) lv_textarea_cursor_up(target);
|
||||
if(val == UI_MOVE_CURSOR_RIGHT) lv_textarea_cursor_right(target);
|
||||
if(val == UI_MOVE_CURSOR_DOWN) lv_textarea_cursor_down(target);
|
||||
if(val == UI_MOVE_CURSOR_LEFT) lv_textarea_cursor_left(target);
|
||||
lv_obj_add_state(target, LV_STATE_FOCUSED);
|
||||
}
|
||||
|
||||
void scr_unloaded_delete_cb(lv_event_t * e)
|
||||
|
||||
{
|
||||
|
||||
lv_obj_t ** var = lv_event_get_user_data(e);
|
||||
lv_obj_del(*var);
|
||||
(*var) = NULL;
|
||||
|
||||
}
|
||||
|
||||
void _ui_opacity_set(lv_obj_t * target, int val)
|
||||
{
|
||||
lv_obj_set_style_opa(target, val, 0);
|
||||
}
|
||||
|
||||
void _ui_anim_callback_free_user_data(lv_anim_t * a)
|
||||
{
|
||||
lv_mem_free(a->user_data);
|
||||
a->user_data = NULL;
|
||||
}
|
||||
|
||||
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_x(usr->target, v);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_y(usr->target, v);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_width(usr->target, v);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_height(usr->target, v);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_obj_set_style_opa(usr->target, v, 0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_img_set_zoom(usr->target, v);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
lv_img_set_angle(usr->target, v);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void _ui_anim_callback_set_image_frame(lv_anim_t * a, int32_t v)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
usr->val = v;
|
||||
|
||||
if(v < 0) v = 0;
|
||||
if(v >= usr->imgset_size) v = usr->imgset_size - 1;
|
||||
lv_img_set_src(usr->target, usr->imgset[v]);
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_x(lv_anim_t * a)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_x_aligned(usr->target);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_y(lv_anim_t * a)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_y_aligned(usr->target);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_width(lv_anim_t * a)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_width(usr->target);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_height(lv_anim_t * a)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_height(usr->target);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_obj_get_style_opa(usr->target, 0);
|
||||
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_img_get_zoom(usr->target);
|
||||
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return lv_img_get_angle(usr->target);
|
||||
|
||||
}
|
||||
|
||||
int32_t _ui_anim_callback_get_image_frame(lv_anim_t * a)
|
||||
|
||||
{
|
||||
|
||||
ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data;
|
||||
return usr->val;
|
||||
|
||||
}
|
||||
|
||||
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix)
|
||||
{
|
||||
char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE];
|
||||
|
||||
lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_arc_get_value(src), postfix);
|
||||
|
||||
lv_label_set_text(trg, buf);
|
||||
}
|
||||
|
||||
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix)
|
||||
{
|
||||
char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE];
|
||||
|
||||
lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_slider_get_value(src), postfix);
|
||||
|
||||
lv_label_set_text(trg, buf);
|
||||
}
|
||||
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * txt_on, const char * txt_off)
|
||||
{
|
||||
if(lv_obj_has_state(src, LV_STATE_CHECKED)) lv_label_set_text(trg, txt_on);
|
||||
else lv_label_set_text(trg, txt_off);
|
||||
}
|
||||
|
||||
|
||||
void _ui_spinbox_step(lv_obj_t * target, int val)
|
||||
|
||||
{
|
||||
|
||||
if(val > 0) lv_spinbox_increment(target);
|
||||
|
||||
else lv_spinbox_decrement(target);
|
||||
|
||||
|
||||
lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0);
|
||||
}
|
||||
|
||||
void _ui_switch_theme(int val)
|
||||
|
||||
{
|
||||
|
||||
#ifdef UI_THEME_ACTIVE
|
||||
ui_theme_set(val);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.5.0
|
||||
// LVGL version: 8.3.11
|
||||
// Project name: SquareLine_Project
|
||||
|
||||
#ifndef _SQUARELINE_PROJECT_UI_HELPERS_H
|
||||
#define _SQUARELINE_PROJECT_UI_HELPERS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ui.h"
|
||||
|
||||
#define _UI_TEMPORARY_STRING_BUFFER_SIZE 32
|
||||
#define _UI_BAR_PROPERTY_VALUE 0
|
||||
#define _UI_BAR_PROPERTY_VALUE_WITH_ANIM 1
|
||||
void _ui_bar_set_property(lv_obj_t * target, int id, int val);
|
||||
|
||||
#define _UI_BASIC_PROPERTY_POSITION_X 0
|
||||
#define _UI_BASIC_PROPERTY_POSITION_Y 1
|
||||
#define _UI_BASIC_PROPERTY_WIDTH 2
|
||||
#define _UI_BASIC_PROPERTY_HEIGHT 3
|
||||
void _ui_basic_set_property(lv_obj_t * target, int id, int val);
|
||||
|
||||
#define _UI_DROPDOWN_PROPERTY_SELECTED 0
|
||||
void _ui_dropdown_set_property(lv_obj_t * target, int id, int val);
|
||||
|
||||
#define _UI_IMAGE_PROPERTY_IMAGE 0
|
||||
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val);
|
||||
|
||||
#define _UI_LABEL_PROPERTY_TEXT 0
|
||||
void _ui_label_set_property(lv_obj_t * target, int id, const char * val);
|
||||
|
||||
#define _UI_ROLLER_PROPERTY_SELECTED 0
|
||||
#define _UI_ROLLER_PROPERTY_SELECTED_WITH_ANIM 1
|
||||
void _ui_roller_set_property(lv_obj_t * target, int id, int val);
|
||||
|
||||
#define _UI_SLIDER_PROPERTY_VALUE 0
|
||||
#define _UI_SLIDER_PROPERTY_VALUE_WITH_ANIM 1
|
||||
void _ui_slider_set_property(lv_obj_t * target, int id, int val);
|
||||
|
||||
void _ui_screen_change(lv_obj_t ** target, lv_scr_load_anim_t fademode, int spd, int delay, void (*target_init)(void));
|
||||
|
||||
void _ui_screen_delete(lv_obj_t ** target);
|
||||
|
||||
void _ui_arc_increment(lv_obj_t * target, int val);
|
||||
|
||||
void _ui_bar_increment(lv_obj_t * target, int val, int anm);
|
||||
|
||||
void _ui_slider_increment(lv_obj_t * target, int val, int anm);
|
||||
|
||||
void _ui_keyboard_set_target(lv_obj_t * keyboard, lv_obj_t * textarea);
|
||||
|
||||
#define _UI_MODIFY_FLAG_ADD 0
|
||||
#define _UI_MODIFY_FLAG_REMOVE 1
|
||||
#define _UI_MODIFY_FLAG_TOGGLE 2
|
||||
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value);
|
||||
|
||||
#define _UI_MODIFY_STATE_ADD 0
|
||||
#define _UI_MODIFY_STATE_REMOVE 1
|
||||
#define _UI_MODIFY_STATE_TOGGLE 2
|
||||
void _ui_state_modify(lv_obj_t * target, int32_t state, int value);
|
||||
|
||||
#define UI_MOVE_CURSOR_UP 0
|
||||
#define UI_MOVE_CURSOR_RIGHT 1
|
||||
#define UI_MOVE_CURSOR_DOWN 2
|
||||
#define UI_MOVE_CURSOR_LEFT 3
|
||||
void _ui_textarea_move_cursor(lv_obj_t * target, int val)
|
||||
;
|
||||
|
||||
|
||||
void scr_unloaded_delete_cb(lv_event_t * e);
|
||||
|
||||
void _ui_opacity_set(lv_obj_t * target, int val);
|
||||
|
||||
/** Describes an animation*/
|
||||
typedef struct _ui_anim_user_data_t {
|
||||
lv_obj_t * target;
|
||||
lv_img_dsc_t ** imgset;
|
||||
int32_t imgset_size;
|
||||
int32_t val;
|
||||
} ui_anim_user_data_t;
|
||||
void _ui_anim_callback_free_user_data(lv_anim_t * a);
|
||||
|
||||
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v);
|
||||
|
||||
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v);
|
||||
|
||||
|
||||
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v);
|
||||
|
||||
|
||||
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v);
|
||||
|
||||
|
||||
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v);
|
||||
|
||||
|
||||
void _ui_anim_callback_set_image_frame(lv_anim_t * a, int32_t v);
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_x(lv_anim_t * a);
|
||||
|
||||
int32_t _ui_anim_callback_get_y(lv_anim_t * a);
|
||||
|
||||
int32_t _ui_anim_callback_get_width(lv_anim_t * a);
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_height(lv_anim_t * a);
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a);
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a);
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a);
|
||||
|
||||
|
||||
int32_t _ui_anim_callback_get_image_frame(lv_anim_t * a);
|
||||
|
||||
|
||||
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix);
|
||||
|
||||
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix);
|
||||
|
||||
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * txt_on, const char * txt_off);
|
||||
|
||||
void _ui_spinbox_step(lv_obj_t * target, int val)
|
||||
;
|
||||
|
||||
|
||||
void _ui_switch_theme(int val)
|
||||
;
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,811 @@
|
|||
// This file was generated by SquareLine Studio
|
||||
// SquareLine Studio version: SquareLine Studio 1.5.0
|
||||
// LVGL version: 8.3.11
|
||||
// Project name: SquareLine_Project
|
||||
|
||||
#include "ui.h"
|
||||
|
||||
void ui_mainScreen_screen_init(void)
|
||||
{
|
||||
ui_mainScreen = lv_obj_create(NULL);
|
||||
lv_obj_clear_flag(ui_mainScreen, LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_obj_set_style_bg_color(ui_mainScreen, lv_color_hex(0x313131), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_mainScreen, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_rpmBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_bar_set_range(ui_rpmBar0, 0, 800);
|
||||
lv_obj_set_width(ui_rpmBar0, 800);
|
||||
lv_obj_set_height(ui_rpmBar0, 80);
|
||||
lv_obj_set_style_radius(ui_rpmBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_rpmBar0, lv_color_hex(0x393839), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_rpmBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_rpmBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_rpmBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_rpmBar0, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_rpmBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_rpmBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_rpmBar0, lv_color_hex(0xE0FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_rpmBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_rpmVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_rpmVal0, 100);
|
||||
lv_obj_set_height(ui_rpmVal0, 16);
|
||||
lv_obj_set_x(ui_rpmVal0, -10);
|
||||
lv_obj_set_y(ui_rpmVal0, 37);
|
||||
lv_obj_set_align(ui_rpmVal0, LV_ALIGN_TOP_RIGHT);
|
||||
lv_label_set_long_mode(ui_rpmVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_rpmVal0, "0");
|
||||
lv_obj_set_style_text_color(ui_rpmVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_rpmVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_rpmVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_rpmVal0, &ui_font_FontRPM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_rpmVal0, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_rpmVal0, 80, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_rpmVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_rpmVal0, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_rpmLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_rpmLabel1, 60);
|
||||
lv_obj_set_height(ui_rpmLabel1, 14);
|
||||
lv_obj_set_x(ui_rpmLabel1, -17);
|
||||
lv_obj_set_y(ui_rpmLabel1, 54);
|
||||
lv_obj_set_align(ui_rpmLabel1, LV_ALIGN_TOP_RIGHT);
|
||||
lv_label_set_long_mode(ui_rpmLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_rpmLabel1, "rpm");
|
||||
lv_obj_set_style_text_color(ui_rpmLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_rpmLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_rpmLabel1, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_rpmLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_rpmLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_rpmLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_rpmLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_rpmLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_speedVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_speedVal0, 460);
|
||||
lv_obj_set_height(ui_speedVal0, 86);
|
||||
lv_obj_set_x(ui_speedVal0, -68);
|
||||
lv_obj_set_y(ui_speedVal0, -50);
|
||||
lv_obj_set_align(ui_speedVal0, LV_ALIGN_CENTER);
|
||||
lv_label_set_long_mode(ui_speedVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_speedVal0, "0");
|
||||
lv_obj_set_style_text_color(ui_speedVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_speedVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_speedVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_speedVal0, &ui_font_FontSpeed, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_speedVal0, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_speedVal0, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_speedVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_speedVal0, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_speedLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_speedLabel1, 60);
|
||||
lv_obj_set_height(ui_speedLabel1, 16);
|
||||
lv_obj_set_x(ui_speedLabel1, 226);
|
||||
lv_obj_set_y(ui_speedLabel1, -71);
|
||||
lv_obj_set_align(ui_speedLabel1, LV_ALIGN_CENTER);
|
||||
lv_label_set_long_mode(ui_speedLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_speedLabel1, "km/h");
|
||||
lv_obj_set_style_text_color(ui_speedLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_speedLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_speedLabel1, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_speedLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_speedLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_speedLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_speedLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_speedLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_afrBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_bar_set_mode(ui_afrBar0, LV_BAR_MODE_SYMMETRICAL);
|
||||
lv_bar_set_range(ui_afrBar0, -50, 50);
|
||||
lv_bar_set_value(ui_afrBar0, 50, LV_ANIM_OFF);
|
||||
lv_bar_set_start_value(ui_afrBar0, 0, LV_ANIM_OFF);
|
||||
lv_obj_set_width(ui_afrBar0, 200);
|
||||
lv_obj_set_height(ui_afrBar0, 35);
|
||||
lv_obj_set_x(ui_afrBar0, 300);
|
||||
lv_obj_set_y(ui_afrBar0, 306);
|
||||
lv_obj_set_style_radius(ui_afrBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_afrBar0, lv_color_hex(0x313031), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_afrBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_afrBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_afrBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_afrBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_afrBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_afrBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_afrBar0, lv_color_hex(0x00FFFF), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_afrBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_afrVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_afrVal0, 65);
|
||||
lv_obj_set_height(ui_afrVal0, 16);
|
||||
lv_obj_set_x(ui_afrVal0, 432);
|
||||
lv_obj_set_y(ui_afrVal0, 290);
|
||||
lv_label_set_long_mode(ui_afrVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_afrVal0, "20.0");
|
||||
lv_obj_set_style_text_color(ui_afrVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_afrVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_afrVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_afrVal0, &ui_font_FontIndicator, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_cltBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_bar_set_range(ui_cltBar0, 40, 120);
|
||||
lv_bar_set_start_value(ui_cltBar0, 40, LV_ANIM_OFF);
|
||||
lv_obj_set_width(ui_cltBar0, 200);
|
||||
lv_obj_set_height(ui_cltBar0, 35);
|
||||
lv_obj_set_x(ui_cltBar0, 17);
|
||||
lv_obj_set_y(ui_cltBar0, 266);
|
||||
lv_obj_set_style_radius(ui_cltBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_cltBar0, lv_color_hex(0x333333), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_cltBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_cltBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_cltBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_cltBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_cltBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_cltBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_cltBar0, lv_color_hex(0xE6FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_cltBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_cltVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_cltVal0, 55);
|
||||
lv_obj_set_height(ui_cltVal0, 16);
|
||||
lv_obj_set_x(ui_cltVal0, 160);
|
||||
lv_obj_set_y(ui_cltVal0, 250);
|
||||
lv_label_set_long_mode(ui_cltVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_cltVal0, "-40");
|
||||
lv_obj_set_style_text_color(ui_cltVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_cltVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_cltVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_cltVal0, &ui_font_FontIndicator, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_iatBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_bar_set_range(ui_iatBar0, 0, 80);
|
||||
lv_obj_set_width(ui_iatBar0, 200);
|
||||
lv_obj_set_height(ui_iatBar0, 35);
|
||||
lv_obj_set_x(ui_iatBar0, 17);
|
||||
lv_obj_set_y(ui_iatBar0, 346);
|
||||
lv_obj_set_style_radius(ui_iatBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_iatBar0, lv_color_hex(0x313031), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_iatBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_iatBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_iatBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_iatBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_iatBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_iatBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_iatBar0, lv_color_hex(0xE6FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_iatBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_iatVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_iatVal0, 55);
|
||||
lv_obj_set_height(ui_iatVal0, 16);
|
||||
lv_obj_set_x(ui_iatVal0, 160);
|
||||
lv_obj_set_y(ui_iatVal0, 330);
|
||||
lv_label_set_long_mode(ui_iatVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_iatVal0, "-40");
|
||||
lv_obj_set_style_text_color(ui_iatVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_iatVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_iatVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_iatVal0, &ui_font_FontIndicator, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_vBattBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_bar_set_range(ui_vBattBar0, 100, 160);
|
||||
lv_bar_set_start_value(ui_vBattBar0, 100, LV_ANIM_OFF);
|
||||
lv_obj_set_width(ui_vBattBar0, 200);
|
||||
lv_obj_set_height(ui_vBattBar0, 35);
|
||||
lv_obj_set_x(ui_vBattBar0, 17);
|
||||
lv_obj_set_y(ui_vBattBar0, 426);
|
||||
lv_obj_set_style_radius(ui_vBattBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_vBattBar0, lv_color_hex(0x313031), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_vBattBar0, 120, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_vBattBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_vBattBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_vBattBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_vBattBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_vBattBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_vBattBar0, lv_color_hex(0xFFFFFF), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_vBattBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_vBattVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_vBattVal0, 55);
|
||||
lv_obj_set_height(ui_vBattVal0, 16);
|
||||
lv_obj_set_x(ui_vBattVal0, 160);
|
||||
lv_obj_set_y(ui_vBattVal0, 409);
|
||||
lv_label_set_long_mode(ui_vBattVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_vBattVal0, "0.0");
|
||||
lv_obj_set_style_text_color(ui_vBattVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_vBattVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_vBattVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_vBattVal0, &ui_font_FontIndicator, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_mapBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_bar_set_value(ui_mapBar0, 100, LV_ANIM_OFF);
|
||||
lv_bar_set_start_value(ui_mapBar0, 0, LV_ANIM_OFF);
|
||||
lv_obj_set_width(ui_mapBar0, 200);
|
||||
lv_obj_set_height(ui_mapBar0, 35);
|
||||
lv_obj_set_x(ui_mapBar0, 300);
|
||||
lv_obj_set_y(ui_mapBar0, 386);
|
||||
lv_obj_set_style_radius(ui_mapBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_mapBar0, lv_color_hex(0x313031), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_mapBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_mapBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_mapBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_mapBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_mapBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_mapBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_mapBar0, lv_color_hex(0x01FF71), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_mapBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_mapVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_mapVal0, 65);
|
||||
lv_obj_set_height(ui_mapVal0, 16);
|
||||
lv_obj_set_x(ui_mapVal0, 432);
|
||||
lv_obj_set_y(ui_mapVal0, 370);
|
||||
lv_label_set_long_mode(ui_mapVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_mapVal0, "100");
|
||||
lv_obj_set_style_text_color(ui_mapVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_mapVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_mapVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_mapVal0, &ui_font_FontIndicator, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_oilPressBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_bar_set_range(ui_oilPressBar0, 0, 500);
|
||||
lv_obj_set_width(ui_oilPressBar0, 200);
|
||||
lv_obj_set_height(ui_oilPressBar0, 35);
|
||||
lv_obj_set_x(ui_oilPressBar0, 583);
|
||||
lv_obj_set_y(ui_oilPressBar0, 266);
|
||||
lv_obj_set_style_radius(ui_oilPressBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_oilPressBar0, lv_color_hex(0x313031), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_oilPressBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_oilPressBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_oilPressBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_oilPressBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_oilPressBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_oilPressBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_oilPressBar0, lv_color_hex(0xE6FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_oilPressBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_oilPressVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_oilPressVal0, 55);
|
||||
lv_obj_set_height(ui_oilPressVal0, 16);
|
||||
lv_obj_set_x(ui_oilPressVal0, 726);
|
||||
lv_obj_set_y(ui_oilPressVal0, 250);
|
||||
lv_label_set_long_mode(ui_oilPressVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_oilPressVal0, "0.0");
|
||||
lv_obj_set_style_text_color(ui_oilPressVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_oilPressVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_oilPressVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_oilPressVal0, &ui_font_FontIndicator, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_fuelPressBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_bar_set_range(ui_fuelPressBar0, 100, 500);
|
||||
lv_bar_set_start_value(ui_fuelPressBar0, 100, LV_ANIM_OFF);
|
||||
lv_obj_set_width(ui_fuelPressBar0, 200);
|
||||
lv_obj_set_height(ui_fuelPressBar0, 35);
|
||||
lv_obj_set_x(ui_fuelPressBar0, 583);
|
||||
lv_obj_set_y(ui_fuelPressBar0, 346);
|
||||
lv_obj_set_style_radius(ui_fuelPressBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_fuelPressBar0, lv_color_hex(0x313031), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_fuelPressBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_fuelPressBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_fuelPressBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_fuelPressBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_fuelPressBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_fuelPressBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_fuelPressBar0, lv_color_hex(0xE6FF00), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_fuelPressBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_fuelPressVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_fuelPressVal0, 55);
|
||||
lv_obj_set_height(ui_fuelPressVal0, 16);
|
||||
lv_obj_set_x(ui_fuelPressVal0, 726);
|
||||
lv_obj_set_y(ui_fuelPressVal0, 330);
|
||||
lv_label_set_long_mode(ui_fuelPressVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_fuelPressVal0, "0.0");
|
||||
lv_obj_set_style_text_color(ui_fuelPressVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_fuelPressVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_fuelPressVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_fuelPressVal0, &ui_font_FontIndicator, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_fuelLevelBar0 = lv_bar_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_fuelLevelBar0, 200);
|
||||
lv_obj_set_height(ui_fuelLevelBar0, 35);
|
||||
lv_obj_set_x(ui_fuelLevelBar0, 583);
|
||||
lv_obj_set_y(ui_fuelLevelBar0, 426);
|
||||
lv_obj_set_style_radius(ui_fuelLevelBar0, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_fuelLevelBar0, lv_color_hex(0x313031), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_fuelLevelBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_color(ui_fuelLevelBar0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_opa(ui_fuelLevelBar0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_width(ui_fuelLevelBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_outline_pad(ui_fuelLevelBar0, 1, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_set_style_radius(ui_fuelLevelBar0, 0, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_fuelLevelBar0, lv_color_hex(0xFFFFFF), LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_fuelLevelBar0, 255, LV_PART_INDICATOR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_fuelLevelVal0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_fuelLevelVal0, 55);
|
||||
lv_obj_set_height(ui_fuelLevelVal0, 16);
|
||||
lv_obj_set_x(ui_fuelLevelVal0, 726);
|
||||
lv_obj_set_y(ui_fuelLevelVal0, 409);
|
||||
lv_label_set_long_mode(ui_fuelLevelVal0, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_fuelLevelVal0, "0");
|
||||
lv_obj_set_style_text_color(ui_fuelLevelVal0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_fuelLevelVal0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_fuelLevelVal0, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_fuelLevelVal0, &ui_font_FontIndicator, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_Label1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_Label1, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_Label1, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_Label1, 82);
|
||||
lv_obj_set_y(ui_Label1, 94);
|
||||
lv_label_set_text(ui_Label1, "1");
|
||||
lv_obj_set_style_text_color(ui_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_Label1, &ui_font_FontRPM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_Label2 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_Label2, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_Label2, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_Label2, 174);
|
||||
lv_obj_set_y(ui_Label2, 94);
|
||||
lv_label_set_text(ui_Label2, "2");
|
||||
lv_obj_set_style_text_color(ui_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_Label2, &ui_font_FontRPM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_Label3 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_Label3, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_Label3, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_Label3, 276);
|
||||
lv_obj_set_y(ui_Label3, 94);
|
||||
lv_label_set_text(ui_Label3, "3");
|
||||
lv_obj_set_style_text_color(ui_Label3, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_Label3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_Label3, &ui_font_FontRPM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_Label4 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_Label4, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_Label4, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_Label4, 375);
|
||||
lv_obj_set_y(ui_Label4, 94);
|
||||
lv_label_set_text(ui_Label4, "4");
|
||||
lv_obj_set_style_text_color(ui_Label4, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_Label4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_Label4, &ui_font_FontRPM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_Label5 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_Label5, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_Label5, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_Label5, 474);
|
||||
lv_obj_set_y(ui_Label5, 94);
|
||||
lv_label_set_text(ui_Label5, "5");
|
||||
lv_obj_set_style_text_color(ui_Label5, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_Label5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_Label5, &ui_font_FontRPM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_Label6 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_Label6, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_Label6, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_Label6, 574);
|
||||
lv_obj_set_y(ui_Label6, 94);
|
||||
lv_label_set_text(ui_Label6, "6");
|
||||
lv_obj_set_style_text_color(ui_Label6, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_Label6, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_Label6, &ui_font_FontRPM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_Label7 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_Label7, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_Label7, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_Label7, 675);
|
||||
lv_obj_set_y(ui_Label7, 94);
|
||||
lv_label_set_text(ui_Label7, "7");
|
||||
lv_obj_set_style_text_color(ui_Label7, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_Label7, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_Label7, &ui_font_FontRPM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_cltLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_cltLabel1, 60);
|
||||
lv_obj_set_height(ui_cltLabel1, 16);
|
||||
lv_obj_set_x(ui_cltLabel1, 16);
|
||||
lv_obj_set_y(ui_cltLabel1, 245);
|
||||
lv_label_set_long_mode(ui_cltLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_cltLabel1, "clt");
|
||||
lv_obj_set_style_text_color(ui_cltLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_cltLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_cltLabel1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_cltLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_cltLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_cltLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_cltLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_cltLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_iatLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_iatLabel1, 60);
|
||||
lv_obj_set_height(ui_iatLabel1, 16);
|
||||
lv_obj_set_x(ui_iatLabel1, 16);
|
||||
lv_obj_set_y(ui_iatLabel1, 325);
|
||||
lv_label_set_long_mode(ui_iatLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_iatLabel1, "iat");
|
||||
lv_obj_set_style_text_color(ui_iatLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_iatLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_iatLabel1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_iatLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_iatLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_iatLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_iatLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_iatLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_vBattLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_vBattLabel1, 70);
|
||||
lv_obj_set_height(ui_vBattLabel1, 16);
|
||||
lv_obj_set_x(ui_vBattLabel1, 14);
|
||||
lv_obj_set_y(ui_vBattLabel1, 405);
|
||||
lv_label_set_long_mode(ui_vBattLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_vBattLabel1, "vbatt");
|
||||
lv_obj_set_style_text_color(ui_vBattLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_vBattLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_vBattLabel1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_vBattLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_vBattLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_vBattLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_vBattLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_vBattLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_oilPressLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_oilPressLabel1, 60);
|
||||
lv_obj_set_height(ui_oilPressLabel1, 16);
|
||||
lv_obj_set_x(ui_oilPressLabel1, 582);
|
||||
lv_obj_set_y(ui_oilPressLabel1, 245);
|
||||
lv_label_set_long_mode(ui_oilPressLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_oilPressLabel1, "oil p");
|
||||
lv_obj_set_style_text_color(ui_oilPressLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_oilPressLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_oilPressLabel1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_oilPressLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_oilPressLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_oilPressLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_oilPressLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_oilPressLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_fuelPressLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_fuelPressLabel1, 75);
|
||||
lv_obj_set_height(ui_fuelPressLabel1, 16);
|
||||
lv_obj_set_x(ui_fuelPressLabel1, 582);
|
||||
lv_obj_set_y(ui_fuelPressLabel1, 325);
|
||||
lv_label_set_long_mode(ui_fuelPressLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_fuelPressLabel1, "fuel p");
|
||||
lv_obj_set_style_text_color(ui_fuelPressLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_fuelPressLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_fuelPressLabel1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_fuelPressLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_fuelPressLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_fuelPressLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_fuelPressLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_fuelPressLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_fuelLevelLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_fuelLevelLabel1, 72);
|
||||
lv_obj_set_height(ui_fuelLevelLabel1, 16);
|
||||
lv_obj_set_x(ui_fuelLevelLabel1, 582);
|
||||
lv_obj_set_y(ui_fuelLevelLabel1, 405);
|
||||
lv_label_set_long_mode(ui_fuelLevelLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_fuelLevelLabel1, "fuel l");
|
||||
lv_obj_set_style_text_color(ui_fuelLevelLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_fuelLevelLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_fuelLevelLabel1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_fuelLevelLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_fuelLevelLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_fuelLevelLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_fuelLevelLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_fuelLevelLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_afrLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_afrLabel1, 46);
|
||||
lv_obj_set_height(ui_afrLabel1, 16);
|
||||
lv_obj_set_x(ui_afrLabel1, -77);
|
||||
lv_obj_set_y(ui_afrLabel1, 53);
|
||||
lv_obj_set_align(ui_afrLabel1, LV_ALIGN_CENTER);
|
||||
lv_label_set_long_mode(ui_afrLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_afrLabel1, "afr");
|
||||
lv_obj_set_style_text_color(ui_afrLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_afrLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_afrLabel1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_afrLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_afrLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_afrLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_afrLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_afrLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_mapLabel1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_mapLabel1, 46);
|
||||
lv_obj_set_height(ui_mapLabel1, 16);
|
||||
lv_obj_set_x(ui_mapLabel1, -77);
|
||||
lv_obj_set_y(ui_mapLabel1, 134);
|
||||
lv_obj_set_align(ui_mapLabel1, LV_ALIGN_CENTER);
|
||||
lv_label_set_long_mode(ui_mapLabel1, LV_LABEL_LONG_CLIP);
|
||||
lv_label_set_text(ui_mapLabel1, "map");
|
||||
lv_obj_set_style_text_color(ui_mapLabel1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_mapLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui_mapLabel1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_mapLabel1, &ui_font_FontLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_mapLabel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_main_stop(ui_mapLabel1, 100, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_stop(ui_mapLabel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui_mapLabel1, LV_GRAD_DIR_VER, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelClt40 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelClt40, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelClt40, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelClt40, 17);
|
||||
lv_obj_set_y(ui_LabelClt40, 68);
|
||||
lv_obj_set_align(ui_LabelClt40, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelClt40, "40");
|
||||
lv_obj_set_style_text_color(ui_LabelClt40, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelClt40, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelClt40, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelClt80 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelClt80, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelClt80, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelClt80, 107);
|
||||
lv_obj_set_y(ui_LabelClt80, 68);
|
||||
lv_obj_set_align(ui_LabelClt80, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelClt80, "80");
|
||||
lv_obj_set_style_text_color(ui_LabelClt80, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelClt80, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelClt80, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelClt120 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelClt120, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelClt120, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelClt120, 192);
|
||||
lv_obj_set_y(ui_LabelClt120, 68);
|
||||
lv_obj_set_align(ui_LabelClt120, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelClt120, "120");
|
||||
lv_obj_set_style_text_color(ui_LabelClt120, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelClt120, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelClt120, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelIat0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelIat0, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelIat0, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelIat0, 17);
|
||||
lv_obj_set_y(ui_LabelIat0, 148);
|
||||
lv_obj_set_align(ui_LabelIat0, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelIat0, "0");
|
||||
lv_obj_set_style_text_color(ui_LabelIat0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelIat0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelIat0, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelIat40 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelIat40, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelIat40, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelIat40, 107);
|
||||
lv_obj_set_y(ui_LabelIat40, 148);
|
||||
lv_obj_set_align(ui_LabelIat40, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelIat40, "40");
|
||||
lv_obj_set_style_text_color(ui_LabelIat40, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelIat40, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelIat40, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelIat80 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelIat80, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelIat80, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelIat80, 197);
|
||||
lv_obj_set_y(ui_LabelIat80, 148);
|
||||
lv_obj_set_align(ui_LabelIat80, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelIat80, "80");
|
||||
lv_obj_set_style_text_color(ui_LabelIat80, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelIat80, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelIat80, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelVbatt16 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelVbatt16, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelVbatt16, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelVbatt16, 202);
|
||||
lv_obj_set_y(ui_LabelVbatt16, 228);
|
||||
lv_obj_set_align(ui_LabelVbatt16, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelVbatt16, "16");
|
||||
lv_obj_set_style_text_color(ui_LabelVbatt16, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelVbatt16, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelVbatt16, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelVbatt10 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelVbatt10, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelVbatt10, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelVbatt10, 17);
|
||||
lv_obj_set_y(ui_LabelVbatt10, 228);
|
||||
lv_obj_set_align(ui_LabelVbatt10, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelVbatt10, "10");
|
||||
lv_obj_set_style_text_color(ui_LabelVbatt10, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelVbatt10, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelVbatt10, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelVbatt13 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelVbatt13, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelVbatt13, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelVbatt13, 113);
|
||||
lv_obj_set_y(ui_LabelVbatt13, 228);
|
||||
lv_obj_set_align(ui_LabelVbatt13, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_LabelVbatt13, "13");
|
||||
lv_obj_set_style_text_color(ui_LabelVbatt13, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelVbatt13, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelVbatt13, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelAfr10 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelAfr10, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelAfr10, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelAfr10, -93);
|
||||
lv_obj_set_y(ui_LabelAfr10, 109);
|
||||
lv_obj_set_align(ui_LabelAfr10, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_LabelAfr10, "10");
|
||||
lv_obj_set_style_text_color(ui_LabelAfr10, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelAfr10, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelAfr10, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelAfr15 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelAfr15, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelAfr15, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelAfr15, 3);
|
||||
lv_obj_set_y(ui_LabelAfr15, 109);
|
||||
lv_obj_set_align(ui_LabelAfr15, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_LabelAfr15, "15");
|
||||
lv_obj_set_style_text_color(ui_LabelAfr15, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelAfr15, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelAfr15, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelAfr20 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelAfr20, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelAfr20, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelAfr20, 90);
|
||||
lv_obj_set_y(ui_LabelAfr20, 109);
|
||||
lv_obj_set_align(ui_LabelAfr20, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_LabelAfr20, "20");
|
||||
lv_obj_set_style_text_color(ui_LabelAfr20, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelAfr20, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelAfr20, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelMap100 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelMap100, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelMap100, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelMap100, 87);
|
||||
lv_obj_set_y(ui_LabelMap100, 188);
|
||||
lv_obj_set_align(ui_LabelMap100, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_LabelMap100, "100");
|
||||
lv_obj_set_style_text_color(ui_LabelMap100, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelMap100, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelMap100, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelMap50 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelMap50, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelMap50, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelMap50, 1);
|
||||
lv_obj_set_y(ui_LabelMap50, 188);
|
||||
lv_obj_set_align(ui_LabelMap50, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_LabelMap50, "50");
|
||||
lv_obj_set_style_text_color(ui_LabelMap50, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelMap50, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelMap50, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelMap0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelMap0, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelMap0, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelMap0, -95);
|
||||
lv_obj_set_y(ui_LabelMap0, 188);
|
||||
lv_obj_set_align(ui_LabelMap0, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_LabelMap0, "0");
|
||||
lv_obj_set_style_text_color(ui_LabelMap0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelMap0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelMap0, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelOil0 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelOil0, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelOil0, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelOil0, -207);
|
||||
lv_obj_set_y(ui_LabelOil0, 68);
|
||||
lv_obj_set_align(ui_LabelOil0, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelOil0, "0");
|
||||
lv_obj_set_style_text_color(ui_LabelOil0, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelOil0, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelOil0, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelOil25 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelOil25, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelOil25, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelOil25, -105);
|
||||
lv_obj_set_y(ui_LabelOil25, 68);
|
||||
lv_obj_set_align(ui_LabelOil25, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelOil25, "2.5");
|
||||
lv_obj_set_style_text_color(ui_LabelOil25, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelOil25, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelOil25, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelOil5 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelOil5, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelOil5, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelOil5, -17);
|
||||
lv_obj_set_y(ui_LabelOil5, 68);
|
||||
lv_obj_set_align(ui_LabelOil5, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelOil5, "5");
|
||||
lv_obj_set_style_text_color(ui_LabelOil5, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelOil5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelOil5, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelFuelP1 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelFuelP1, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelFuelP1, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelFuelP1, -212);
|
||||
lv_obj_set_y(ui_LabelFuelP1, 148);
|
||||
lv_obj_set_align(ui_LabelFuelP1, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelFuelP1, "1");
|
||||
lv_obj_set_style_text_color(ui_LabelFuelP1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelFuelP1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelFuelP1, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelFuelP3 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelFuelP3, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelFuelP3, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelFuelP3, -110);
|
||||
lv_obj_set_y(ui_LabelFuelP3, 148);
|
||||
lv_obj_set_align(ui_LabelFuelP3, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelFuelP3, "3");
|
||||
lv_obj_set_style_text_color(ui_LabelFuelP3, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelFuelP3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelFuelP3, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelFuelP5 = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelFuelP5, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelFuelP5, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelFuelP5, -17);
|
||||
lv_obj_set_y(ui_LabelFuelP5, 148);
|
||||
lv_obj_set_align(ui_LabelFuelP5, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelFuelP5, "5");
|
||||
lv_obj_set_style_text_color(ui_LabelFuelP5, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelFuelP5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelFuelP5, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelFuelLevelF = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelFuelLevelF, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelFuelLevelF, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelFuelLevelF, -16);
|
||||
lv_obj_set_y(ui_LabelFuelLevelF, 228);
|
||||
lv_obj_set_align(ui_LabelFuelLevelF, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelFuelLevelF, "f");
|
||||
lv_obj_set_style_text_color(ui_LabelFuelLevelF, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelFuelLevelF, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelFuelLevelF, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelFuelLevelH = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelFuelLevelH, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelFuelLevelH, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelFuelLevelH, -111);
|
||||
lv_obj_set_y(ui_LabelFuelLevelH, 228);
|
||||
lv_obj_set_align(ui_LabelFuelLevelH, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelFuelLevelH, "h");
|
||||
lv_obj_set_style_text_color(ui_LabelFuelLevelH, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelFuelLevelH, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelFuelLevelH, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_LabelFuelLevelE = lv_label_create(ui_mainScreen);
|
||||
lv_obj_set_width(ui_LabelFuelLevelE, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_LabelFuelLevelE, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_LabelFuelLevelE, -207);
|
||||
lv_obj_set_y(ui_LabelFuelLevelE, 228);
|
||||
lv_obj_set_align(ui_LabelFuelLevelE, LV_ALIGN_RIGHT_MID);
|
||||
lv_label_set_text(ui_LabelFuelLevelE, "e");
|
||||
lv_obj_set_style_text_color(ui_LabelFuelLevelE, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_LabelFuelLevelE, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_LabelFuelLevelE, &ui_font_FontIndicatorLabel, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
lv_obj_add_event_cb(ui_mainScreen, ui_event_mainScreen, LV_EVENT_ALL, NULL);
|
||||
|
||||
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 179 KiB |
Binary file not shown.
After Width: | Height: | Size: 203 KiB |
Loading…
Reference in New Issue