Enhance Touch Anywhere and Range of Motion steps for multiple taps and touches #1482
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR primarily enhances the existing Touch Anywhere step so that it can be configured to multiple taps (e.g. double-taps) and touches (e.g. 2 fingers).
Having tested a version of the range of motion tasks extensively over the past few years, we have seen many occasions where a participant will inadvertantly touch the screen when placing the phone onto their body ready for a measure. At other times, we would see a recording ruined by an accidental tap mid-task. At best, these problems result in useless data. After trying various different instructions, we realised that the best solution was to utilise a double-tap or a two-fingered tap (or even a combination of both) to start (and end) the test.
To enable this enhancement, I have added two new parameters to the touchAnywhereStep ('numberOfTaps' and 'numberOfTouches'). This means that any task implementing this step will also need either a constant set for each of these, or additional parameters enabling the user to set the tasks dynamically. Currently, the touchAnywhereStep is only implemented within the range of motion tasks within RK. I have therefore added two new parameters to the range of motion step (and knee and shoulder tasks) and reproduced the functionality for multiple taps/touches in these too.
Finally, I have also configured dynamic instructions that enable researchers and developers to set different numbers of taps and touches, and appropriate instructions will automatically be produced and displayed/spoken. To make these dynamic instructions available to every implementation of the rangeOfMotion step required one additional parameter, 'instructionText' (which now mirrors the touchAnywhereStep in this way).
These changes been very successful during testing and I hope they will be of use to others.