# Autogenerated constants for Servo service
from jacdac.constants import *
from jacdac.system.constants import *
JD_SERVICE_CLASS_SERVO = const(0x12fc9103)
JD_SERVO_REG_ANGLE = const(JD_REG_VALUE)
JD_SERVO_REG_ENABLED = const(JD_REG_INTENSITY)
JD_SERVO_REG_OFFSET = const(0x81)
JD_SERVO_REG_MIN_ANGLE = const(JD_REG_MIN_VALUE)
JD_SERVO_REG_MIN_PULSE = const(0x83)
JD_SERVO_REG_MAX_ANGLE = const(JD_REG_MAX_VALUE)
JD_SERVO_REG_MAX_PULSE = const(0x85)
JD_SERVO_REG_STALL_TORQUE = const(0x180)
JD_SERVO_REG_RESPONSE_SPEED = const(0x181)
JD_SERVO_REG_ACTUAL_ANGLE = const(JD_REG_READING)
JD_SERVO_PACK_FORMATS = {
    JD_SERVO_REG_ANGLE: "i16.16",
    JD_SERVO_REG_ENABLED: "u8",
    JD_SERVO_REG_OFFSET: "i16.16",
    JD_SERVO_REG_MIN_ANGLE: "i16.16",
    JD_SERVO_REG_MIN_PULSE: "u16",
    JD_SERVO_REG_MAX_ANGLE: "i16.16",
    JD_SERVO_REG_MAX_PULSE: "u16",
    JD_SERVO_REG_STALL_TORQUE: "u16.16",
    JD_SERVO_REG_RESPONSE_SPEED: "u16.16",
    JD_SERVO_REG_ACTUAL_ANGLE: "i16.16"
}
