fix define conflict

This commit is contained in:
DashyFox 2023-10-06 15:45:20 +03:00
parent 7d9ac1420b
commit f41348fb6b
2 changed files with 4 additions and 4 deletions

View File

@ -166,7 +166,7 @@ uint16_t IR_Decoder::ceil_div(uint16_t val, uint16_t divider) {
void IR_Decoder::isr() { // в прерывании вызываем isr()
if (isPairSending) return;
if (micros() - prevRise > timeout) { // первый
if (micros() - prevRise > IR_timeout) { // первый
isPreamb = true;
frontCounter = preambFronts - 1U;
errorCounter = 0;
@ -176,7 +176,7 @@ void IR_Decoder::isr() { // в прерывании вызываем isr()
if (frontCounter > 0) { // в преамбуле
uint32_t risePeriod = micros() - prevRise;
if ((PIND >> 2) & 1 && risePeriod < timeout) { // __/``` ↑ и мы в внутри пакета
if ((PIND >> 2) & 1 && risePeriod < IR_timeout) { // __/``` ↑ и мы в внутри пакета
if (freeFrec) { riseSyncTime = (riseSyncTime + risePeriod / 2) / 2; } // tuner
@ -203,7 +203,7 @@ void IR_Decoder::isr() { // в прерывании вызываем isr()
int8_t lowCount = 0;
int8_t allCount = 0;
if (risePeriod < timeout && !isBufferOverflow && risePeriod > riseTimeMin) {
if (risePeriod < IR_timeout && !isBufferOverflow && risePeriod > riseTimeMin) {
// Мы в пределах таймаута и буффер не переполнен и fix дроблёных единиц

View File

@ -19,7 +19,7 @@
#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
#define IR_timeout ((riseTimeMax * 8) + syncBits +1) // us // таймаут в 8 data + 3 sync + 1
class IR_Encoder;
class IR_Decoder : private IR_FOX {