StephenBlackWasAlreadyTaken / xDrip-Experimental

Experimental Branches for Collaboration on DexDrip
GNU General Public License v3.0
25 stars 62 forks source link

pause before reading, stop scan w/ sensor stop #318

Closed hackingtype1 closed 8 years ago

hackingtype1 commented 8 years ago

Inducing a brief delay to test improved receiver/xDrip cooperation & reliability in getting data. Current theory is that they both begin requesting data when the G5 begins advertising.. colliding & preventing the receiver from getting data.

Also, when the sensor session is ended, the G5 service will stop scanning. This will prevent unwanted re-auth/bonding when a user decides they no longer wish to use xDrip.

also fixed issue presented in crash data (stopScan request when not scanning)

tzachi-dar commented 8 years ago

One note about stopping the sensor:

There are two reasons that I think that this should not be in the final version: 1) All other collection methods keep collecting even when sensor is stopped. 2) Stopping/starting a sensor also has influence on calibrations.

So, I think that for final version we will have to give users a special button to stop the scanning if they need to.

AdrianLxM commented 8 years ago

@tzachi-dar Apart from storing it into the db, we basically do nothing with transmitter data while no sensor session is active. For the G4 it is ok to collect the data - it broadcasts it anyways so it won't affect the transmitter battery. For the G5 I think it's a good Idea to not "contact" it when not really needed to not waste the transmitter battery.

A switch to manually disable the collection of G5 data without having to reenter the transmitter ID to reenable it ("forget device" atm deletes the transmitterID) would be good for the final version (but I see this as low priority as it can be added by any of us).