File tree Expand file tree Collapse file tree 13 files changed +40
-309
lines changed Expand file tree Collapse file tree 13 files changed +40
-309
lines changed Original file line number Diff line number Diff line change @@ -106,38 +106,9 @@ void loop() {
106
106
107
107
// function intended to be used with serial plotter to monitor motor variables
108
108
// significantly slowing the execution down!!!!
109
- // motor_monitor ();
109
+ // motor.monitor ();
110
110
}
111
111
112
- // utility function intended to be used with serial plotter to monitor motor variables
113
- // significantly slowing the execution down!!!!
114
- void motor_monitor () {
115
- switch (motor.controller ) {
116
- case ControlType::velocity:
117
- Serial.print (motor.voltage_q );
118
- Serial.print (" \t " );
119
- Serial.print (motor.shaft_velocity_sp );
120
- Serial.print (" \t " );
121
- Serial.println (motor.shaft_velocity );
122
- break ;
123
- case ControlType::angle:
124
- Serial.print (motor.voltage_q );
125
- Serial.print (" \t " );
126
- Serial.print (motor.shaft_angle_sp );
127
- Serial.print (" \t " );
128
- Serial.println (motor.shaft_angle );
129
- break ;
130
- case ControlType::voltage:
131
- Serial.print (motor.voltage_q );
132
- Serial.print (" \t " );
133
- Serial.print (motor.shaft_velocity );
134
- Serial.print (" \t " );
135
- Serial.println (motor.shaft_angle );
136
- break ;
137
- }
138
- }
139
-
140
-
141
112
// Serial communication callback function
142
113
// gets the target value from the user
143
114
void serialEvent () {
Original file line number Diff line number Diff line change @@ -131,35 +131,7 @@ void loop() {
131
131
132
132
// function intended to be used with serial plotter to monitor motor variables
133
133
// significantly slowing the execution down!!!!
134
- // motor_monitor();
135
- }
136
-
137
- // utility function intended to be used with serial plotter to monitor motor variables
138
- // significantly slowing the execution down!!!!
139
- void motor_monitor () {
140
- switch (motor.controller ) {
141
- case ControlType::velocity:
142
- Serial.print (motor.voltage_q );
143
- Serial.print (" \t " );
144
- Serial.print (motor.shaft_velocity_sp );
145
- Serial.print (" \t " );
146
- Serial.println (motor.shaft_velocity );
147
- break ;
148
- case ControlType::angle:
149
- Serial.print (motor.voltage_q );
150
- Serial.print (" \t " );
151
- Serial.print (motor.shaft_angle_sp );
152
- Serial.print (" \t " );
153
- Serial.println (motor.shaft_angle );
154
- break ;
155
- case ControlType::voltage:
156
- Serial.print (motor.voltage_q );
157
- Serial.print (" \t " );
158
- Serial.print (motor.shaft_angle );
159
- Serial.print (" \t " );
160
- Serial.println (motor.shaft_velocity );
161
- break ;
162
- }
134
+ // motor.monitor();
163
135
}
164
136
165
137
// Serial communication callback function
Original file line number Diff line number Diff line change @@ -120,34 +120,7 @@ void loop() {
120
120
121
121
// function intended to be used with serial plotter to monitor motor variables
122
122
// significantly slowing the execution down!!!!
123
- // motor_monitor ();
123
+ // motor.monitor ();
124
124
}
125
125
126
- // utility function intended to be used with serial plotter to monitor motor variables
127
- // significantly slowing the execution down!!!!
128
- void motor_monitor () {
129
- switch (motor.controller ) {
130
- case ControlType::velocity:
131
- Serial.print (motor.voltage_q );
132
- Serial.print (" \t " );
133
- Serial.print (motor.shaft_velocity_sp );
134
- Serial.print (" \t " );
135
- Serial.println (motor.shaft_velocity );
136
- break ;
137
- case ControlType::angle:
138
- Serial.print (motor.voltage_q );
139
- Serial.print (" \t " );
140
- Serial.print (motor.shaft_angle_sp );
141
- Serial.print (" \t " );
142
- Serial.println (motor.shaft_angle );
143
- break ;
144
- case ControlType::voltage:
145
- Serial.print (motor.voltage_q );
146
- Serial.print (" \t " );
147
- Serial.print (motor.shaft_angle );
148
- Serial.print (" \t " );
149
- Serial.println (motor.shaft_velocity );
150
- break ;
151
- }
152
- }
153
126
Original file line number Diff line number Diff line change @@ -121,38 +121,12 @@ void loop() {
121
121
122
122
// function intended to be used with serial plotter to monitor motor variables
123
123
// significantly slowing the execution down!!!!
124
- // motor_monitor ();
124
+ // motor.monitor ();
125
125
126
126
// keep track of loop number
127
127
t++;
128
128
}
129
129
130
- // utility function intended to be used with serial plotter to monitor motor variables
131
- // significantly slowing the execution down!!!!
132
- void motor_monitor () {
133
- switch (motor.controller ) {
134
- case ControlType::velocity:
135
- Serial.print (motor.voltage_q );
136
- Serial.print (" \t " );
137
- Serial.print (motor.shaft_velocity_sp );
138
- Serial.print (" \t " );
139
- Serial.println (motor.shaft_velocity );
140
- break ;
141
- case ControlType::angle:
142
- Serial.print (motor.voltage_q );
143
- Serial.print (" \t " );
144
- Serial.print (motor.shaft_angle_sp );
145
- Serial.print (" \t " );
146
- Serial.println (motor.shaft_angle );
147
- break ;
148
- case ControlType::voltage:
149
- Serial.print (motor.voltage_q );
150
- Serial.print (" \t " );
151
- Serial.println (motor.shaft_velocity );
152
- break ;
153
- }
154
- }
155
-
156
130
// Serial communication callback function
157
131
// gets the target value from the user
158
132
void serialEvent () {
Original file line number Diff line number Diff line change @@ -122,33 +122,7 @@ void loop() {
122
122
123
123
// function intended to be used with serial plotter to monitor motor variables
124
124
// significantly slowing the execution down!!!!
125
- // motor_monitor();
126
- }
127
-
128
- // utility function intended to be used with serial plotter to monitor motor variables
129
- // significantly slowing the execution down!!!!
130
- void motor_monitor () {
131
- switch (motor.controller ) {
132
- case ControlType::velocity:
133
- Serial.print (motor.voltage_q );
134
- Serial.print (" \t " );
135
- Serial.print (motor.shaft_velocity_sp );
136
- Serial.print (" \t " );
137
- Serial.println (motor.shaft_velocity );
138
- break ;
139
- case ControlType::angle:
140
- Serial.print (motor.voltage_q );
141
- Serial.print (" \t " );
142
- Serial.print (motor.shaft_angle_sp );
143
- Serial.print (" \t " );
144
- Serial.println (motor.shaft_angle );
145
- break ;
146
- case ControlType::voltage:
147
- Serial.print (motor.voltage_q );
148
- Serial.print (" \t " );
149
- Serial.println (motor.shaft_velocity );
150
- break ;
151
- }
125
+ // motor.monitor();
152
126
}
153
127
154
128
// Serial communication callback function
Original file line number Diff line number Diff line change @@ -87,35 +87,7 @@ void loop() {
87
87
88
88
// function intended to be used with serial plotter to monitor motor variables
89
89
// significantly slowing the execution down!!!!
90
- motor_monitor ();
91
- }
92
-
93
- // utility function intended to be used with serial plotter to monitor motor variables
94
- // significantly slowing the execution down!!!!
95
- void motor_monitor () {
96
- switch (motor.controller ) {
97
- case ControlType::velocity:
98
- Serial.print (motor.voltage_q );
99
- Serial.print (" \t " );
100
- Serial.print (motor.shaft_velocity_sp );
101
- Serial.print (" \t " );
102
- Serial.println (motor.shaft_velocity );
103
- break ;
104
- case ControlType::angle:
105
- Serial.print (motor.voltage_q );
106
- Serial.print (" \t " );
107
- Serial.print (motor.shaft_angle_sp );
108
- Serial.print (" \t " );
109
- Serial.println (motor.shaft_angle );
110
- break ;
111
- case ControlType::voltage:
112
- Serial.print (motor.voltage_q );
113
- Serial.print (" \t " );
114
- Serial.print (motor.shaft_angle );
115
- Serial.print (" \t " );
116
- Serial.println (motor.shaft_velocity );
117
- break ;
118
- }
90
+ motor.monitor ();
119
91
}
120
92
121
93
Original file line number Diff line number Diff line change @@ -94,36 +94,9 @@ void loop() {
94
94
95
95
// function intended to be used with serial plotter to monitor motor variables
96
96
// significantly slowing the execution down!!!!
97
- // motor_monitor ();
97
+ // motor.monitor ();
98
98
}
99
99
100
- // utility function intended to be used with serial plotter to monitor motor variables
101
- // significantly slowing the execution down!!!!
102
- void motor_monitor () {
103
- switch (motor.controller ) {
104
- case ControlType::velocity:
105
- Serial.print (motor.voltage_q );
106
- Serial.print (" \t " );
107
- Serial.print (motor.shaft_velocity_sp );
108
- Serial.print (" \t " );
109
- Serial.println (motor.shaft_velocity );
110
- break ;
111
- case ControlType::angle:
112
- Serial.print (motor.voltage_q );
113
- Serial.print (" \t " );
114
- Serial.print (motor.shaft_angle_sp );
115
- Serial.print (" \t " );
116
- Serial.println (motor.shaft_angle );
117
- break ;
118
- case ControlType::voltage:
119
- Serial.print (motor.voltage_q );
120
- Serial.print (" \t " );
121
- Serial.print (motor.shaft_angle );
122
- Serial.print (" \t " );
123
- Serial.println (motor.shaft_velocity );
124
- break ;
125
- }
126
- }
127
100
128
101
// Serial communication callback function
129
102
// gets the target value from the user
Original file line number Diff line number Diff line change @@ -93,34 +93,7 @@ void loop() {
93
93
94
94
// function intended to be used with serial plotter to monitor motor variables
95
95
// significantly slowing the execution down!!!!
96
- // motor_monitor ();
96
+ // motormonitor ();
97
97
}
98
98
99
- // utility function intended to be used with serial plotter to monitor motor variables
100
- // significantly slowing the execution down!!!!
101
- void motor_monitor () {
102
- switch (motor.controller ) {
103
- case ControlType::velocity:
104
- Serial.print (motor.voltage_q );
105
- Serial.print (" \t " );
106
- Serial.print (motor.shaft_velocity_sp );
107
- Serial.print (" \t " );
108
- Serial.println (motor.shaft_velocity );
109
- break ;
110
- case ControlType::angle:
111
- Serial.print (motor.voltage_q );
112
- Serial.print (" \t " );
113
- Serial.print (motor.shaft_angle_sp );
114
- Serial.print (" \t " );
115
- Serial.println (motor.shaft_angle );
116
- break ;
117
- case ControlType::voltage:
118
- Serial.print (motor.voltage_q );
119
- Serial.print (" \t " );
120
- Serial.print (motor.shaft_angle );
121
- Serial.print (" \t " );
122
- Serial.println (motor.shaft_velocity );
123
- break ;
124
- }
125
- }
126
99
Original file line number Diff line number Diff line change @@ -104,38 +104,12 @@ void loop() {
104
104
105
105
// function intended to be used with serial plotter to monitor motor variables
106
106
// significantly slowing the execution down!!!!
107
- // motor_monitor ();
107
+ // motor.monitor ();
108
108
109
109
// keep track of loop number
110
110
t++;
111
111
}
112
112
113
- // utility function intended to be used with serial plotter to monitor motor variables
114
- // significantly slowing the execution down!!!!
115
- void motor_monitor () {
116
- switch (motor.controller ) {
117
- case ControlType::velocity:
118
- Serial.print (motor.voltage_q );
119
- Serial.print (" \t " );
120
- Serial.print (motor.shaft_velocity_sp );
121
- Serial.print (" \t " );
122
- Serial.println (motor.shaft_velocity );
123
- break ;
124
- case ControlType::angle:
125
- Serial.print (motor.voltage_q );
126
- Serial.print (" \t " );
127
- Serial.print (motor.shaft_angle_sp );
128
- Serial.print (" \t " );
129
- Serial.println (motor.shaft_angle );
130
- break ;
131
- case ControlType::voltage:
132
- Serial.print (motor.voltage_q );
133
- Serial.print (" \t " );
134
- Serial.println (motor.shaft_velocity );
135
- break ;
136
- }
137
- }
138
-
139
113
// Serial communication callback function
140
114
// gets the target value from the user
141
115
void serialEvent () {
Original file line number Diff line number Diff line change @@ -86,33 +86,7 @@ void loop() {
86
86
87
87
// function intended to be used with serial plotter to monitor motor variables
88
88
// significantly slowing the execution down!!!!
89
- // motor_monitor();
90
- }
91
-
92
- // utility function intended to be used with serial plotter to monitor motor variables
93
- // significantly slowing the execution down!!!!
94
- void motor_monitor () {
95
- switch (motor.controller ) {
96
- case ControlType::velocity:
97
- Serial.print (motor.voltage_q );
98
- Serial.print (" \t " );
99
- Serial.print (motor.shaft_velocity_sp );
100
- Serial.print (" \t " );
101
- Serial.println (motor.shaft_velocity );
102
- break ;
103
- case ControlType::angle:
104
- Serial.print (motor.voltage_q );
105
- Serial.print (" \t " );
106
- Serial.print (motor.shaft_angle_sp );
107
- Serial.print (" \t " );
108
- Serial.println (motor.shaft_angle );
109
- break ;
110
- case ControlType::voltage:
111
- Serial.print (motor.voltage_q );
112
- Serial.print (" \t " );
113
- Serial.println (motor.shaft_velocity );
114
- break ;
115
- }
89
+ // motor.monitor();
116
90
}
117
91
118
92
// Serial communication callback function
You can’t perform that action at this time.
0 commit comments