Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform
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
Service Desk
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
JC Staudt
reform
Commits
1bece87f
Commit
1bece87f
authored
3 years ago
by
minute
Browse files
Options
Downloads
Patches
Plain Diff
kbd: remote: don't try remote commands if we're standalone
parent
2c8312da
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reform2-keyboard-fw/remote.c
+12
-2
12 additions, 2 deletions
reform2-keyboard-fw/remote.c
with
12 additions
and
2 deletions
reform2-keyboard-fw/remote.c
+
12
−
2
View file @
1bece87f
...
...
@@ -76,6 +76,11 @@ int remote_try_wakeup(void) {
int
ok
=
0
;
char
buf
[
64
];
#ifdef KBD_VARIANT_STANDALONE
// there's no remote
return
0
;
#endif
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
if
(
i
%
10
==
0
)
{
gfx_clear
();
...
...
@@ -107,6 +112,11 @@ int remote_try_wakeup(void) {
int
remote_try_command
(
char
*
cmd
,
int
print_response
)
{
int
ok
=
0
;
#ifdef KBD_VARIANT_STANDALONE
// there's no remote
return
0
;
#endif
empty_serial
();
for
(
int
tries
=
0
;
tries
<
2
;
tries
++
)
{
for
(
int
i
=
0
;
i
<
strlen
(
cmd
);
i
++
)
{
...
...
@@ -282,7 +292,7 @@ int remote_check_for_low_battery(void) {
remote_som_power_expected_state
=
is_computer_on
;
}
}
return
ok
;
}
...
...
@@ -310,7 +320,7 @@ int remote_turn_on_som(void) {
// FIXME what is remote_som_power_expected_state?
return
ok
;
}
remote_som_power_expected_state
=
1
;
return
ok
;
}
...
...
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