InoDrive / sysControl / takeControl
InoDrive.SysControl.takeControl(target)
Takes control of the InoDrive Module’s outputs and allows you to interact with the values therein. Must be utilized before setOutput, setHoldingBrake, etc.
Arguments:
• State (Boolean) Take Module control state, True or False.
Returns: Promise (Boolean) True or None on successfully taking control of Module.
// Import InoDrive API Library import { InoDriveApiJS } from "ck-inodrive-api" // Instatiate the API let InoDriveApi = new InoDriveApiJS.InoDriveApi({ connectAppUrl: "", secure: false }) // Instantiate InoDrive Object let Drive = await InoDriveApi.InoDrive({ target: "Name", autoConnect: true }) // Take Control of Module await Drive.SysControl.takeControl(true)