1
0
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:
Ondrej Lycka
2017-07-23 14:55:09 +02:00
parent 5365a33e1b
commit b764d9ad3e
3 changed files with 9 additions and 2 deletions

Binary file not shown.

View File

@@ -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.