Closed tzachi-dar closed 8 years ago
Deduping is now done at another place or is there no deduping at all?
So basically the change is: Waking up to keep the device alive for 20 seconds now happens about 5 minutes after the last package of a number of duplicates arrives instead of about 5 minutes after the first package?
I think @urmc-costik (or @hackingtype1 ?) should decide if that makes sense.
Deduping now happens inside TransmitterData.create(). It also checks more things there. Also, even on the first time that we wake up, we know what was the last packet.
The real question is weather, keepAlive() logic depends on the fact that this is a duplicate packet or not.
Let me test it out tonight; if deduping is working - I'll verify the keep alive is still triggered appropriately
OK, let us know how it is going.
I'm closing this as it is already in https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/pull/317
… code.
This is basicly code refactoring with no side effects.
One thing that has changed, is that keepAlive() will now be called even if the packet is duplicate. I believe that this is better this way. If this is not the case then the function processNewTransmitterData should return bool telling if this is a duplicate packet.
Not tested for obvious reasons....