summaryrefslogtreecommitdiff
path: root/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c')
-rw-r--r--firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c b/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c
index 511a5518ff..34b114910a 100644
--- a/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c
+++ b/firmware/target/arm/olympus/mrobe-100/lcd-remote-mr100.c
@@ -500,14 +500,14 @@ void lcd_remote_off(void)
500 500
501void lcd_remote_on(void) 501void lcd_remote_on(void)
502{ 502{
503 /* Only wake the remote thread if it's in the blocked state. */ 503 if (semaphore_wait(&rc_thread_wakeup, 0) == OBJ_WAIT_TIMEDOUT ||
504 struct thread_entry *rc_thread = thread_id_entry(remote_thread_id); 504 (rc_status & RC_FORCE_DETECT))
505 if (rc_thread->state == STATE_BLOCKED || (rc_status & RC_FORCE_DETECT))
506 { 505 {
507 rc_status &= ~RC_FORCE_DETECT; 506 rc_status &= ~RC_FORCE_DETECT;
508 rc_status &= ~RC_POWER_OFF; 507 rc_status &= ~RC_POWER_OFF;
509 semaphore_release(&rc_thread_wakeup);
510 } 508 }
509
510 semaphore_release(&rc_thread_wakeup);
511} 511}
512 512
513bool remote_detect(void) 513bool remote_detect(void)