Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
2c5c7c74
Commit
2c5c7c74
authored
11 months ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Add support for umonitor.ini (with fallback to uifc.ini)
... for uifc/ciolib settings And make default video mode LCD 80x25
parent
05836ccf
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!455
Update branch with changes from master
Pipeline
#6440
passed
11 months ago
Stage: build
Stage: test
Stage: cleanup
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/umonitor/umonitor.c
+13
-0
13 additions, 0 deletions
src/sbbs3/umonitor/umonitor.c
with
13 additions
and
0 deletions
src/sbbs3/umonitor/umonitor.c
+
13
−
0
View file @
2c5c7c74
...
@@ -53,6 +53,7 @@ const char *YesStr="Yes";
...
@@ -53,6 +53,7 @@ const char *YesStr="Yes";
const
char
*
NoStr
=
"No"
;
const
char
*
NoStr
=
"No"
;
char
app_title
[
128
];
char
app_title
[
128
];
int
ciolib_mode
=
CIOLIB_MODE_AUTO
;
int
ciolib_mode
=
CIOLIB_MODE_AUTO
;
enum
text_modes
video_mode
=
LCD80X25
;
int
lprintf
(
char
*
fmt
,
...)
int
lprintf
(
char
*
fmt
,
...)
{
{
...
@@ -810,6 +811,16 @@ int edit_can(scfg_t *cfg)
...
@@ -810,6 +811,16 @@ int edit_can(scfg_t *cfg)
return
(
0
);
return
(
0
);
}
}
void
read_umonitor_ini
(
const
char
*
ctrl_dir
)
{
char
path
[
MAX_PATH
+
1
];
snprintf
(
path
,
sizeof
path
,
"%s/umonitor.ini"
,
ctrl_dir
);
if
(
!
fexist
(
path
))
snprintf
(
path
,
sizeof
path
,
"%s/uifc.ini"
,
ctrl_dir
);
read_uifc_ini
(
path
,
&
uifc
,
&
ciolib_mode
,
&
video_mode
);
}
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
char
**
opt
;
char
**
opt
;
...
@@ -884,6 +895,7 @@ int main(int argc, char** argv) {
...
@@ -884,6 +895,7 @@ int main(int argc, char** argv) {
memset
(
&
uifc
,
0
,
sizeof
(
uifc
));
memset
(
&
uifc
,
0
,
sizeof
(
uifc
));
uifc
.
mode
|=
UIFC_NOCTRL
;
uifc
.
mode
|=
UIFC_NOCTRL
;
read_umonitor_ini
(
cfg
.
ctrl_dir
);
uifc
.
esc_delay
=
500
;
uifc
.
esc_delay
=
500
;
...
@@ -982,6 +994,7 @@ USAGE:
...
@@ -982,6 +994,7 @@ USAGE:
#endif
#endif
uifc
.
size
=
sizeof
(
uifc
);
uifc
.
size
=
sizeof
(
uifc
);
ciolib_initial_mode
=
video_mode
;
i
=
initciolib
(
ciolib_mode
);
i
=
initciolib
(
ciolib_mode
);
if
(
i
!=
0
)
{
if
(
i
!=
0
)
{
printf
(
"ciolib library init returned error %d
\n
"
,
i
);
printf
(
"ciolib library init returned error %d
\n
"
,
i
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment