my sbus
Fork of FutabaSBUS by
Diff: FutabaSBUS.h
- Revision:
- 1:e3c92fba87f2
- Parent:
- 0:6618cf21c95c
- Child:
- 2:07dbb77a6f1a
--- a/FutabaSBUS.h Wed Dec 14 20:46:10 2011 +0000 +++ b/FutabaSBUS.h Thu Feb 09 21:50:00 2012 +0000 @@ -59,13 +59,52 @@ class FutabaSBUS { public: + /** create a FutabaSBUS object connected to the specified serial pins + * + * ¶m pin serial tx,rx to connect to + */ FutabaSBUS(PinName tx, PinName rx); + + /** Read channel(1..16), digital raw data + * + * ¶m raw data from receiver range from 0 to 4096, normal from 352 1696 + */ int16_t channel(uint8_t ch); + + /** Read digital channel(1..2), range 0..1 + * + * ¶m range 0..1 + */ uint8_t digichannel(uint8_t ch); + + /** Set servo position, raw data, range 200..2000? + * + * ¶m raw data 0..2048 + */ void servo(uint8_t ch, int16_t position); + + /** Set digital channel, 0..1 + * + * ¶m range 0..1 + */ void digiservo(uint8_t ch, uint8_t position); + + /** Read failsafe condition + * + * ¶m 0=no failsafe 1=lost signal 3=failsafe + */ uint8_t failsafe(void); + + /** Set logical data passtrough - servo values are ignored, using received data + * + * ¶m bool + */ void passthrough(bool mode); + + /** Read logical data passtrough + * + * ¶m bool + */ bool passthrough(void); private: