Skip to content
Snippets Groups Projects
Commit 1bece87f authored by minute's avatar minute
Browse files

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
...@@ -76,6 +76,11 @@ int remote_try_wakeup(void) { ...@@ -76,6 +76,11 @@ int remote_try_wakeup(void) {
int ok = 0; int ok = 0;
char buf[64]; char buf[64];
#ifdef KBD_VARIANT_STANDALONE
// there's no remote
return 0;
#endif
for (int i=0; i<1000; i++) { for (int i=0; i<1000; i++) {
if (i%10 == 0) { if (i%10 == 0) {
gfx_clear(); gfx_clear();
...@@ -107,6 +112,11 @@ int remote_try_wakeup(void) { ...@@ -107,6 +112,11 @@ int remote_try_wakeup(void) {
int remote_try_command(char* cmd, int print_response) { int remote_try_command(char* cmd, int print_response) {
int ok = 0; int ok = 0;
#ifdef KBD_VARIANT_STANDALONE
// there's no remote
return 0;
#endif
empty_serial(); empty_serial();
for (int tries=0; tries<2; tries++) { for (int tries=0; tries<2; tries++) {
for (int i=0; i<strlen(cmd); i++) { for (int i=0; i<strlen(cmd); i++) {
...@@ -282,7 +292,7 @@ int remote_check_for_low_battery(void) { ...@@ -282,7 +292,7 @@ int remote_check_for_low_battery(void) {
remote_som_power_expected_state = is_computer_on; remote_som_power_expected_state = is_computer_on;
} }
} }
return ok; return ok;
} }
...@@ -310,7 +320,7 @@ int remote_turn_on_som(void) { ...@@ -310,7 +320,7 @@ int remote_turn_on_som(void) {
// FIXME what is remote_som_power_expected_state? // FIXME what is remote_som_power_expected_state?
return ok; return ok;
} }
remote_som_power_expected_state = 1; remote_som_power_expected_state = 1;
return ok; return ok;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment