Comments (10)
I was just having the same issue with my devices. Two remotes for the same system, one gaps the codes sent with 4700 microseconds and the other 4900. What's the reason for 5000?
from rc-switch.
I presume that 5000 is a legacy gap, while modern devices tend to shorten the value. If you cut it down too far though, you might start getting false positives / false readings.
from rc-switch.
Maybe the sync signal duration can be used as "duration"? In my case the sync signal is protocol 1 with 150 us pulse length where the 'low' part is 31 pulse lengths => 31*150=4650 us
from rc-switch.
Makes absolutely sense. I'll check my RC's pulse length this weekend.
from rc-switch.
I just edited my comment to clarify that I referred to the low part of the sync signal since this is what "duration" measures if I recall correctly. I'm not sure what would happen if I get noise in between though.
from rc-switch.
The RCSwitch::handleInterrupt() is attached in CHANGE mode, so it is triggered on every slope.
This code at the beginning of the routine:
long time = micros();
duration = time - lastTime;
will cancel the whole readout when noise appears within the "duration" period.
from rc-switch.
I found an hx2262 based remote and the pulse length measured by getReceivedDelay() is 321 microseconds. The "gap/duration" of hx2262 measured 9.93 milliseconds on my scope. Comparing it with 4.69 milliseconds gap of RCO-14-b/fht7901 at 150 microseconds/pulse seems to corroborate your theory.
31 * 321 = 9951
31 * pulse_length = preamble_gap
from rc-switch.
As far as I can tell, a fix for this issue has been committed. Does that help? Or would you like to propose additional changes (such as making the nSeparationLimit
value somehow dynamic)?
from rc-switch.
The lower nSeparationLimit fixes it for me, but it doesn't provide a "future proof" solution. A nicer solution I assume would be to, when a signal is correctly decoded, wait the corresponding nSeparationLimit time (depending on pulse length and protocol). Should we add that as a new issue or keep this one?
from rc-switch.
Measured difference between "old" hx2262 and "new" fht7901 seems to show the tendency of RC's internal clocks to pick up the speed in newer generations of devices. On the other hand - wild shortening of nSeparationLimit yields false readouts from background noise. For now - the constant value seems to work and is described well enough. Any future adjustments should depend on real devices. Therefore I decide to close the issue and leave it to the users to discover faster RCs.
from rc-switch.
Related Issues (20)
- can't decode 433mhz with esp32 HOT 5
- Problems with an old library 2013 but with an important modification
- Adding new protocol to RCSwitch.cpp
- Esp32 issue... another one, yes... HOT 1
- How to implement a custom protocol?
- Which pin for Arduino pro mini AtMega328P 5V
- control with more than one command
- Problem with recieved value HOT 1
- How to send()? HOT 1
- How the ISR function handle the filtering out first high pulse in SYNC bit
- void RCSwitch::disableReceive()
- ReceiveDemo_Advanced work with Platform.IO and VSCode HOT 1
- How can i modify this protocol? HOT 5
- Cant receive anything with receive demo HOT 1
- Small contribution
- SURNICE: receiver and transmitter HOT 1
- Protocol 6 optimization doubt
- A modest proposal - expose the interrupt so a user can write a callback function.
- How to add a new protocol for my RF receiver HOT 1
- SimpleRCScanner return error 500
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rc-switch.