travis build

different configurations are specified in the configurations directory
 to select one copy it replcing the config.h file (as the travis script does)
 or change the include file directive in crossbow.ino
This commit is contained in:
Magnus Ivarsson
2018-02-05 19:54:40 +01:00
parent 2ac0ce9b49
commit d07a8a09d3
17 changed files with 225 additions and 90 deletions

25
crossbow/sbus.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef SBUS_INPUT
#define SBUS_INPUT
#include "Arduino.h"
#include "tx_input.h"
class SbusInput : public TxInput
{
public:
SbusInput(HardwareSerial &serial);
void start(void);
void loop(void);
bool isReceiving(void);
private:
HardwareSerial &_serial;
uint32_t _lastChannelReceivedAt = 0;
void sbusRead(void);
};
void sbusPreparePacket(uint8_t packet[], int16_t channels[], bool isSignalLoss, bool isFailsafe);
#endif