Skip to content

Commit

Permalink
Repackage CRSFSerial better for external inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
CapnBry committed Jan 11, 2022
1 parent 2bb941a commit 1b33aad
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions lib/CrsfSerial/CrsfSerial.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "CrsfSerial.h"
#include <util.h>

// static void hexdump(void *p, size_t len)
// {
Expand Down Expand Up @@ -63,7 +62,7 @@ void CrsfSerial::handleSerialIn()
_rxBuf[_rxBufPos++] = b;
handleByteReceived();

if (_rxBufPos == COUNT_OF(_rxBuf))
if (_rxBufPos == (sizeof(_rxBuf)/sizeof(_rxBuf[0])))
{
// Packet buffer filled and no valid packet found, dump the whole thing
_rxBufPos = 0;
Expand Down
1 change: 1 addition & 0 deletions lib/CrsfSerial/CrsfSerial.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <Arduino.h>
#include <functional>
#include <crc8.h>
#include "crsf_protocol.h"

Expand Down
4 changes: 0 additions & 4 deletions lib/common/util.h

This file was deleted.

0 comments on commit 1b33aad

Please sign in to comment.