OpenSeizureDetector / Garmin_SD

Garmin Watch Seizure Detector - A seizure detector data source based on Garmin IQ watches such as Vivoactive HR
http://openseizuredetector.org.uk
GNU General Public License v3.0
12 stars 8 forks source link

Increasing the allowed timeout to send and receive callback of the data. #65

Closed pmithrandir closed 7 months ago

pmithrandir commented 7 months ago

Increasing timeout from 2 to 4 sec to send data to the phone.

jones139 commented 7 months ago

That is working much better, thank you!

jones139 commented 7 months ago

V2.0.1 is the version that includes this change. I have tested it today and it used 38% in 6 hours, which would be a battery life of about 15 hours.

I got the occasional short buzz off the watch, but nothing on the display, but sometimes I saw the Err:Comms message. This did not happen when I was outside though, so I think it was interference because I had three Garmin watches connected to my phone. I switched odd the other 2 watches and it has been OK since.

A minor point I have noticed is that if you go out of bluetooth range, you get the Err: -2 etc errors on the screen, but there is a significant delay before it goes back to ok when you are back in range. It would be good to redraw the screen straight away when the connection is restored.

pmithrandir commented 7 months ago

Hi,

I'm surprised because the mechanism exist. When you manage to send data, you enter the callback.

If status code is different from last status code, I force the update.

Old status code was -3XX for example, new is 200, so it enter that condition.

May you share the exact error code you get ? When the app is not reachable, I get a 300 error.

On my watch, the OK status comes in less than 5 sec. Time to make a request to send data + receive callback +1 sec to enter the onClick.