theta-ble-client-react-native
Version:
This library provides a way to control RICOH THETA using
86 lines (81 loc) • 2.85 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CameraControlCommands = void 0;
var _thetaService = require("./theta-service");
var _values = require("./values");
var ThetaBleClient = _interopRequireWildcard(require("../native"));
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
/* eslint no-useless-catch: 0 */
/**
* Camera Control Commands Service
*
* Service: 32886D39-BA23-425C-BCAE-9C1DB0066922
*/
class CameraControlCommands extends _thetaService.ThetaService {
constructor(device) {
super();
this.service = _values.BleServiceEnum.CAMERA_CONTROL_COMMANDS;
this.device = device;
}
/**
* Acquires a list of installed plugins.
*
* RICOH THETA V firmware v2.21.1 or later.
*
* Service: 32886D39-BA23-425C-BCAE-9C1DB0066922
* Characteristic: E83264B2-C52D-454E-95BD-6485DE912430
*
* @returns plugin number list
*/
async getPluginList() {
try {
return await ThetaBleClient.nativeGetPluginList(this.device.id);
} catch (error) {
throw error;
}
}
/**
* Acquires the plugins for plugin mode.
*
* RICOH THETA Z1 or later.
*
* When not specifying, set 0. If an 0 is placed mid-way, it will be moved to the front.
* Specifying zero plugin will result in an error.
*
* Service: 32886D39-BA23-425C-BCAE-9C1DB0066922
* Characteristic: 8F710EDC-6F9B-45D4-A5F7-E6EDA304E790
*
* @returns plugin order
*/
async getPluginOrders() {
try {
return await ThetaBleClient.nativeGetPluginOrders(this.device.id);
} catch (error) {
throw error;
}
}
/**
* Set the plugins for plugin mode.
*
* RICOH THETA Z1 or later.
*
* When not specifying, set 0. If an 0 is placed mid-way, it will be moved to the front.
* Specifying zero plugin will result in an error.
*
* Service: 32886D39-BA23-425C-BCAE-9C1DB0066922
* Characteristic: 8F710EDC-6F9B-45D4-A5F7-E6EDA304E790
*
* @param value plugin order
*/
async setPluginOrders(value) {
try {
return await ThetaBleClient.nativeSetPluginOrders(this.device.id, value);
} catch (error) {
throw error;
}
}
}
exports.CameraControlCommands = CameraControlCommands;
//# sourceMappingURL=camera-control-commands.js.map