SBUSのcppとhppだけ(フォーク)
Diff: main.cpp
- Revision:
- 0:072c4589bc62
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Feb 03 15:12:59 2018 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "SBUS.hpp" +SBUS propo(PC_10, PC_11); +Serial pc(USBTX, USBRX); + +int main() +{ + pc.baud(57600); + while(1) { + if(propo.failSafe == true) + pc.printf("[NG]\t"); + else + pc.printf("[OK]\t"); + + + for (int i = 0; i < 4; i++) + pc.printf("%d\t", propo.getStickVal(i)); + + for (int i = 0; i < 5; i++) + pc.printf("%d\t", propo.getSwitchVal(i)); + + pc.printf("\n"); + } +} \ No newline at end of file