P2 is simple, it is the number of motor or spoke pick up magnets for sensing usually 1 or for some hubs 6.
P1 is a bit more trickier to understand, the figure to input will give a odo readout with the display set to a certain speed. The P1 value is motor winding magnets X the hub internal gear...