merge updateencoder function an add N_MOTOR define