Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picsimlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
picsimlab
Commits
6c1b4ecf
Commit
6c1b4ecf
authored
Mar 02, 2024
by
lcgamboa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Fix support to multi byte char in command line file name
parent
dec4aa2f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
10 deletions
+26
-10
VERSION
VERSION
+1
-1
bscripts/build_flatpak.sh
bscripts/build_flatpak.sh
+1
-1
package/com.github.lcgamboa.picsimlab/com.github.lcgamboa.picsimlab.yaml
...hub.lcgamboa.picsimlab/com.github.lcgamboa.picsimlab.yaml
+1
-1
src/devices/lcd_hd44780.cc
src/devices/lcd_hd44780.cc
+1
-1
src/lib/spareparts.cc
src/lib/spareparts.cc
+1
-1
src/picsimlab1.cc
src/picsimlab1.cc
+21
-5
No files found.
VERSION
View file @
6c1b4ecf
...
@@ -2,5 +2,5 @@ PACKAGE=picsimlab
...
@@ -2,5 +2,5 @@ PACKAGE=picsimlab
MAINVER=0
MAINVER=0
MINORVER=9
MINORVER=9
VERSION=0.9.2
VERSION=0.9.2
DATE=240
224
DATE=240
302
VERSION_STABLE=0.9.1
VERSION_STABLE=0.9.1
bscripts/build_flatpak.sh
View file @
6c1b4ecf
...
@@ -9,7 +9,7 @@ cl sudo apt-get -y upgrade
...
@@ -9,7 +9,7 @@ cl sudo apt-get -y upgrade
cl
sudo
apt-get
-y
install
flatpak flatpak-builder bzip2
cl
sudo
apt-get
-y
install
flatpak flatpak-builder bzip2
flatpak
--user
remote-add
--if-not-exists
flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak
--user
remote-add
--if-not-exists
flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak
--user
install
flathub org.freedesktop.Platform//2
1.08 org.freedesktop.Sdk//21
.08
-y
flatpak
--user
install
flathub org.freedesktop.Platform//2
2.08 org.freedesktop.Sdk//22
.08
-y
#VERSION="${VERSION_STABLE}"
#VERSION="${VERSION_STABLE}"
VERSION
=
"
${
VERSION
}
_
${
DATE
}
"
VERSION
=
"
${
VERSION
}
_
${
DATE
}
"
...
...
package/com.github.lcgamboa.picsimlab/com.github.lcgamboa.picsimlab.yaml
View file @
6c1b4ecf
app-id
:
com.github.lcgamboa.picsimlab
app-id
:
com.github.lcgamboa.picsimlab
runtime
:
org.freedesktop.Platform
runtime
:
org.freedesktop.Platform
runtime-version
:
'
2
1
.08'
runtime-version
:
'
2
2
.08'
sdk
:
org.freedesktop.Sdk
sdk
:
org.freedesktop.Sdk
command
:
picsimlab
command
:
picsimlab
rename-desktop-file
:
picsimlab.desktop
rename-desktop-file
:
picsimlab.desktop
...
...
src/devices/lcd_hd44780.cc
View file @
6c1b4ecf
...
@@ -442,7 +442,7 @@ void lcd_data(lcd_t* lcd, char data) {
...
@@ -442,7 +442,7 @@ void lcd_data(lcd_t* lcd, char data) {
}
}
unsigned
char
lcd_read_busyf_acounter
(
lcd_t
*
lcd
)
{
unsigned
char
lcd_read_busyf_acounter
(
lcd_t
*
lcd
)
{
// busy flag aways 0
// busy flag a
l
ways 0
unsigned
char
status
=
(
0x7F
&
lcd
->
addr_counter
);
unsigned
char
status
=
(
0x7F
&
lcd
->
addr_counter
);
// switch betwwen 8 or 4 bits communication
// switch betwwen 8 or 4 bits communication
...
...
src/lib/spareparts.cc
View file @
6c1b4ecf
...
@@ -327,7 +327,7 @@ bool CSpareParts::LoadPinAlias(std::string fname, unsigned char show_error_msg)
...
@@ -327,7 +327,7 @@ bool CSpareParts::LoadPinAlias(std::string fname, unsigned char show_error_msg)
bool
CSpareParts
::
LoadConfig
(
std
::
string
fname
,
const
int
disable_debug
)
{
bool
CSpareParts
::
LoadConfig
(
std
::
string
fname
,
const
int
disable_debug
)
{
char
name
[
256
];
char
name
[
256
];
char
temp
[
4096
];
char
temp
[
4096
];
unsigned
int
x
,
y
;
int
x
,
y
;
int
orient
;
int
orient
;
std
::
vector
<
std
::
string
>
prefs
;
std
::
vector
<
std
::
string
>
prefs
;
int
newformat
=
0
;
int
newformat
=
0
;
...
...
src/picsimlab1.cc
View file @
6c1b4ecf
...
@@ -792,7 +792,11 @@ void CPWindow1::_EvOnCreate(CControl* control) {
...
@@ -792,7 +792,11 @@ void CPWindow1::_EvOnCreate(CControl* control) {
printf
(
"PICSimLab: Command Line: "
);
printf
(
"PICSimLab: Command Line: "
);
for
(
int
i
=
0
;
i
<
Application
->
Aargc
;
i
++
)
{
for
(
int
i
=
0
;
i
<
Application
->
Aargc
;
i
++
)
{
#ifdef wxUSE_UNICODE
printf
(
"%s "
,
(
const
char
*
)
lxString
(
Application
->
Aargvw
[
i
]).
utf8_str
());
#else
printf
(
"%s "
,
Application
->
Aargv
[
i
]);
printf
(
"%s "
,
Application
->
Aargv
[
i
]);
#endif
}
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
...
@@ -808,35 +812,47 @@ void CPWindow1::_EvOnCreate(CControl* control) {
...
@@ -808,35 +812,47 @@ void CPWindow1::_EvOnCreate(CControl* control) {
std
::
string
(
fname_error
)
+
std
::
string
(
fname_error
)
+
"
\n
If the problem persists, please consider opening an issue on github.
\n
"
);
"
\n
If the problem persists, please consider opening an issue on github.
\n
"
);
}
else
if
(
Application
->
Aargc
==
2
)
{
// only .pzw file
}
else
if
(
Application
->
Aargc
==
2
)
{
// only .pzw file
#ifdef wxUSE_UNICODE
fn
.
Assign
(
Application
->
Aargvw
[
1
]);
#else
fn
.
Assign
(
Application
->
Aargv
[
1
]);
fn
.
Assign
(
Application
->
Aargv
[
1
]);
#endif
fn
.
MakeAbsolute
();
fn
.
MakeAbsolute
();
// load options
// load options
PICSimLab
.
Configure
(
home
,
1
,
1
);
PICSimLab
.
Configure
(
home
,
1
,
1
);
// check if it is a demonstration
// check if it is a demonstration
std
::
string
fns
=
(
const
char
*
)
fn
.
GetFullPath
().
c
_str
();
std
::
string
fns
=
(
const
char
*
)
fn
.
GetFullPath
().
utf8
_str
();
lxFileName
fn_dir
;
lxFileName
fn_dir
;
fn_dir
.
Assign
(
PICSimLab
.
GetSharePath
()
+
"boards/"
);
fn_dir
.
Assign
(
PICSimLab
.
GetSharePath
()
+
"boards/"
);
fn_dir
.
MakeAbsolute
();
fn_dir
.
MakeAbsolute
();
if
((
fns
.
find
(
fn_dir
.
GetFullPath
())
!=
std
::
string
::
npos
)
&&
(
fns
.
find
(
"demo.pzw"
)
!=
std
::
string
::
npos
))
{
if
((
fns
.
find
(
fn_dir
.
GetFullPath
())
!=
std
::
string
::
npos
)
&&
(
fns
.
find
(
"demo.pzw"
)
!=
std
::
string
::
npos
))
{
PICSimLab
.
LoadWorkspace
((
const
char
*
)
fn
.
GetFullPath
().
c
_str
(),
0
);
PICSimLab
.
LoadWorkspace
((
const
char
*
)
fn
.
GetFullPath
().
utf8
_str
(),
0
);
PICSimLab
.
SetWorkspaceFileName
(
""
);
PICSimLab
.
SetWorkspaceFileName
(
""
);
}
else
{
}
else
{
PICSimLab
.
LoadWorkspace
((
const
char
*
)
fn
.
GetFullPath
().
c
_str
());
PICSimLab
.
LoadWorkspace
((
const
char
*
)
fn
.
GetFullPath
().
utf8
_str
());
}
}
}
else
if
((
Application
->
Aargc
>=
3
)
&&
(
Application
->
Aargc
<=
5
))
{
}
else
if
((
Application
->
Aargc
>=
3
)
&&
(
Application
->
Aargc
<=
5
))
{
// arguments: Board Processor File.hex(.bin) file.pcf
// arguments: Board Processor File.hex(.bin) file.pcf
if
(
Application
->
Aargc
>=
4
)
{
if
(
Application
->
Aargc
>=
4
)
{
#ifdef wxUSE_UNICODE
fn
.
Assign
(
Application
->
Aargvw
[
3
]);
#else
fn
.
Assign
(
Application
->
Aargv
[
3
]);
fn
.
Assign
(
Application
->
Aargv
[
3
]);
#endif
fn
.
MakeAbsolute
();
fn
.
MakeAbsolute
();
}
}
if
(
Application
->
Aargc
==
5
)
{
if
(
Application
->
Aargc
==
5
)
{
#ifdef wxUSE_UNICODE
fn_spare
.
Assign
(
Application
->
Aargvw
[
4
]);
#else
fn_spare
.
Assign
(
Application
->
Aargv
[
4
]);
fn_spare
.
Assign
(
Application
->
Aargv
[
4
]);
#endif
fn_spare
.
MakeAbsolute
();
fn_spare
.
MakeAbsolute
();
}
}
...
@@ -870,9 +886,9 @@ void CPWindow1::_EvOnCreate(CControl* control) {
...
@@ -870,9 +886,9 @@ void CPWindow1::_EvOnCreate(CControl* control) {
// search for file name
// search for file name
if
(
Application
->
Aargc
>=
4
)
{
if
(
Application
->
Aargc
>=
4
)
{
// load options
// load options
PICSimLab
.
Configure
(
home
,
0
,
1
,
(
const
char
*
)
fn
.
GetFullPath
().
c
_str
());
PICSimLab
.
Configure
(
home
,
0
,
1
,
(
const
char
*
)
fn
.
GetFullPath
().
utf8
_str
());
if
(
Application
->
Aargc
==
5
)
{
if
(
Application
->
Aargc
==
5
)
{
SpareParts
.
LoadConfig
((
const
char
*
)
fn_spare
.
GetFullPath
().
c
_str
());
SpareParts
.
LoadConfig
((
const
char
*
)
fn_spare
.
GetFullPath
().
utf8
_str
());
}
}
}
else
{
}
else
{
// load options
// load options
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment