commands.h
Go to the documentation of this file.
1 // BSD 3-Clause License
2 
3 // Copyright (c) 2015-2018, qbrobotics®
4 // All rights reserved.
5 
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 
9 // * Redistributions of source code must retain the above copyright notice, this
10 // list of conditions and the following disclaimer.
11 
12 // * Redistributions in binary form must reproduce the above copyright notice,
13 // this list of conditions and the following disclaimer in the documentation
14 // and/or other materials provided with the distribution.
15 
16 // * Neither the name of the copyright holder nor the names of its
17 // contributors may be used to endorse or promote products derived from
18 // this software without specific prior written permission.
19 
20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
46 #ifndef COM_COMMANDS_DEFINITIONS_H_INCLUDED
47 #define COM_COMMANDS_DEFINITIONS_H_INCLUDED
48 
49 #define API_VERSION "v6.2.0"
50 
51 //==============================================================================
52 // COMMANDS
53 //==============================================================================
54 
55 
61 {
62 
63 //========================================================= general commands
64 
65  CMD_PING = 0,
72 
75 
77  CMD_INIT_MEM = 10,
81  CMD_HAND_CALIBRATE = 13,
83 
84 //========================================================= qbcommands
85 
86  CMD_ACTIVATE = 128,
87  CMD_GET_ACTIVATE = 129,
89  CMD_SET_INPUTS = 130,
93  CMD_GET_CURRENTS = 133,
95  CMD_GET_CURR_AND_MEAS = 134,
97  CMD_SET_POS_STIFF = 135,
99  CMD_GET_EMG = 136,
100  CMD_GET_VELOCITIES = 137,
102  CMD_GET_COUNTERS = 138,
104  CMD_GET_ACCEL = 139,
106  CMD_GET_CURR_DIFF = 140,
108  CMD_SET_CURR_DIFF = 141,
111  CMD_SET_CUFF_INPUTS = 142,
113  CMD_SET_WATCHDOG = 143,
115  CMD_SET_BAUDRATE = 144,
117  CMD_EXT_DRIVE = 145,
119  CMD_GET_JOYSTICK = 146,
121  CMD_SET_INPUTS_ACK = 147
123 };
125 
127 //==============================================================================
128 // PARAMETERS
129 //==============================================================================
134 {
135 
136  PARAM_ID = 0,
140 
150  PARAM_MAX_STEP_POS = 9,
155  PARAM_CURRENT_LIMIT = 12,
167  PARAM_DL_POS_PID = 24,
170 };
171 //** \} */
172 
173 
174 //=================================================== resolution definitions
175 
177 {
187 };
188 
189 //============================================================== input modes
190 
192 {
194  INPUT_MODE_ENCODER3 = 1,
199  INPUT_MODE_EMG_FCFS = 4,
203 };
206 
207 //============================================================ control modes
208 
210 
217 
218 };
219 
220 //======================================================== motor supply voltage values
221 
225 };
226 //==================================================== acknowledgment values
228 {
230  ACK_OK = 1
231 };
232 
233 //============================================== data types enumeration
234 
236  TYPE_FLAG = 0, //A uint8 but with a menu
245 };
246 
247 #define PARAM_BYTE_SLOT 50 //Number of bytes reserved to param's information
248 #define PARAM_MENU_SLOT 150 //Number of bytes reserved to a param menu
249 
252 //==============================================================================
253 // INFORMATION
254 //==============================================================================
257 #define INFO_ALL 0
258 
259 
261 // ----------------------------------------------------------------------------
262 #endif
263 
264 /* [] END OF FILE */
Enable calibration on startup.
Definition: commands.h:158
Command for asking device's current measurements.
Definition: commands.h:94
Starts a series of opening and closures of the hand.
Definition: commands.h:82
Command for setting reference inputs.
Definition: commands.h:90
Double loop current PID.
Definition: commands.h:169
PID parameters.
Definition: commands.h:137
Maximum value of EMG.
Definition: commands.h:160
Position and current control.
Definition: commands.h:214
Current control.
Definition: commands.h:213
Deflection and current control.
Definition: commands.h:216
Enable/disable position limiting.
Definition: commands.h:148
Command to set the actual measurements as inputs to another device (Only for Armslider device) ...
Definition: commands.h:118
Starts the stiffness calibration of the qbMove.
Definition: commands.h:79
Command to set the device inputs and return an acknowledgment signal (needed for less comm...
Definition: commands.h:122
Command to get the joystick measurements (Only for devices driven by a joystick)
Definition: commands.h:120
Multiplier between handle and motor.
Definition: commands.h:164
Limit for absorbed current.
Definition: commands.h:157
Command for asking device's emg sensors measurements.
Definition: commands.h:99
Motor supply voltage of the hand.
Definition: commands.h:165
Adds a constant offset to the measurements.
Definition: commands.h:144
qbmove_resolution
Definition: commands.h:176
Asks for a ping message.
Definition: commands.h:65
Choose the kind of control between position control, current control, direct PWM value or current+pos...
Definition: commands.h:141
Input mode.
Definition: commands.h:139
Start up activation byte.
Definition: commands.h:138
Store current parameters as factory parameters.
Definition: commands.h:69
Used to slow down movements for positive values.
Definition: commands.h:152
Restore default factory parameters.
Definition: commands.h:70
qbmove_control_mode
Definition: commands.h:209
Command for activating/deactivating the device.
Definition: commands.h:86
Double Encoder Y/N.
Definition: commands.h:163
Command used to set Cuff device inputs (Only for Cuff device)
Definition: commands.h:112
Encoder 3 drives all inputs.
Definition: commands.h:195
Classic position control.
Definition: commands.h:211
Command for setting baudrate of communication.
Definition: commands.h:116
Command for asking device's measurements and currents.
Definition: commands.h:96
qbmove_input_mode
Definition: commands.h:191
Minimum value to have effect.
Definition: commands.h:159
motor_supply_tipe
Definition: commands.h:222
Command for getting device activation state.
Definition: commands.h:88
Closure speed when using EMG.
Definition: commands.h:161
data_types
Definition: commands.h:235
Stores all parameters in memory and loads them.
Definition: commands.h:67
Not used in the softhand firmware.
Definition: commands.h:98
Use 2 EMG.
Definition: commands.h:200
qbmove_command
Definition: commands.h:60
Command for setting the encoders zero position.
Definition: commands.h:66
Deflection control.
Definition: commands.h:215
Initialize the memory with the defalut values.
Definition: commands.h:78
Command for getting reference inputs.
Definition: commands.h:91
PID current control.
Definition: commands.h:162
Command for asking device's velocity measurements.
Definition: commands.h:101
Not Used.
Definition: commands.h:73
Sets the bootloader modality to update the firmware.
Definition: commands.h:76
Command for asking device's position measurements.
Definition: commands.h:92
Asks for a string of information about.
Definition: commands.h:71
Adds a multiplier to the measurements.
Definition: commands.h:146
Command for asking device's acceleration measurements.
Definition: commands.h:105
Command to get the parameters list or to set a defined value chosen by the use.
Definition: commands.h:80
acknowledgment_values
Definition: commands.h:227
qbmove_parameter
Definition: commands.h:133
Command for asking device's current difference between a measured one and an estimated one (Only for ...
Definition: commands.h:107
Double loop position PID.
Definition: commands.h:168
Use 2 EMG signals to drive motor position.
Definition: commands.h:198
Angle resolution for inputs and measurements.
Definition: commands.h:154
Used to slow down movements for negative values.
Definition: commands.h:153
Position limit values | int32 | int32 | int32 | int32 | | INF_LIM_1 | SUP_LIM_1 | INF_LIM_2 | SUP_LIM...
Definition: commands.h:149
Device's ID number.
Definition: commands.h:136
References through external commands (default)
Definition: commands.h:193
Table of values used to calculate an estimated current of the SoftHand.
Definition: commands.h:166
Command for asking device's counters (mostly used for debugging sent commands)
Definition: commands.h:103
Command for setting watchdog timer or disable it.
Definition: commands.h:114
Command used to set current difference modality (Only for Cuff device)
Definition: commands.h:110
Direct PWM value.
Definition: commands.h:212
Use EMG measure to proportionally drive the position of the motor 1.
Definition: commands.h:196
Not Used.
Definition: commands.h:74


qb_device_driver
Author(s): qbrobotics®
autogenerated on Wed Oct 9 2019 03:45:42