mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-28 05:09:40 +00:00
22
IR_Decoder.h
22
IR_Decoder.h
@ -1,25 +1,25 @@
|
||||
#pragma once
|
||||
#include "IR_config.h"
|
||||
|
||||
//#define IR_IRDEBUG
|
||||
//#define IRDEBUG
|
||||
|
||||
#ifdef IRDEBUG
|
||||
#define IR_wrHigh 3 // Запись HIGH инициирована // green
|
||||
#define IR_wrLow 4 // Запись LOW инициирована // blue
|
||||
#define IR_writeOp 6 // Операция записи, 1 пульс для 0 и 2 для 1 // orange
|
||||
#define wrHigh 3 // Запись HIGH инициирована // green
|
||||
#define wrLow 4 // Запись LOW инициирована // blue
|
||||
#define writeOp 6 // Операция записи, 1 пульс для 0 и 2 для 1 // orange
|
||||
// Исправленные ошибки // purle
|
||||
// 1 пульс: fix
|
||||
#define IR_errOut 5
|
||||
#define errOut 5
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define IR_riseTime riseSyncTime //* bitTime */ 893U // TODO: Должно высчитываться медианой
|
||||
#define IR_riseTolerance tolerance /* 250U */ // погрешность
|
||||
#define IR_riseTimeMax (riseTime + riseTolerance)
|
||||
#define IR_riseTimeMin (riseTime - riseTolerance)
|
||||
#define IR_aroundRise(t) (riseTimeMin < t && t < riseTimeMax)
|
||||
#define IR_timeout ((riseTimeMax * 8) + syncBits +1) // us // таймаут в 8 data + 3 sync + 1
|
||||
#define riseTime riseSyncTime //* bitTime */ 893U // TODO: Должно высчитываться медианой
|
||||
#define riseTolerance tolerance /* 250U */ // погрешность
|
||||
#define riseTimeMax (riseTime + riseTolerance)
|
||||
#define riseTimeMin (riseTime - riseTolerance)
|
||||
#define aroundRise(t) (riseTimeMin < t && t < riseTimeMax)
|
||||
#define timeout ((riseTimeMax * 8) + syncBits +1) // us // таймаут в 8 data + 3 sync + 1
|
||||
|
||||
class IR_Encoder;
|
||||
class IR_Decoder : private IR_FOX {
|
||||
|
Reference in New Issue
Block a user