mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-05-04 07:10:16 +00:00
cleanup
This commit is contained in:
parent
469d9875c8
commit
02410cc78c
@ -374,7 +374,7 @@ void IR_Decoder::writeToBuffer(bool bit) {
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
|
||||
bool IR_Decoder::crcCheck(uint8_t len, uint16_t &crc) {
|
||||
bool IR_Decoder::crcCheck(uint8_t len, crc_t &crc) {
|
||||
bool crcOK = false;
|
||||
|
||||
crc = 0;
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#define subBufferSize 7 //Буфер для складирования фронтов, пока их не обработают
|
||||
|
||||
|
||||
class IR_Encoder;
|
||||
class IR_Decoder : private IR_FOX {
|
||||
friend IR_Encoder;
|
||||
|
@ -70,6 +70,7 @@ msg type:
|
||||
|
||||
/*
|
||||
/////////////////////////////////////////////////////////////////////////////////////*/
|
||||
typedef uint16_t crc_t;
|
||||
|
||||
#define bytePerPack 3 // колличество байтов в пакете
|
||||
#ifndef freeFrec
|
||||
@ -89,7 +90,6 @@ msg type:
|
||||
#define addrBytes 2
|
||||
#define msgBytes 1
|
||||
#define crcBytes 2
|
||||
typedef uint16_t crc_t;
|
||||
#define poly1 0x31
|
||||
#define poly2 0x8C
|
||||
#define syncBits 3U // количество битов синхронизации
|
||||
@ -111,9 +111,9 @@ typedef uint16_t crc_t;
|
||||
|
||||
#define bitTakts (bitActiveTakts+bitPauseTakts*2U) // Общая длительность бита в тактах
|
||||
#define bitTime (bitTakts*carrierPeriod) // Общая длительность бита
|
||||
const auto viewValue = bitTime;
|
||||
#define tolerance 300U
|
||||
|
||||
|
||||
class IR_FOX {
|
||||
private:
|
||||
bool isSending = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user