Struct as argument

This seems to be an area where the Arduino IDE is not smart enough.

I spent ages trying to use a struct as a parameter until I took the trouble to read the relevant learning page. See the FAQ piece.

...R