Main Page
Classes
Files
File List
File Members
include
shvel-param.h
Go to the documentation of this file.
1
// Copyright (c) 2010-2016 The YP-Spur Authors, except where otherwise indicated.
2
//
3
// Permission is hereby granted, free of charge, to any person obtaining a copy
4
// of this software and associated documentation files (the "Software"), to
5
// deal in the Software without restriction, including without limitation the
6
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
// sell copies of the Software, and to permit persons to whom the Software is
8
// furnished to do so, subject to the following conditions:
9
//
10
// The above copyright notice and this permission notice shall be included in
11
// all copies or substantial portions of the Software.
12
//
13
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
// SOFTWARE.
20
21
#ifndef SHVEL_PARAM_H
22
#define SHVEL_PARAM_H
23
24
typedef
union
25
{
26
int
integer
;
27
char
byte[4];
28
}
Int_4Char
;
29
30
typedef
union
_short_2char
31
{
32
short
integer
;
33
char
byte
[2];
34
}
Short_2Char
;
35
36
// typedef
37
enum
38
{
39
SERVO_LEVEL_STOP
= 0,
40
SERVO_LEVEL_COUNTER
,
41
SERVO_LEVEL_TORQUE
,
42
SERVO_LEVEL_VELOCITY
,
43
SERVO_LEVEL_POSITION
,
// not used
44
SERVO_LEVEL_OPENFREE
,
45
};
46
47
typedef
enum
48
{
49
PARAM_w_ref
= 0,
50
PARAM_w_ref_highprec
,
51
PARAM_p_ki
,
52
PARAM_p_kv
,
53
PARAM_p_fr_plus
,
54
PARAM_p_fr_wplus
,
55
PARAM_p_fr_minus
,
56
PARAM_p_fr_wminus
,
57
PARAM_p_A
,
58
PARAM_p_B
,
59
PARAM_p_C
,
60
PARAM_p_D
,
61
PARAM_p_E
,
62
PARAM_p_F
,
63
PARAM_p_pi_kp
,
64
PARAM_p_pi_ki
,
65
PARAM_pwm_max
,
66
PARAM_pwm_min
,
67
PARAM_toq_max
,
68
PARAM_toq_min
,
69
PARAM_int_max
,
70
PARAM_int_min
,
71
PARAM_p_toq_offset
,
72
PARAM_toq_limit
,
73
PARAM_enc_rev
,
74
PARAM_motor_phase
,
75
PARAM_vsrc
,
76
PARAM_p_inertia_self
,
77
PARAM_p_inertia_cross
,
78
PARAM_enc_type
,
79
PARAM_control_cycle
,
80
PARAM_enc_div
,
81
PARAM_enc_denominator
,
82
PARAM_servo
= 64,
83
PARAM_watch_dog_limit
,
84
PARAM_heartbeat
,
85
PARAM_io_dir
= 96,
86
PARAM_io_data
,
87
PARAM_ad_mask
,
88
PARAM_phase_offset
,
89
PARAM_protocol_version
,
90
}
YPSpur_shvel_param
;
91
92
typedef
enum
93
{
94
INT_enc_index_rise
= 0,
95
INT_enc_index_fall
,
96
INT_error_state
,
97
}
YPSpur_shvel_interrupt
;
98
99
typedef
enum
100
{
101
ERROR_NONE
= 0,
102
ERROR_LOW_VOLTAGE
= 0x0001,
103
ERROR_HALL_SEQ
= 0x0002,
104
ERROR_HALL_ENC
= 0x0004,
105
ERROR_WATCHDOG
= 0x0008
106
}
YPSpur_shvel_error_state
;
107
108
#endif // SHVEL_PARAM_H
INT_error_state
Definition:
shvel-param.h:96
SERVO_LEVEL_STOP
Definition:
shvel-param.h:39
INT_enc_index_fall
Definition:
shvel-param.h:95
SERVO_LEVEL_TORQUE
Definition:
shvel-param.h:41
PARAM_motor_phase
Definition:
shvel-param.h:74
PARAM_p_F
Definition:
shvel-param.h:62
SERVO_LEVEL_OPENFREE
Definition:
shvel-param.h:44
PARAM_p_fr_wminus
Definition:
shvel-param.h:56
PARAM_p_kv
Definition:
shvel-param.h:52
PARAM_enc_denominator
Definition:
shvel-param.h:81
_short_2char::integer
short integer
Definition:
shvel-param.h:32
PARAM_ad_mask
Definition:
shvel-param.h:87
PARAM_p_ki
Definition:
shvel-param.h:51
PARAM_p_C
Definition:
shvel-param.h:59
PARAM_toq_max
Definition:
shvel-param.h:67
Int_4Char::integer
int integer
Definition:
shvel-param.h:26
PARAM_p_pi_kp
Definition:
shvel-param.h:63
PARAM_w_ref_highprec
Definition:
shvel-param.h:50
PARAM_p_B
Definition:
shvel-param.h:58
PARAM_io_data
Definition:
shvel-param.h:86
PARAM_p_fr_wplus
Definition:
shvel-param.h:54
Short_2Char
union _short_2char Short_2Char
YPSpur_shvel_param
YPSpur_shvel_param
Definition:
shvel-param.h:47
_short_2char::byte
char byte[2]
Definition:
shvel-param.h:33
PARAM_p_inertia_cross
Definition:
shvel-param.h:77
YPSpur_shvel_interrupt
YPSpur_shvel_interrupt
Definition:
shvel-param.h:92
PARAM_p_fr_plus
Definition:
shvel-param.h:53
PARAM_p_pi_ki
Definition:
shvel-param.h:64
YPSpur_shvel_error_state
YPSpur_shvel_error_state
Definition:
shvel-param.h:99
PARAM_p_A
Definition:
shvel-param.h:57
SERVO_LEVEL_POSITION
Definition:
shvel-param.h:43
PARAM_phase_offset
Definition:
shvel-param.h:88
PARAM_watch_dog_limit
Definition:
shvel-param.h:83
PARAM_p_D
Definition:
shvel-param.h:60
ERROR_LOW_VOLTAGE
Definition:
shvel-param.h:102
PARAM_io_dir
Definition:
shvel-param.h:85
PARAM_control_cycle
Definition:
shvel-param.h:79
SERVO_LEVEL_COUNTER
Definition:
shvel-param.h:40
INT_enc_index_rise
Definition:
shvel-param.h:94
PARAM_w_ref
Definition:
shvel-param.h:49
PARAM_enc_rev
Definition:
shvel-param.h:73
ERROR_NONE
Definition:
shvel-param.h:101
PARAM_pwm_min
Definition:
shvel-param.h:66
PARAM_enc_type
Definition:
shvel-param.h:78
PARAM_heartbeat
Definition:
shvel-param.h:84
PARAM_vsrc
Definition:
shvel-param.h:75
PARAM_protocol_version
Definition:
shvel-param.h:89
PARAM_servo
Definition:
shvel-param.h:82
ERROR_HALL_SEQ
Definition:
shvel-param.h:103
PARAM_p_toq_offset
Definition:
shvel-param.h:71
_short_2char
Definition:
shvel-param.h:30
PARAM_int_max
Definition:
shvel-param.h:69
PARAM_p_inertia_self
Definition:
shvel-param.h:76
PARAM_pwm_max
Definition:
shvel-param.h:65
PARAM_int_min
Definition:
shvel-param.h:70
PARAM_toq_limit
Definition:
shvel-param.h:72
ERROR_HALL_ENC
Definition:
shvel-param.h:104
PARAM_p_fr_minus
Definition:
shvel-param.h:55
SERVO_LEVEL_VELOCITY
Definition:
shvel-param.h:42
PARAM_p_E
Definition:
shvel-param.h:61
ERROR_WATCHDOG
Definition:
shvel-param.h:105
PARAM_toq_min
Definition:
shvel-param.h:68
PARAM_enc_div
Definition:
shvel-param.h:80
Int_4Char
Definition:
shvel-param.h:24
yp-spur
Author(s):
autogenerated on Sat May 11 2019 02:08:24