obiwan007 / despresso

GNU General Public License v3.0
75 stars 10 forks source link

[Idea/Discussion] Maybe shot recording should stop after a delay #210

Open denschub opened 5 months ago

denschub commented 5 months ago

This came up on Discord, and I'm not 100% sure myself, so filing this here for some discussion. I have recorded this shot. In the shot recording, this shows up as 35.93 g, but the real yield was pretty close to 38g'ish.

The discrepancy here happens because the shot recording stops when the profile ends, but that's not really when the real-world shot ends. A video recording from exactly that shot is available here. When the shot ends, the machine opens the pressure release valve - but the pressure release isn't immediate. In the video, you can see that the flow ends roughly half a second after the valve opens, and that's where the remaining 2g dripped down.

A 2g difference is a pretty big deal - although this only affects statistics, of course. A possible workaround could be to always add a 1s step in the end with 0 pressure and 0 flow as goals. But of course, waiting a second for that to finish adds to the total shot time, so now that metric would be skewed. 🙃

denschub commented 5 months ago

de1app has a configurable after-shot-delay, one of the handlers is the save_drink_weight handler that ultimately ends storing a final measurement after that timeout. That measurement is a median of the last 11 values.

That means that the final drops won't be part of the chart, but at least the final weight would be correct. Not sure if this is "the best" solution, but I'll document it here for posterity.