Skip to content

Commit

Permalink
Merge branch 'master' of github.com:CapnBry/CRServoF
Browse files Browse the repository at this point in the history
  • Loading branch information
CapnBry committed Feb 25, 2022
2 parents 86dc161 + 474c9eb commit 6028c4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/CrsfSerial/CrsfSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
// }

CrsfSerial::CrsfSerial(HardwareSerial &port, uint32_t baud) :
_port(port), _crc(0xd5),
_port(port), _crc(0xd5), _baud(baud),
_lastReceive(0), _lastChannelsPacket(0), _linkIsUp(false),
_passthroughMode(false)
{
// Crsf serial is 420000 baud for V2
_port.begin(baud);
_port.begin(_baud);
}

// Call from main loop to update
Expand Down Expand Up @@ -246,5 +246,5 @@ void CrsfSerial::setPassthroughMode(bool val, unsigned int baud)
if (baud != 0)
_port.begin(baud);
else
_port.begin(CRSF_BAUDRATE);
}
_port.begin(_baud);
}
3 changes: 2 additions & 1 deletion lib/CrsfSerial/CrsfSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class CrsfSerial
uint8_t _rxBufPos;
Crc8 _crc;
crsfLinkStatistics_t _linkStatistics;
uint32_t _baud;
uint32_t _lastReceive;
uint32_t _lastChannelsPacket;
bool _linkIsUp;
Expand All @@ -56,4 +57,4 @@ class CrsfSerial
// Packet Handlers
void packetChannelsPacked(const crsf_header_t *p);
void packetLinkStatistics(const crsf_header_t *p);
};
};

0 comments on commit 6028c4b

Please sign in to comment.