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.
Fork of FutabaSBUS by
Revision 3:50e10bf74374, committed 2016-05-19
- Comitter:
- okini3939
- Date:
- Thu May 19 08:56:30 2016 +0000
- Parent:
- 2:07dbb77a6f1a
- Commit message:
- added start();
Changed in this revision
| FutabaSBUS.cpp | Show annotated file Show diff for this revision Revisions of this file |
| FutabaSBUS.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/FutabaSBUS.cpp Mon Feb 08 08:47:36 2016 +0000
+++ b/FutabaSBUS.cpp Thu May 19 08:56:30 2016 +0000
@@ -37,6 +37,11 @@
FutabaSBUS::FutabaSBUS(PinName tx, PinName rx) : sbus_(tx, rx) {
+ rx_timeout=50;
+ tx_timeout=60;
+}
+
+void FutabaSBUS::start() {
// Set Baudrate
sbus_.baud(100000);
// Set Datalenght & Frame
@@ -46,8 +51,6 @@
sbus_.attach(this, &FutabaSBUS::SBUS_irq_rx, RawSerial::RxIrq);
// init ticker 500us
rxSBUS.attach_us(this, &FutabaSBUS::rx_ticker_500us,500);
- rx_timeout=50;
- tx_timeout=60;
}
int16_t FutabaSBUS::channel(uint8_t ch) {
@@ -88,7 +91,6 @@
void FutabaSBUS::failsafe(uint8_t status) {
failsafe_status = status;
- sbus_.baud(100000);
}
void FutabaSBUS::passthrough(bool mode) {
--- a/FutabaSBUS.h Mon Feb 08 08:47:36 2016 +0000
+++ b/FutabaSBUS.h Thu May 19 08:56:30 2016 +0000
@@ -64,6 +64,8 @@
* ¶m pin serial tx,rx to connect to
*/
FutabaSBUS(PinName tx, PinName rx);
+
+ void start ();
/** Read channel(1..16), digital raw data
*
