CAM Shaft Position Sensor.
Since there are no distributers and carburetors anymore, The crankshaft and camshaft positions sensors (the rotational position) tell the system when to fire the ignition and injectors, and which cylinder to do it to. Seems to be a number of threads on here about 2017s having a sensor go belly up. Odd. Your Dad's machine is under warranty, right, so the dealer should get you in and out in an hour or two once you can get in. Some say it's a leaky o-ring allowing oil to get into the sensor or connector. Replace sensor. Easy fix. Agree, I would transport it to the dealer, not ride it, if code persists.
Spyder Diagnostic Codes - P0340
Error on camshaft
position sensor signal
Disconnected sensor
Blown fuse
Defective CAPS,
damaged circuit wires,
damaged connector or
damaged ECM output pins.
Trigger wheel missing
or in incorrect position
on intake camshaft
Make sure sensor
connector is fully inserted.
Measure voltage between
harness connector CAPS-3
and ground (expected
value: 11 to 13 volts).
Measure resistance from
connector: ECMA-E2 to CAPS-2
(expected value: < 2 ohms).
Measure resistance from
connector: ECMA-D4 to CAPS-1
(expected value: < 2 ohms).