shvel-param.h
Go to the documentation of this file.
00001 // Copyright (c) 2010-2016 The YP-Spur Authors, except where otherwise indicated.
00002 //
00003 // Permission is hereby granted, free of charge, to any person obtaining a copy
00004 // of this software and associated documentation files (the "Software"), to
00005 // deal in the Software without restriction, including without limitation the
00006 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
00007 // sell copies of the Software, and to permit persons to whom the Software is
00008 // furnished to do so, subject to the following conditions:
00009 //
00010 // The above copyright notice and this permission notice shall be included in
00011 // all copies or substantial portions of the Software.
00012 //
00013 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00014 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00015 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00016 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00017 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00018 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00019 // SOFTWARE.
00020 
00021 #ifndef SHVEL_PARAM_H
00022 #define SHVEL_PARAM_H
00023 
00024 typedef union
00025 {
00026   int integer;
00027   char byte[4];
00028 } Int_4Char;
00029 
00030 typedef union _short_2char
00031 {
00032   short integer;
00033   char byte[2];
00034 } Short_2Char;
00035 
00036 // typedef
00037 enum
00038 {
00039   SERVO_LEVEL_STOP = 0,
00040   SERVO_LEVEL_COUNTER,
00041   SERVO_LEVEL_TORQUE,
00042   SERVO_LEVEL_VELOCITY,
00043   SERVO_LEVEL_POSITION,  // not used
00044   SERVO_LEVEL_OPENFREE,
00045 };
00046 
00047 typedef enum
00048 {
00049   PARAM_w_ref = 0,
00050   PARAM_w_ref_highprec,
00051   PARAM_p_ki,
00052   PARAM_p_kv,
00053   PARAM_p_fr_plus,
00054   PARAM_p_fr_wplus,
00055   PARAM_p_fr_minus,
00056   PARAM_p_fr_wminus,
00057   PARAM_p_A,
00058   PARAM_p_B,
00059   PARAM_p_C,
00060   PARAM_p_D,
00061   PARAM_p_E,
00062   PARAM_p_F,
00063   PARAM_p_pi_kp,
00064   PARAM_p_pi_ki,
00065   PARAM_pwm_max,
00066   PARAM_pwm_min,
00067   PARAM_toq_max,
00068   PARAM_toq_min,
00069   PARAM_int_max,
00070   PARAM_int_min,
00071   PARAM_p_toq_offset,
00072   PARAM_toq_limit,
00073   PARAM_enc_rev,
00074   PARAM_motor_phase,
00075   PARAM_vsrc,
00076   PARAM_p_inertia_self,
00077   PARAM_p_inertia_cross,
00078   PARAM_enc_type,
00079   PARAM_control_cycle,
00080   PARAM_enc_div,
00081   PARAM_enc_denominator,
00082   PARAM_servo = 64,
00083   PARAM_watch_dog_limit,
00084   PARAM_heartbeat,
00085   PARAM_io_dir = 96,
00086   PARAM_io_data,
00087   PARAM_ad_mask,
00088   PARAM_phase_offset,
00089   PARAM_protocol_version,
00090 } YPSpur_shvel_param;
00091 
00092 typedef enum
00093 {
00094   INT_enc_index_rise = 0,
00095   INT_enc_index_fall,
00096   INT_error_state,
00097 } YPSpur_shvel_interrupt;
00098 
00099 typedef enum
00100 {
00101   ERROR_NONE = 0,
00102   ERROR_LOW_VOLTAGE = 0x0001,
00103   ERROR_HALL_SEQ = 0x0002,
00104   ERROR_HALL_ENC = 0x0004,
00105   ERROR_WATCHDOG = 0x0008
00106 } YPSpur_shvel_error_state;
00107 
00108 #endif  // SHVEL_PARAM_H


yp-spur
Author(s):
autogenerated on Fri May 10 2019 02:52:19