JBBoardに接続したモーター2つをRCBControllerでコントロールするテストです。
Dependencies: FatFileSystem TB6612FNG2 mbed
Fork of JBB_BTLE_Test by
uvc/uvcsub.cpp@0:1ed23ab1345f, 2012-06-26 (annotated)
- Committer:
- va009039
- Date:
- Tue Jun 26 14:27:45 2012 +0000
- Revision:
- 0:1ed23ab1345f
fix overflow spp_service_buffer
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:1ed23ab1345f | 1 | #include "mbed.h" |
va009039 | 0:1ed23ab1345f | 2 | #include "uvc.h" |
va009039 | 0:1ed23ab1345f | 3 | |
va009039 | 0:1ed23ab1345f | 4 | void uvc::wait(float s) |
va009039 | 0:1ed23ab1345f | 5 | { |
va009039 | 0:1ed23ab1345f | 6 | Timer t; |
va009039 | 0:1ed23ab1345f | 7 | t.start(); |
va009039 | 0:1ed23ab1345f | 8 | while(t.read() < s) { |
va009039 | 0:1ed23ab1345f | 9 | poll(); |
va009039 | 0:1ed23ab1345f | 10 | } |
va009039 | 0:1ed23ab1345f | 11 | } |
va009039 | 0:1ed23ab1345f | 12 | |
va009039 | 0:1ed23ab1345f | 13 | void uvc::wait_ms(int ms) |
va009039 | 0:1ed23ab1345f | 14 | { |
va009039 | 0:1ed23ab1345f | 15 | Timer t; |
va009039 | 0:1ed23ab1345f | 16 | t.start(); |
va009039 | 0:1ed23ab1345f | 17 | while(t.read_ms() < ms) { |
va009039 | 0:1ed23ab1345f | 18 | poll(); |
va009039 | 0:1ed23ab1345f | 19 | } |
va009039 | 0:1ed23ab1345f | 20 | } |
va009039 | 0:1ed23ab1345f | 21 |