-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two automatic calibrations (native and LSR) on g5 restarts #219
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there more files you forgot to git add?
Yes, I didn't notice yesterday that my git push had a typo. Updated now. Still need to add a check for LSR to make sure it has more than 3 entries. |
OK - all the changes for the 1st cut should be reflected now. |
Should we disable native calibrates LSR for 6 hours post restart? If so, that would be easy to do just by touching the file in the restart section. it would delay the next native calibrates LSR for 6 hours from the restart. |
Yes, at a minimum. It might also be good to somehow figure out how to use expired readings when available, at least until the first real calibration is entered. But I’m not sure how to do that robustly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
it seems like you could keep around the 'lsr-calibrates-native-next-cycle' file for N hours, and instead of calibrating lsr from native you could do the reverse while the file exists... although i worry about code that auto calibrates native, so maybe have a xdripjs.json flag to disable it. |
That’s in line with what I was thinking originally. But I’m not certain whether that would give better accuracy on a restarted session vs. just calibrating it once or twice a day. Maybe start with just suppressing native-calibrates-LSR behavior for the first day or two before we think about doing any more LSR-calibrates-native than absolutely needed to get the sensor restarted? That at least ensures that the transmitter will read safely low of the restart drift isn’t corrected by real calibrations. |
Sounds good. I'll do that. I can suppress it with one line of code by using ... touch -d "-24 hours ago" file |
Can you both take another look? I added the touch to disable native-calibrates-lsr for 24 hours. Also, are either of you able to test the auto restart on a non-new firmware transmitter? Also, I updated cgm-stop to not time travel if new firmware automatically. It still automatically time travels back 2 hours for g5 and g6 old firmware. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but i'd only see something very obvious.
one thing that i can't wrap my head around though, why does touching the file "24 hours ago" help? don't you want to set its timestamp to "18 hours in the future" so it won't be 6 hours old for 24 hours?
Good question. The touch -d uses a negative 24 hours ago so that actually touches the file with a date/time that is 24 hours in the future. However, you raise a good point. It should actually be "-18 hours ago" in order to delay native-calibrates-lsr for 24 hours. I'll make that change now. |
awesome, i didn't know you could use a negative there. |
Sorry, I didn't get around to testing this before our G5 transmitter died. We're back to G4 for now and will need to get another one (rebatteried maybe) before I can test further. |
re-battery one Scott, its really easier to do than you might think. |
Where are the best instructions? Do they detail what equipment is required? |
This is the video I used, but it looks like Katie has a video on YouTube for g5 also. |
Thanks. That's a lot of equipment (drills, etc.) I don't have, so I think we'll get one from someone who has the necessary kit and knows how to do it. |
I think I used a Dremel, in case you have that. If you want I can send you my test g5 tx, it has a lid so you can swap batteries easily, not sure it's good for real use that way. I don't use it anymore, need to figure out g6 battery replacements someday. Pm me if you want it. |
No description provided.