Skip to content

Commit 9b21428

Browse files
committed
jpeg decoder
1 parent 65d04e5 commit 9b21428

32 files changed

+1968
-2215
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,12 @@ list (APPEND header_files ${header_eez_libs_sd_fat})
362362
source_group("eez\\libs\\sd_fat" FILES ${src_eez_libs_sd_fat} ${header_eez_libs_sd_fat})
363363

364364
set(src_eez_libs_image
365-
src/eez/libs/image/jpeg_encode.cpp
365+
src/eez/libs/image/jpeg.cpp
366366
src/eez/libs/image/toojpeg.cpp
367367
)
368368
list (APPEND src_files ${src_eez_libs_image})
369369
set(header_eez_libs_image
370-
src/eez/libs/image/jpeg_encode.h
370+
src/eez/libs/image/jpeg.h
371371
src/eez/libs/image/toojpeg.h
372372
)
373373
list (APPEND header_files ${src_eez_libs_image})
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "EEZ BB3 Simulator"
5+
#define MyAppVersion "1.0.3"
6+
#define MyAppPublisher "Envox d.o.o."
7+
#define MyAppURL "https://www.envox.hr/eez/eez-bench-box-3/introduction.html"
8+
#define MyAppExeName "modular-psu-firmware.exe"
9+
10+
[Setup]
11+
; NOTE: The value of AppId uniquely identifies this application.
12+
; Do not use the same AppId value in installers for other applications.
13+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
14+
AppId={{2bf16522-4e85-4549-9cca-bdd150296310}
15+
AppName={#MyAppName}
16+
AppVersion={#MyAppVersion}
17+
;AppVerName={#MyAppName} {#MyAppVersion}
18+
AppPublisher={#MyAppPublisher}
19+
AppPublisherURL={#MyAppURL}
20+
AppSupportURL={#MyAppURL}
21+
AppUpdatesURL={#MyAppURL}
22+
DefaultDirName={pf}\{#MyAppName}
23+
DefaultGroupName={#MyAppName}
24+
AllowNoIcons=yes
25+
LicenseFile=..\LICENSE.TXT
26+
OutputDir=.\win32\Installation
27+
OutputBaseFilename=setup
28+
Compression=lzma
29+
SolidCompression=yes
30+
AppIcon=..\images\eez.ico
31+
32+
[Languages]
33+
Name: "english"; MessagesFile: "compiler:Default.isl"
34+
35+
[Tasks]
36+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
37+
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
38+
39+
[Files]
40+
Source: ".\win32\Debug\modular-psu-firmware.exe"; DestDir: "{app}"; Flags: ignoreversion
41+
Source: ".\win32\Debug\libjpeg-9.dll"; DestDir: "{app}"; Flags: ignoreversion
42+
Source: ".\win32\Debug\libpng16-16.dll"; DestDir: "{app}"; Flags: ignoreversion
43+
Source: ".\win32\Debug\libtiff-5.dll"; DestDir: "{app}"; Flags: ignoreversion
44+
Source: ".\win32\Debug\libwebp-7.dll"; DestDir: "{app}"; Flags: ignoreversion
45+
Source: ".\win32\Debug\SDL2.dll"; DestDir: "{app}"; Flags: ignoreversion
46+
Source: ".\win32\Debug\SDL2_image.dll"; DestDir: "{app}"; Flags: ignoreversion
47+
Source: ".\win32\Debug\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion
48+
Source: "..\images\eez.png"; DestDir: "{app}\images"; Flags: ignoreversion recursesubdirs createallsubdirs
49+
Source: "..\docs\SCPI reference guide\EEZ BB3 SCPI reference guide.pdf"; DestDir: "{app}"; Flags: ignoreversion
50+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
51+
52+
[Icons]
53+
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
54+
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
55+
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
56+
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
57+
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
58+
59+
[Run]
60+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
61+
Filename: "{app}\EEZ BB3 SCPI reference guide.pdf"; Description: "Display SCPI reference guide"; Flags: shellexec runasoriginaluser postinstall skipifsilent

modular-psu-firmware.eez-project

Lines changed: 162 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,11 @@
20112011
"name": "file_manager_delete_file_enabled",
20122012
"type": "boolean",
20132013
"defaultValue": "1"
2014+
},
2015+
{
2016+
"name": "file_manager_opened_image",
2017+
"type": "integer",
2018+
"defaultValue": "0"
20142019
}
20152020
],
20162021
"actions": [
@@ -43011,30 +43016,62 @@
4301143016
"name": "Status line",
4301243017
"widgets": [
4301343018
{
43014-
"type": "Text",
43019+
"type": "Select",
4301543020
"style": {
43016-
"inheritFrom": "status_bgnd",
43017-
"font": "Heydings14",
43018-
"alignVertical": "center",
43019-
"color": "status_line_text",
43020-
"backgroundColor": "status_line_background",
43021-
"activeColor": "status_line_background",
43022-
"activeBackgroundColor": "status_line_text"
43021+
"inheritFrom": "default"
4302343022
},
43024-
"action": "show_main_page",
43023+
"data": "is_show_latest_recording",
4302543024
"left": 0,
4302643025
"top": 0,
43027-
"width": 41,
43026+
"width": 40,
4302843027
"height": 32,
43029-
"text": "H",
43030-
"focusStyle": {}
43028+
"widgets": [
43029+
{
43030+
"type": "Text",
43031+
"style": {
43032+
"inheritFrom": "status_bgnd",
43033+
"font": "Heydings14",
43034+
"alignVertical": "center",
43035+
"color": "status_line_text",
43036+
"backgroundColor": "status_line_background",
43037+
"activeColor": "status_line_background",
43038+
"activeBackgroundColor": "status_line_text"
43039+
},
43040+
"action": "show_previous_page",
43041+
"left": 0,
43042+
"top": 0,
43043+
"width": 40,
43044+
"height": 32,
43045+
"text": "E",
43046+
"focusStyle": {}
43047+
},
43048+
{
43049+
"type": "Text",
43050+
"style": {
43051+
"inheritFrom": "status_bgnd",
43052+
"font": "Heydings14",
43053+
"alignVertical": "center",
43054+
"color": "status_line_text",
43055+
"backgroundColor": "status_line_background",
43056+
"activeColor": "status_line_background",
43057+
"activeBackgroundColor": "status_line_text"
43058+
},
43059+
"action": "show_main_page",
43060+
"left": 0,
43061+
"top": 0,
43062+
"width": 40,
43063+
"height": 32,
43064+
"text": "H",
43065+
"focusStyle": {}
43066+
}
43067+
]
4303143068
},
4303243069
{
4303343070
"type": "Rectangle",
4303443071
"style": {
4303543072
"inheritFrom": "status_bgnd"
4303643073
},
43037-
"left": 41,
43074+
"left": 40,
4303843075
"top": 0,
4303943076
"width": 438,
4304043077
"height": 32,
@@ -43079,30 +43116,62 @@
4307943116
"name": "Status line",
4308043117
"widgets": [
4308143118
{
43082-
"type": "Text",
43119+
"type": "Select",
4308343120
"style": {
43084-
"inheritFrom": "status_bgnd",
43085-
"font": "Heydings14",
43086-
"alignVertical": "center",
43087-
"color": "status_line_text",
43088-
"backgroundColor": "status_line_background",
43089-
"activeColor": "status_line_background",
43090-
"activeBackgroundColor": "status_line_text"
43121+
"inheritFrom": "default"
4309143122
},
43092-
"action": "show_main_page",
43123+
"data": "is_show_latest_recording",
4309343124
"left": 0,
4309443125
"top": 0,
43095-
"width": 41,
43126+
"width": 40,
4309643127
"height": 32,
43097-
"text": "H",
43098-
"focusStyle": {}
43128+
"widgets": [
43129+
{
43130+
"type": "Text",
43131+
"style": {
43132+
"inheritFrom": "status_bgnd",
43133+
"font": "Heydings14",
43134+
"alignVertical": "center",
43135+
"color": "status_line_text",
43136+
"backgroundColor": "status_line_background",
43137+
"activeColor": "status_line_background",
43138+
"activeBackgroundColor": "status_line_text"
43139+
},
43140+
"action": "show_previous_page",
43141+
"left": 0,
43142+
"top": 0,
43143+
"width": 40,
43144+
"height": 32,
43145+
"text": "E",
43146+
"focusStyle": {}
43147+
},
43148+
{
43149+
"type": "Text",
43150+
"style": {
43151+
"inheritFrom": "status_bgnd",
43152+
"font": "Heydings14",
43153+
"alignVertical": "center",
43154+
"color": "status_line_text",
43155+
"backgroundColor": "status_line_background",
43156+
"activeColor": "status_line_background",
43157+
"activeBackgroundColor": "status_line_text"
43158+
},
43159+
"action": "show_main_page",
43160+
"left": 0,
43161+
"top": 0,
43162+
"width": 40,
43163+
"height": 32,
43164+
"text": "H",
43165+
"focusStyle": {}
43166+
}
43167+
]
4309943168
},
4310043169
{
4310143170
"type": "Rectangle",
4310243171
"style": {
4310343172
"inheritFrom": "status_bgnd"
4310443173
},
43105-
"left": 41,
43174+
"left": 40,
4310643175
"top": 0,
4310743176
"width": 438,
4310843177
"height": 32,
@@ -43149,30 +43218,62 @@
4314943218
"name": "Status line",
4315043219
"widgets": [
4315143220
{
43152-
"type": "Text",
43221+
"type": "Select",
4315343222
"style": {
43154-
"inheritFrom": "status_bgnd",
43155-
"font": "Heydings14",
43156-
"alignVertical": "center",
43157-
"color": "status_line_text",
43158-
"backgroundColor": "status_line_background",
43159-
"activeColor": "status_line_background",
43160-
"activeBackgroundColor": "status_line_text"
43223+
"inheritFrom": "default"
4316143224
},
43162-
"action": "show_main_page",
43225+
"data": "is_show_latest_recording",
4316343226
"left": 0,
4316443227
"top": 0,
43165-
"width": 41,
43228+
"width": 40,
4316643229
"height": 32,
43167-
"text": "H",
43168-
"focusStyle": {}
43230+
"widgets": [
43231+
{
43232+
"type": "Text",
43233+
"style": {
43234+
"inheritFrom": "status_bgnd",
43235+
"font": "Heydings14",
43236+
"alignVertical": "center",
43237+
"color": "status_line_text",
43238+
"backgroundColor": "status_line_background",
43239+
"activeColor": "status_line_background",
43240+
"activeBackgroundColor": "status_line_text"
43241+
},
43242+
"action": "show_previous_page",
43243+
"left": 0,
43244+
"top": 0,
43245+
"width": 40,
43246+
"height": 32,
43247+
"text": "E",
43248+
"focusStyle": {}
43249+
},
43250+
{
43251+
"type": "Text",
43252+
"style": {
43253+
"inheritFrom": "status_bgnd",
43254+
"font": "Heydings14",
43255+
"alignVertical": "center",
43256+
"color": "status_line_text",
43257+
"backgroundColor": "status_line_background",
43258+
"activeColor": "status_line_background",
43259+
"activeBackgroundColor": "status_line_text"
43260+
},
43261+
"action": "show_main_page",
43262+
"left": 0,
43263+
"top": 0,
43264+
"width": 40,
43265+
"height": 32,
43266+
"text": "H",
43267+
"focusStyle": {}
43268+
}
43269+
]
4316943270
},
4317043271
{
4317143272
"type": "Rectangle",
4317243273
"style": {
4317343274
"inheritFrom": "status_bgnd"
4317443275
},
43175-
"left": 41,
43276+
"left": 40,
4317643277
"top": 0,
4317743278
"width": 438,
4317843279
"height": 32,
@@ -43818,6 +43919,28 @@
4381843919
"width": 480,
4381943920
"height": 272
4382043921
},
43922+
{
43923+
"name": "image_view",
43924+
"style": "default",
43925+
"widgets": [
43926+
{
43927+
"type": "Bitmap",
43928+
"style": {
43929+
"inheritFrom": "default"
43930+
},
43931+
"data": "file_manager_opened_image",
43932+
"action": "show_previous_page",
43933+
"left": 0,
43934+
"top": 0,
43935+
"width": 480,
43936+
"height": 272
43937+
}
43938+
],
43939+
"left": 0,
43940+
"top": 0,
43941+
"width": 480,
43942+
"height": 272
43943+
},
4382143944
{
4382243945
"name": "dlog_params",
4382343946
"style": "default",

src/eez/gui/data.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,24 @@ Value getEditValue(const Cursor &cursor, uint16_t id) {
610610
return value;
611611
}
612612

613+
uint16_t getBitmapWidth(const Cursor &cursor, uint16_t id) {
614+
Value value;
615+
g_dataOperationsFunctions[id](data::DATA_OPERATION_GET_BITMAP_WIDTH, (Cursor &)cursor, value);
616+
return value.getUInt16();
617+
}
618+
619+
uint16_t getBitmapHeight(const Cursor &cursor, uint16_t id) {
620+
Value value;
621+
g_dataOperationsFunctions[id](data::DATA_OPERATION_GET_BITMAP_HEIGHT, (Cursor &)cursor, value);
622+
return value.getUInt16();
623+
}
624+
625+
Value getBitmapPixels(const Cursor &cursor, uint16_t id) {
626+
Value value;
627+
g_dataOperationsFunctions[id](data::DATA_OPERATION_GET_BITMAP_PIXELS, (Cursor &)cursor, value);
628+
return value;
629+
}
630+
613631
uint32_t ytDataGetRefreshCounter(const Cursor &cursor, uint16_t id) {
614632
Value value;
615633
g_dataOperationsFunctions[id](data::DATA_OPERATION_YT_DATA_GET_REFRESH_COUNTER, (Cursor &)cursor, value);

src/eez/gui/data.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,10 @@ uint16_t getActiveBackgroundColor(const Cursor &cursor, uint16_t id, const Style
394394
bool isBlinking(const Cursor &cursor, uint16_t id);
395395
Value getEditValue(const Cursor &cursor, uint16_t id);
396396

397+
uint16_t getBitmapWidth(const Cursor &cursor, uint16_t id);
398+
uint16_t getBitmapHeight(const Cursor &cursor, uint16_t id);
399+
Value getBitmapPixels(const Cursor &cursor, uint16_t id);
400+
397401
uint32_t ytDataGetRefreshCounter(const Cursor &cursor, uint16_t id);
398402
uint32_t ytDataGetSize(const Cursor &cursor, uint16_t id);
399403
uint32_t ytDataGetPosition(const Cursor &cursor, uint16_t id);

0 commit comments

Comments
 (0)