get the torque state of motor

        Returns:
            bool: True if torque is enabled, else False
517923
def get_torque_state(self):
        
        data = []
        data.append(0x09)
        data.append(self.servoid)
        data.append(RAM_READ_REQ)
        data.append(TORQUE_CONTROL_RAM)
        data.append(BYTE2)
        send_data(data)
        rxdata = []
        try:
            rxdata = SERPORT.read(13)
            return bool(ord(rxdata[9]))
        except HerkulexError:
            raise HerkulexError("could not communicate with motors")
1023996
def IsDevice(self):
    
    if self._stat_object is None:
      self._stat_object = self._GetStat()
    if self._stat_object is not None:
      self.entry_type = self._stat_object.type
    return self.entry_type == definitions.FILE_ENTRY_TYPE_DEVICE
251211
def enabled(self):
        
        # In auto-detection mode color enabled when terminal attached
        if self._mode == COLOR_AUTO:
            return sys.stdout.isatty()
        return self._mode == COLOR_ON
383495
def get_state(self, force_update=False):
        
        if force_update or self._state is None:
            return int(self.basicevent.GetBinaryState()['BinaryState'])
        return self._state
13631
def get_motor_offsets(SERVO_OUTPUT_RAW, ofs, motor_ofs):
    ''''''
    import mavutil
    self = mavutil.mavfile_global

    m = SERVO_OUTPUT_RAW
    motor_pwm = m.servo1_raw + m.servo2_raw + m.servo3_raw + m.servo4_raw
    motor_pwm *= 0.25
    rc3_min = self.param('RC3_MIN', 1100)
    rc3_max = self.param('RC3_MAX', 1900)
    motor = (motor_pwm - rc3_min) / (rc3_max - rc3_min)
    if motor > 1.0:
        motor = 1.0
    if motor < 0.0:
        motor = 0.0

    motor_offsets0 = motor_ofs[0] * motor
    motor_offsets1 = motor_ofs[1] * motor
    motor_offsets2 = motor_ofs[2] * motor
    ofs = (ofs[0] + motor_offsets0, ofs[1] + motor_offsets1, ofs[2] + motor_offsets2)

    return ofs
32348
def check_state(self, state):
        

        if state.addr == self.function.addr:
            arch = state.arch
            if self._check_arguments(arch, state):
                return True

        return False
441648
static function isDynamicVatChargingEnabled()
    {
        if ( isset( $GLOBALS['eZVATManager_isDynamicVatChargingEnabled'] ) )
            return $GLOBALS['eZVATManager_isDynamicVatChargingEnabled'];

        $enabled = is_object( eZVATManager::loadVATHandler() );
        $GLOBALS['eZVATManager_isDynamicVatChargingEnabled'] = $enabled;
        return $enabled;
    }
279256
def get_actuators(self):
        
        return {i.name: i.status for i in self.system.actuators}
1250332
def status(self):
        
        data = self._read()
        self._status = YubiKeyUSBHIDStatus(data)
        return self._status
1052144
def GetStat(self):
    
    if self._stat_object is None:
      self._stat_object = self._GetStat()
    return self._stat_object
128560
def PartialDynamicSystem(self, ieq, variable):
        
        if ieq == 0:
            # U1=0
            if variable == self.variables[0]:
                b1 = FunctionBlock(
                    self.physical_nodes[0].variable, self.max_torque, self.Tmax)
                b2 = Saturation(self.commands[0], self.throttle, 0, 1)
                b3 = Product(self.max_torque, self.throttle, variable)
                return[b1, b2, b3]
836254
def _get_state(self):
        

        result = yield from self._execute("showvminfo", [self._vmname, "--machinereadable"])
        for info in result.splitlines():
            if '=' in info:
                name, value = info.split('=', 1)
                if name == "VMState":
                    return value.strip('"')
        return "unknown"
719924
def get_position_i(self):
        
        data = []
        data.append(0x09)
        data.append(self.servoid)
        data.append(RAM_READ_REQ)
        data.append(POSITION_KI_RAM)
        data.append(BYTE2)
        send_data(data)
        rxdata = []
        try:
            rxdata = SERPORT.read(13)
            return (ord(rxdata[10])*256)+(ord(rxdata[9])&0xff)
        except HerkulexError:
            raise HerkulexError("Could not read from motors")
237816
def IsAllocated(self):
    
    if self._stat_object is None:
      self._stat_object = self._GetStat()
    return self._stat_object and self._stat_object.is_allocated
835164
function torqueDemo_lis(KMRotState){
    let stepInterval=Math.PI/4;
    let diff=torqueDemo_pos_sep-KMRotState.position;
    if(diff>stepInterval||diff< -stepInterval){
        torqueDemo_pos_sep=KMRotState.position;
        torqueDemo_set_torque+=(diff>0?0.005:-0.005);
        torqueDemo_set_torque=torqueDemo_set_torque>0.2?0.2:torqueDemo_set_torque;//安全の為
        if(torqueDemo_revlocksw){
          KMB.cmdMoveToPosition(torqueDemo_pos_sep);//ここを有効にすると、手を離しても戻らなくなる
        }
        KMB.cmdMaxTorque(torqueDemo_set_torque);
        $("#torqueDemoInfo").text("Now Torque: "+torqueDemo_set_torque);
    }
    console.log("torqueDemo_set_torque:"+torqueDemo_set_torque);
}
25880
def get_state(self):
        ""
        return {'opt_state':self.opt.state_dict(), 'lr':self._lr, 'wd':self._wd, 'beta':self._beta, 'mom':self._mom,
                'opt_func':self.opt_func, 'true_wd':self.true_wd, 'bn_wd':self.bn_wd}
381023
def measured_current(self):
        
        self._measured_current, value = self.get_attr_int(self._measured_current, 'current_now')
        return value