Platforms to show: All Mac Windows Linux Cross-Platform
Back to UniMotionMBS module.
UniMotionMBS.DetectSMS as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Sudden Motion Sensor | MBS MacOSX Plugin | 9.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use the constants powerbook, ibook, highrespb and macbookpro.
Use the value returned from DetectSMS as the type for the other functions.
Don't call readsms(detectsms...) as this will do extra work.
If you can't save the type between calls pass 0 as type to avoid extra work.
UniMotionMBS.LoadLibrary(file as folderitem) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Sudden Motion Sensor | MBS MacOSX Plugin | 9.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true on success and false on failure.
UniMotionMBS.ReadSMS(type as Integer, byref x as Integer, byref y as Integer, byref z as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Sudden Motion Sensor | MBS MacOSX Plugin | 9.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true on success and false on failure.
UniMotionMBS.ReadSMSraw(type as Integer, byref x as Integer, byref y as Integer, byref z as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Sudden Motion Sensor | MBS MacOSX Plugin | 9.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true on success and false on failure.
UniMotionMBS.ReadSMSrawBytes(type as Integer) as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Sudden Motion Sensor | MBS MacOSX Plugin | 9.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The raw SMS data (useful for debugging)
Note that endian issues make reading the raw bytes non-trivial.
Returns nil or a memoryblock with the data.
UniMotionMBS.ReadSMSreal(type as Integer, byref x as Double, byref y as Double, byref z as Double) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Sudden Motion Sensor | MBS MacOSX Plugin | 9.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Note that this is the preferred API as it need not change with new machines.
If no "scale" calibration data exists defaults will be used based on the machine type.
Returns true on success and false on failure.
UniMotionMBS.ReadSMSscaled(type as Integer, byref x as Integer, byref y as Integer, byref z as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Sudden Motion Sensor | MBS MacOSX Plugin | 9.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This reverses the backwards polarity of x and increases the range of the older machines to match the MacBook [Pro] sensor.
Returns true on success and false on failure.
The items on this page are in the following plugins: MBS MacOSX Plugin.