@@ -247,6 +247,11 @@ private Transform FindWaveVRControllerActionsObjInChildren()
247247 private IVRModuleDeviceStateRW m_rightState ;
248248 private IVRModuleDeviceStateRW m_leftState ;
249249 private WaveVR_ControllerLoader . ControllerHand [ ] m_deviceHands = new WaveVR_ControllerLoader . ControllerHand [ DEVICE_COUNT ] ;
250+ private static Dictionary < string , VRModuleDeviceModel > m_models = new Dictionary < string , VRModuleDeviceModel >
251+ {
252+ { "WVR_CONTROLLER_FINCH3DOF_2_0" , VRModuleDeviceModel . ViveFocusFinch } ,
253+ { "WVR_CONTROLLER_ASPEN_MI6_1" , VRModuleDeviceModel . ViveFocusChirp }
254+ } ;
250255
251256 #region 6Dof Controller Simulation
252257
@@ -280,12 +285,6 @@ static WaveVRModule()
280285 s_type2class [ ( int ) WVR_DeviceType . WVR_DeviceType_Controller_Right ] = VRModuleDeviceClass . Controller ;
281286 s_type2class [ ( int ) WVR_DeviceType . WVR_DeviceType_Controller_Left ] = VRModuleDeviceClass . Controller ;
282287
283- s_type2model = new VRModuleDeviceModel [ s_type2index . Length ] ;
284- for ( int i = 0 ; i < s_type2model . Length ; ++ i ) { s_type2model [ i ] = VRModuleDeviceModel . Unknown ; }
285- s_type2model [ ( int ) WVR_DeviceType . WVR_DeviceType_HMD ] = VRModuleDeviceModel . ViveFocusHMD ;
286- s_type2model [ ( int ) WVR_DeviceType . WVR_DeviceType_Controller_Right ] = VRModuleDeviceModel . ViveFocusFinch ;
287- s_type2model [ ( int ) WVR_DeviceType . WVR_DeviceType_Controller_Left ] = VRModuleDeviceModel . ViveFocusFinch ;
288-
289288 s_simulatedCtrlPosArray = new Vector3 [ s_type2index . Length ] ;
290289 }
291290
@@ -544,7 +543,7 @@ private IVRModuleDeviceStateRW UpdateDevicePose(uint deviceIndex, WaveVR.Device
544543 {
545544 currState . isConnected = true ;
546545 currState . deviceClass = s_type2class [ ( int ) content . type ] ;
547- currState . deviceModel = s_type2model [ ( int ) content . type ] ;
546+ currState . deviceModel = QueryDeviceModel ( s_type2class [ ( int ) content . type ] ) ;
548547 currState . serialNumber = content . type . ToString ( ) ;
549548 currState . modelNumber = content . type . ToString ( ) ;
550549 currState . renderModelName = content . type . ToString ( ) ;
@@ -799,6 +798,30 @@ public override void TriggerViveControllerHaptic(uint deviceIndex, ushort durati
799798 }
800799 }
801800
801+ private VRModuleDeviceModel QueryDeviceModel ( VRModuleDeviceClass device )
802+ {
803+ if ( device . Equals ( VRModuleDeviceClass . HMD ) )
804+ {
805+ return VRModuleDeviceModel . ViveFocusHMD ;
806+ }
807+ else if ( device . Equals ( VRModuleDeviceClass . Controller ) )
808+ {
809+ VRModuleDeviceModel model ;
810+ if ( m_models . TryGetValue ( WaveVR_Utils . GetControllerName ( WaveVR_Controller . EDeviceType . Dominant ) , out model ) )
811+ {
812+ return model ;
813+ }
814+ else
815+ {
816+ return VRModuleDeviceModel . Unknown ;
817+ }
818+ }
819+ else
820+ {
821+ return VRModuleDeviceModel . Unknown ;
822+ }
823+ }
824+
802825#if VIU_WAVEVR_3_1_0_OR_NEWER
803826 public override void TriggerHapticVibration ( uint deviceIndex , float durationSeconds = 0.01f , float frequency = 85 , float amplitude = 0.125f , float startSecondsFromNow = 0 )
804827 {
0 commit comments