Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: RemoteIR/ReceiverIR.cpp
- Revision:
- 1:9370008ac96b
- Parent:
- 0:5d79cd4ac81d
- Child:
- 2:d4625043c895
diff -r 5d79cd4ac81d -r 9370008ac96b RemoteIR/ReceiverIR.cpp
--- a/RemoteIR/ReceiverIR.cpp Fri Aug 13 11:25:40 2010 +0000
+++ b/RemoteIR/ReceiverIR.cpp Sun Aug 15 00:27:30 2010 +0000
@@ -1,5 +1,5 @@
/**
- * IR receiver (Version 0.0.1)
+ * IR receiver (Version 0.0.2)
*
* Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
* http://shinta.main.jp/
@@ -158,9 +158,14 @@
/*
* Typical length of AEHA is 48 bits.
* Please check a specification of your remote controller if you find a problem.
- */
+ */
if (48 <= data.bitcount) {
data.state = Received;
+ work.c1 = -1;
+ work.c2 = -1;
+ work.c3 = -1;
+ work.d1 = -1;
+ work.d2 = -1;
}
} else if (SONY == data.format) {
work.d1 = timer.read_us();
@@ -210,18 +215,17 @@
}
data.bitcount++;
/*
- * How do we get the correct length?
+ * How do we get the correct length? (12bits, 15bits, 20bits...)
* By a model only?
* Please check a specification of your remote controller if you find a problem.
*/
if (12 <= data.bitcount) {
data.state = Received;
- }
- if (15 <= data.bitcount) {
- data.state = Received;
- }
- if (20 <= data.bitcount) {
- data.state = Received;
+ work.c1 = -1;
+ work.c2 = -1;
+ work.c3 = -1;
+ work.d1 = -1;
+ work.d2 = -1;
}
}
break;