datatypes.h
Go to the documentation of this file.
1 // Copyright 2020 F1TENTH Foundation
2 //
3 // Redistribution and use in source and binary forms, with or without modification, are permitted
4 // provided that the following conditions are met:
5 //
6 // 1. Redistributions of source code must retain the above copyright notice, this list of conditions
7 // and the following disclaimer.
8 //
9 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
10 // of conditions and the following disclaimer in the documentation and/or other materials
11 // provided with the distribution.
12 //
13 // 3. Neither the name of the copyright holder nor the names of its contributors may be used
14 // to endorse or promote products derived from this software without specific prior
15 // written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
18 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
20 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
24 // WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 /*
27  Copyright 2016 - 2017 Benjamin Vedder benjamin@vedder.se
28 
29  This file is part of VESC Tool.
30 
31  VESC Tool is free software: you can redistribute it and/or modify
32  it under the terms of the GNU General Public License as published by
33  the Free Software Foundation, either version 3 of the License, or
34  (at your option) any later version.
35 
36  VESC Tool is distributed in the hope that it will be useful,
37  but WITHOUT ANY WARRANTY; without even the implied warranty of
38  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39  GNU General Public License for more details.
40 
41  You should have received a copy of the GNU General Public License
42  along with this program. If not, see <http://www.gnu.org/licenses/>.
43  */
44 
45 #ifndef VESC_DRIVER_DATATYPES_H
46 #define VESC_DRIVER_DATATYPES_H
47 
48 #include <cstdint>
49 
50 typedef struct
51 {
52  bool isVesc;
53 }
55 
56 typedef enum
57 {
64 }
65 CFG_T;
66 
67 typedef enum
68 {
79 }
80 VESC_TX_T;
81 
82 typedef enum
83 {
91 }
93 
94 typedef enum
95 {
103 }
105 
106 struct MC_VALUES
107 {
108 public:
109  double v_in;
110  double temp_mos;
111  double temp_motor;
113  double current_in;
114  double id;
115  double iq;
116  double rpm;
117  double duty_now;
118  double amp_hours;
120  double watt_hours;
124  double position;
126 };
127 
128 typedef enum
129 {
138 }
140 
141 typedef enum
142 {
181 }
183 
184 typedef struct
185 {
186  int js_x;
187  int js_y;
188  int acc_x;
189  int acc_y;
190  int acc_z;
191  bool bt_c;
192  bool bt_z;
193 }
194 chuck_data;
195 
197 {
198 public:
201  int hall_res;
202 };
203 
204 typedef enum
205 {
209 }
211 
212 #endif // VESC_DRIVER_DATATYPES_H
double temp_mos
Definition: datatypes.h:110
CFG_T
Definition: datatypes.h:56
int tachometer_abs
Definition: datatypes.h:123
NRF_PAIR_RES
Definition: datatypes.h:204
double bemf_coupling_k
Definition: datatypes.h:200
mc_fault_code fault_code
Definition: datatypes.h:125
COMM_PACKET_ID
Definition: datatypes.h:141
double watt_hours
Definition: datatypes.h:120
bool bt_z
Definition: datatypes.h:192
double v_in
Definition: datatypes.h:109
int hall_res
Definition: datatypes.h:201
double watt_hours_charged
Definition: datatypes.h:121
double position
Definition: datatypes.h:124
double amp_hours
Definition: datatypes.h:118
disp_pos_mode
Definition: datatypes.h:94
double duty_now
Definition: datatypes.h:117
double current_in
Definition: datatypes.h:113
double cycle_int_limit
Definition: datatypes.h:199
double iq
Definition: datatypes.h:115
double temp_motor
Definition: datatypes.h:111
bool bt_c
Definition: datatypes.h:191
double id
Definition: datatypes.h:114
mc_fault_code
Definition: datatypes.h:82
double amp_hours_charged
Definition: datatypes.h:119
double rpm
Definition: datatypes.h:116
debug_sampling_mode
Definition: datatypes.h:128
int tachometer
Definition: datatypes.h:122
double current_motor
Definition: datatypes.h:112
VESC_TX_T
Definition: datatypes.h:67


vesc_driver
Author(s): Michael T. Boulet , Joshua Whitley
autogenerated on Sun Apr 18 2021 02:48:01