Shinichiro Nakamura
/
StarBoardOrangeExample2
StarBoard Orange - Example application No.2 (Version 0.0.4)
Revision 1:9370008ac96b, committed 2010-08-15
- Comitter:
- shintamainjp
- Date:
- Sun Aug 15 00:27:30 2010 +0000
- Parent:
- 0:5d79cd4ac81d
- Child:
- 2:d4625043c895
- Commit message:
Changed in this revision
RemoteIR/ReceiverIR.cpp | Show annotated file Show diff for this revision Revisions of this file |
RemoteIR/ReceiverIR.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
--- a/RemoteIR/ReceiverIR.h Fri Aug 13 11:25:40 2010 +0000 +++ b/RemoteIR/ReceiverIR.h 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/