Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Merge requests
!127
epicardium: BLE opt in
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
epicardium: BLE opt in
koalo/bleoptin
into
master
Overview
3
Commits
2
Pipelines
6
Changes
7
Merged
koalo
requested to merge
koalo/bleoptin
into
master
5 years ago
Overview
3
Commits
2
Pipelines
6
Changes
2
Expand
0
0
Merge request reports
Compare
version 3
version 6
07a0b224
5 years ago
version 5
a14ac0d7
5 years ago
version 4
fb0c186d
5 years ago
version 3
f94b77a3
5 years ago
version 2
a7503e38
5 years ago
version 1
e5becea3
5 years ago
master (base)
and
version 4
latest version
07a0b224
2 commits,
5 years ago
version 6
07a0b224
2 commits,
5 years ago
version 5
a14ac0d7
2 commits,
5 years ago
version 4
fb0c186d
2 commits,
5 years ago
version 3
f94b77a3
2 commits,
5 years ago
version 2
a7503e38
1 commit,
5 years ago
version 1
e5becea3
1 commit,
5 years ago
Show latest version
2 files
+
22
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
epicardium/main.c
+
15
−
6
Options
@@ -18,16 +18,22 @@ int bleShallStart(void)
{
int
bleConfigFile
=
epic_file_open
(
"ble.txt"
,
"r"
);
if
(
bleConfigFile
<
0
)
{
LOG_INFO
(
"startup"
,
"can not open ble.txt -> BLE is not started"
);
LOG_INFO
(
"startup"
,
"can not open ble.txt -> BLE is not started"
);
epic_file_close
(
bleConfigFile
);
return
0
;
}
char
cfgBuf
[
BLEMAXCFGBYTES
+
1
];
char
cfgBuf
[
BLEMAXCFGBYTES
+
1
];
int
readNum
=
epic_file_read
(
bleConfigFile
,
cfgBuf
,
BLEMAXCFGBYTES
);
LOG_INFO
(
"startup"
,
"readNum %i"
,
readNum
);
if
(
readNum
<
0
)
{
LOG_INFO
(
"startup"
,
"can not read ble.txt -> BLE is not started"
);
LOG_INFO
(
"startup"
,
"can not read ble.txt -> BLE is not started"
);
epic_file_close
(
bleConfigFile
);
return
0
;
}
@@ -35,12 +41,15 @@ int bleShallStart(void)
LOG_INFO
(
"startup"
,
"faa %s"
,
cfgBuf
);
char
bleActiveStr
[]
=
"active=true"
;
cfgBuf
[
sizeof
(
bleActiveStr
)
-
1
]
=
'\0'
;
char
bleActiveStr
[]
=
"active=true"
;
cfgBuf
[
sizeof
(
bleActiveStr
)
-
1
]
=
'\0'
;
LOG_INFO
(
"startup"
,
"foe %i %s"
,
sizeof
(
bleActiveStr
),
cfgBuf
);
if
(
strcmp
(
cfgBuf
,
"active=true"
)
!=
0
)
{
LOG_INFO
(
"startup"
,
"ble.txt is not
\"
active=true
\"
-> BLE is not started"
);
LOG_INFO
(
"startup"
,
"ble.txt is not
\"
active=true
\"
-> BLE is not started"
);
epic_file_close
(
bleConfigFile
);
return
0
;
}
Loading