请输入要描述的内容进行内容补充,请输入要描述的内容进行内容补充,请输入要描述的内容进行...
Scenario-based Solutions
Practical XR commercial solutions
请输入要描述的内容进行内容补充,请输入要描述的内容进行内容补充,请输入要描述的内容进行...
Download
SDK Download
请输入要描述的内容进行内容补充,请输入要描述的内容进行内容补充,请输入要描述的内容进行...
Driver Application
1.0 Armor Tool Download
请输入要描述的内容进行内容补充,请输入要描述的内容进行内容补充,请输入要描述的内容进行...
FQA
Frequently Asked Questions
Common Problem
•     FQA
•     Health and safety warnings
•     Announcements
•     How to install VR system
SDK list
•   Ureal engine
•   Android
SDK List_C++

This drive is suitable for the MOONSEER MOTION VEST Ⅰ series.

Driver Development Manual

C++ / C / C# / UE4 / Unity3D Programming Access for Windows PCs

1.1 Version and update notes

1.2 Driver Adaptation Terminal

The current manual supports the MOONSEER Multi-function Vest driver version list listed in the table below, the higher the ranking of the newer SDK driver

List of recommended operating systems supported:

List of upcoming supported systems:

ü  Windows 10
ü  Windows 11

Ubuntu 16.04 LTS or above (inclusive)

1.2 Driver acquisition method

01
02
Apply for the SDK on the technical support page
After the audit is completed, the SDK driver will be officially sent
2.0 SDK Features

The SDK mainly provides MOONSEER multi-functional Vests for third-party developers to access their own applications, using the SDK simple and fast operation of multi-functional Vests corresponding to the function.

2.1 SDK Type Description

2.2 Definition of SDK Constants_Device enumeration values

2.3 Definition of SDK Constants_Device function enumeration values

2.4 Definition of SDK Constants_Device state enumeration values

Definition: The enumeration value of the Vest is 0x00, the left leg module is 0x01 and the right leg module is 0x02

// Define enumerated values

enum class DeviceMode : b8

{

// Vest

Armor = 0x00,

// Left leg

LLeg = 0x01,

// Right leg

RLeg = 0x02,

};

// Enumerated values defining device functionality

enum class DeviceFunctionEnum : b8

{

// Right IR module ID

RightInfrared = 0x01,

// Left IR module ID

LeftInfrared = 0x02,

// Right touch

RightTouchpad = 0x04,

// Left touch module ID

LeftTouchpad = 0x08,

};

There are four enumeration values for setting the status, of which Disconnected and Connected are used to identify the BLE receiver connection status when the USB receiver is plugged into the PC device

// Device status  

enum class DeviceState : b8

{

// Disconnected

Disconnected = 0x01,

// Normal

Connected = 0x02,

// Normal data flow

DataFlowOK = 0x03,

// Data flow disconnection

DataFlowEmpty=0x04

};

3.0 SDK interface_Initialising the SDK
3.1 state listener callback function settings

// Initialise and automatically connect the device

// This method is an asynchronous method that, when called, requires the initialisation state to be obtained via the state listener's callback function.

MOONSEER_DEVICE_DRIVER_EXPORT void HS_ConnectionDevice();

// Device status changes

// This method needs to be passed a parameter of function pointer type as a callback function.

// The incoming callback function is called to notify when the state of the device changes

MOONSEER_DEVICE_DRIVER_EXPORT void

HS_DeviceStateChanged(LPFN_HS_DeviceStateChanged _fn);

// The LPFN_HS_DeviceStateChanged callback function is defined as follows:

// Notify developers of changes in device status

// This function takes 2 arguments

// @params mode [DeviceMode] Device type, this parameter will be returned as 0,1,2 for

// Vest, left leg module and right leg module

// @params state [b8] Device state, the value of the DeviceState enumeration is returned.

typedef void (*LPFN_HS_DeviceStateChanged)(DeviceMode mode, b8 state);

3.2 Setting the reconnection method

The SDK supports automatic reconnection after BLE disconnection, by default, the SDK is automatically reconnected. If you need to manually reconnect, you have to call the function that sets the reconnection method. The displayed setting will manually reconnect.

// Set the reconnect method

// @params bManualReconnect [bool] set to true for manual reconnect.

// false for auto-reconnect

MOONSEER_DEVICE_DRIVER_EXPORT void HS_SetReconnectMode(bool bManualReconnect);

Note: This function modifies the connection method while the programme is running. Whether or not to reconnect to the system will depend on the most recent setting.

3.3 Setting calibration accuracy

The higher the calibration accuracy, the more accurate the calibration will be, but the more time consuming it will be, the default accuracy of the system is 30%.

// Setting the calibration accuracy

// @params deviceId[b8] sets the calibration accuracy for device ID = deviceId

// @params precision[int] Calibration of precision

MOONSEER_DEVICE_DRIVER_EXPORT void HS_SetPrecision(b8 deviceId, int precision);

3.4 Calibration

Call the calibration function, the system will automatically call the calibration function once after HS_ConnectionDevice succeeds, the calibration function can be called anywhere in the programme after HS_ConnectionDevice is called and callback notification succeeds, all the functions of the multi-functional Vest will be blocked when calling the calibration (movement, power, infrared touchpad and other data will not be available).

// Calibration

// @params deviceId[b8] deviceId = deviceId for calibration

// Calibration is also an asynchronous operation, you need to know if the calibration is complete through the calibration completion notification callback.

MOONSEER_DEVICE_DRIVER_EXPORT void HS_Calibration(b8 deviceId).

3.5 Calibration completion notification callbacks

// Set the calibration completion notification callback

// Callback LPFN_HS_CalibrationCompleteResult when calibration is complete.

MOONSEER_DEVICE_DRIVER_EXPORT void HS_CalibrationCompleteResult(LPFN_HS_CalibrationCompleteResult _fn);

// Callback function for calibration completion notification

// @params modules [b8]

// The DeviceMode enumeration of the module for which the calibration has been completed is returned.

typedef void (*LPFN_HS_CalibrationCompleteResult)(b8 modules).

3.7 Setting the Vest movement notification callbacks

Sets a callback for Vest movement which is parameterised by an angle value based on the calibration plane, with all values in the [-1,+1] interval.

// Setting up callback functions for Vest movement

MOONSEER_DEVICE_DRIVER_EXPORT void HS_SetArmorMoveResult(LPFN_HS_ArmorMoveResult _fn);

// Notification callback function for movement data of the Vest

// @params frontOrBack [double] frontOrBack ∈ [-1,0) forward move, 0 static, (0, +1] backward move

// @params leftOrRight [double] leftOrRight ∈ [-1,0) leftOrRight, 0 static, (0, +1] rightOrRight

// @params around [double] around ∈ [-1,0) turn left, 0 at rest, (0, +1] turn right

typedef void (*LPFN_HS_ArmorMoveResult)(double frontOrBack, double leftOrRight, double around);

3.8 Setting up leg movement notification callbacks

Set the callback for leg movement, which is parameterised by an angle value based on the calibration plane, with all values in the interval [-1,+1].

// Setting up callback functions for Vest movement

MOONSEER_DEVICE_DRIVER_EXPORT void HS_SetLegMoveResult(LPFN_HS_ArmorMoveResult _fn);

// Notification callback function for movement data of the Vest

// @params deviceId [b8] module ID, determined by the value of DeviceMode to determine whether the returned parameter is the left or right leg

// @params frontOrBack [double] frontOrBack ∈ [-1,0) forward move, 0 static, (0, +1] backward move

// @params leftOrRight [double] leftOrRight ∈ [-1,0) leftOrRight, 0 static, (0, +1] rightOrRight

// @params around [double] around ∈ [-1,0) turn left, 0 at rest, (0, +1] turn right

typedef void (*LPFN_HS_ArmorMoveResult)(b8 deviceId, double frontOrBack, double leftOrRight, double around);

3.9 Touchpad touch notification callback (edge triggered)

The Vest touch pads are located on either side of the shoulder of the Vest, as identified by the red highlights in the image below, representing the left touch pad (Figure 1) and the right touch pad (Figure 2) respectively

// Vest touchpad notification callback function settings // This function sets the notification callback for Edge Trigger. MOONSEER_DEVICE_DRIVER_EXPORT void HS_TouchpadTouched(LPFN_HS_TouchpadTouched _fn);

// LPFN_HS_TouchpadTouched edge-triggered notification callback for touchpad touches

// @params deviceFuncId [b8] module ID, determined by the value of DeviceFunctionEnum to determine the type of module function returned

// @params state [bool] true for touch, false for leave

// Listen for edge triggers, i.e. only once at the beginning or end of a touch.

typedef void (*LPFN_HS_TouchpadTouched) (b8 deviceFuncId, bool state);

* SDK can support registering both level-triggered and edge-triggered notification callback functions, and if both functions are registered, both will be triggered when the corresponding state is reached.

3.10 Touchpad: touch notification callback (horizontal trigger)

Setting the touchpad trigger notification callback function in Level Trigger mode

// Vest touchpad notification callback function settings

// This function sets the notification callback for a Trigger Trigger.

MOONSEER_DEVICE_DRIVER_EXPORT void HS_StickTouched(LPFN_HS_StickTouched _fn);

// LPFN_HS_StickTouched touch notification callback in horizontal trigger mode for touch pads

// @params deviceFuncId [b8] module ID, determined by the value of DeviceFunctionEnum to determine the type of module function returned

// @params state [bool] true for continuous touch state (high level signal), false for leave state (low level signal)

// Listen for a continuous level signal, this callback function, once registered, will continue to send the current state

typedef void (*LPFN_HS_StickTouched) (b8 deviceFuncId, bool state);

3.11 Infrared entry notification callback (edge-triggered)

Vest IR sensing is located on either side of the waist of the Vest.

3.6 Getting the power level of the device

Set the notification callback to get the power level, you can get the power information of the device. Currently, all the device power value is 10 values, from 1-10, 10 represents full power, 1 represents low power

// Setting up power notification callbacks

// Power is notified to the LPFN_HS_GetPowerResult callback on every frame of data

MOONSEER_DEVICE_DRIVER_EXPORT void HS_PowerResult(LPFN_HS_GetPowerResult _fn);

// LPFN_HS_GetPowerResult Callback function to get the power level.

// @params deviceMode[b8] The power obtained belongs to which device module, refer to the enumeration value DeviceMode

// @params power [b8] power, range 1-10

typedef void (*LPFN_HS_GetPowerResult)(b8 deviceMode, b8 power);

// HS_InfraredEntry sets the infrared trigger notification callback function.

// This function sets the notification callback for Edge Trigger.

MOONSEER_DEVICE_DRIVER_EXPORT void HS_InfraredEntry(LPFN_HS_InfraredEntry _fn);

// LPFN_HS_InfraredEntry Infrared Entry Notification Callbacks

// @params deviceFuncId [b8] module ID, determined by the value of DeviceFunctionEnum to determine the type of module function returned

// @params state [bool] true if IR sensing is triggered, false if IR sensing is not triggered

// Listen for edge triggering, i.e. only once when entering or leaving the IR range.

typedef void (*LPFN_HS_InfraredEntry) (b8 deviceFuncId, bool state);

3.12 Infrared entry notification callback (horizontal trigger)

// HS_InfraredSustained sets the infrared trigger notification callback function.

// This function sets up a Level Trigger notification callback.

MOONSEER_DEVICE_DRIVER_EXPORT void HS_InfraredSustained(LPFN_HS_InfraredSustained _fn);

// LPFN_HS_InfraredSustained Infrared Entry Sustained Awareness Notification Callbacks

// @params deviceFuncId [b8] module ID, determined by the value of DeviceFunctionEnum to determine the type of module function returned

// @params state [bool] true for continuous IR sensing (high level signal), fals e for continuous IR unawareness (low level // signal)ate);

// Listen for a continuous level signal, this callback function, once registered, will continuously send the current state of the infrared

typedef void (*LPFN_HS_InfraredSustained) (b8 deviceFuncId, bool state);

3.13 Configuration of Haptic parameters

If you want the Vest to support Haptic, you can use the Haptic related interface. In the SDK, the default configuration of the parameters of Haptic is 0. The developer can configure multiple vibration points at the same time and the vibration time and vibration amplitude of each point can be set independently.

The Haptic parameter configuration will not produce Haptic immediately, you need to call HS_ArmorShake() method to send Haptic command, at the same time, after the command is sent, the SDK will be configured to set all the parameters of the Haptic to 0. The next time before the vibration to call the Haptic parameter configuration function to configure again.

// Setting the vibration (Haptic) parameters

// @params motorIndex index of the vibration point, index takes the value 0-11, refer to chapter 2.3.17 for the specific distribution map

// @params shakeTime The shake time of the point, 1 unit represents 100ms, the range is [1,100], the actual shake time is:

// @params shakePower the strength of the vibration, range [1, 100], strength 1 is the smallest, 100 is the strongest.

MOONSEER_DEVICE_DRIVER_EXPORT void HS_SetArmorShake(b8 motorIndex, b8 shakeTime, b8 shakePower);

3.14 Haptic vibration

Call the Haptic function to send the configuration parameters to the multifunctional Vest and clear the Haptic configuration table (next vibration requires reconfiguration)

// Generate Haptic (vibration)

MOONSEER_DEVICE_DRIVER_EXPORT void HS_ArmorShake();

3.15 Haptic point map
Frontal distribution
3.16 Close and release resources

After calling this method, the system will close the connection and clear the resources, if you need to reconnect next time, you need to call the initialise and connect function.

The HS_ReleaseDevice() function call also calls the BLE state switch function and the data stream state switch callback function.

// End and release resources

MOONSEER_DEVICE_DRIVER_EXPORT void HS_ReleaseDevice();

Backside distribution
GO TO"WANDERING IN SPACE"
Copyright 2023 MOONSEER LIMITED
FOLLOW US