mirror of
https://github.com/seahu/rflink.git
synced 2025-12-10 07:57:23 +01:00
repare more times init interrupt after start new tcp connection
This commit is contained in:
Binary file not shown.
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
bool enableRawScan=true; // flag for end RawSignal thread
|
bool enableRawScan=true; // flag for end RawSignal thread
|
||||||
|
bool isActiveIntrupt=false; // flag for frist start interupt (Protection against re-initialization interrupt)
|
||||||
|
|
||||||
bool ReceiverInterrupt=false; // flag signalzet enabled or disabled interupt (exist because for Raspberry Pi (wiringPi) you can't unregister the ISR)
|
bool ReceiverInterrupt=false; // flag signalzet enabled or disabled interupt (exist because for Raspberry Pi (wiringPi) you can't unregister the ISR)
|
||||||
pthread_cond_t thread_flag_cv;
|
pthread_cond_t thread_flag_cv;
|
||||||
@@ -174,8 +175,14 @@ void enableReceive() {
|
|||||||
RawSignal.Multiply=0; // Pulses[] * Multiply is the real pulse time in microseconds
|
RawSignal.Multiply=0; // Pulses[] * Multiply is the real pulse time in microseconds
|
||||||
RawSignal.Time=0; // Timestamp indicating when the signal was received (millis())
|
RawSignal.Time=0; // Timestamp indicating when the signal was received (millis())
|
||||||
RawSignal.Pulses[0]=0;
|
RawSignal.Pulses[0]=0;
|
||||||
|
if (isActiveIntrupt==false) {
|
||||||
log(LOG_HARD_DEBUG,"RawSignal: Enable interrupt.");
|
log(LOG_HARD_DEBUG,"RawSignal: Enable interrupt.");
|
||||||
wiringPiISR(PIN_RF_RX_DATA, INT_EDGE_BOTH, &handleInterrupt);
|
wiringPiISR(PIN_RF_RX_DATA, INT_EDGE_BOTH, &handleInterrupt);
|
||||||
|
isActiveIntrupt=true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
log(LOG_HARD_DEBUG,"RawSignal: Interrupt is already enabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user