Set Controller Digital Output to low/high level.
GLOBAL.XArm.xarm_printed = True
ret = yield self._wait_until_cmdnum_lt_max()
if ret is not None:
return response(client, cmd_id, ret)
ionum = data.get('ionum')
value = int(data.get('value'))
xyz = data.get('xyz')
tol_r = data.get('tol_r')
code = GLOBAL.XArm.xarm.set_cgpio_digital_with_xyz(ionum, value, xyz, tol_r)
response(client, cmd_id, code)
self.set_cgpio_digital = async (ionum, value, callback, delay) => {
const params = window.GlobalConstant.INIT_CMD_PARAMS_COMMON_DATA();
Object.assign(params.data, {
ionum: ionum,
value: value,
delay: (delay !== undefined && delay > 0) ? delay : 0
});
console.log('set_cgpio_digital params', params);
const cmd_id = self.sendCmd(window.GlobalConstant.SET_CGPIO_DIGITAL, params, (dict) => {
self.codeHandle(dict, 'set cgpio digital', true);
if (callback) {
callback(dict);
}
});
await self.socketCom.wait(cmd_id);
};