Make HardwareStates in tests with a utility function

Currently, adding a new field to `struct HardwareState` requires
modifying struct literals on over 600 lines of unit tests to add its
default value, which I believe would take roughly an hour (assuming a
good knowledge of Vim). Since I have a CL adding one field already, and
intend to add another sometime soon, this CL refactors most of those
places to use the `make_hwstate` function, which provides default values
for the fields not relevant to touch tests. This removes the need to
update touch-related unit tests when adding an irrelevant field.

Much of this CL was created using the following macro in Neovim (saved
as `b`):


Executed with a command something like this:

    :g/, 0, 0, 0, 0, 0.0 },\?\( \+\/\/\|\n\)/norm! @b

TEST=run all unit tests

Change-Id: I29ee56628e87d3ca9bec27e6a914d0cacd158905
Commit-Queue: Harry Cutts <>
Tested-by: Harry Cutts <>
Reviewed-by: Sean O'Brien <>
21 files changed