Clear heartrate.txt file contents after measurement stopped (optional?)
I use the heartrate.txt file to show the current heart rate in OBS in 2 different scenarios: in one scenario I display the OBS projector window in my VR environment, so that I can monitor my heart rate while playing beat saber and other games for fitness purposes. In the second scenario I display my heart rate in my Twitch live stream.
In either case (and in most other use cases I can imagine) it's confusing that when measurement stops the last measured heart rate just stays in heartrate.txt and doesn't change anymore. Especially when measurement stops due to connection loss, I only notice after a while when I wonder why the heart rate doesn't change anymore for so long.
I would think that anybody who wants to have a historic display of values will rather refer to the CSV file feature, so I can't really imagine a use case where keeping the heart rate in the file after measurement stop will actually be useful instead of just causing confusion. But if anybody disagrees then it would be great if at least an option like "[X] Clear real time text file after measurement stop" could be added for that (and I'd suggest making it the default).
I think OBS could handle both the file being completely deleted and just having the contents cleared in this case (so that it's an empty file, size of 0 bytes), but I assume that clearing the file will be the more compatible solution.
An option would also be to have two different behaviors depending on the measurement stop reason:
- stopping the measurement manually (and/or closing the application) clears the heart rate file
- an unexpected connection loss writes some error indicator like "--" or "XX" to the file
Or let the user decide and make this another configuration item.