Fix assignment error in SHTSPEvent

The class members and local variables had the same name, which meant event.type was always undefined.

Edit: s/name/type/