Skip to content

Commit a68f2cb

Browse files
committed
thermistor vs termistor rip
1 parent 32e3cdc commit a68f2cb

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Spectral BLDC Firmware/src/common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ typedef struct
8888
volatile float flux_linkage = 0; // Flux linkage of your BLDC motor
8989
volatile float KV = 0;
9090

91-
volatile int Termistor_on_off = 0; // 0 is off 1 is on
92-
9391
volatile int Max_temperature = 75; // Max temperature in degrees
9492
volatile int Min_temperature = -20; // Min temperature in degrees
9593

Spectral BLDC Firmware/src/communication.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ void UART_protocol(Stream &Serialport)
481481
else if (strcmp(command, "Temp") == 0)
482482
{
483483
Serialport.print("Temp ");
484-
if (controller.Termistor_on_off == 1)
484+
if (controller.Thermistor_on_off == 1)
485485
{
486486
Serialport.println(controller.TEMP_DEG);
487487
}
@@ -499,15 +499,15 @@ void UART_protocol(Stream &Serialport)
499499
int var = atoi(argument);
500500
if (var >= 1)
501501
{
502-
controller.Termistor_on_off = 1;
502+
controller.Thermistor_on_off = 1;
503503
}
504504
else
505505
{
506-
controller.Termistor_on_off = 0;
506+
controller.Thermistor_on_off = 0;
507507
}
508508
}
509509
Serialport.print("Term ");
510-
Serialport.println(controller.Termistor_on_off);
510+
Serialport.println(controller.Thermistor_on_off);
511511
}
512512

513513
// Print controller mode

Spectral BLDC Firmware/src/motor_control.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void IT_callback(void)
160160
#endif
161161

162162
/*Sample temperature every 15000 ticks; If enabled*/
163-
if (controller.Termistor_on_off == 1)
163+
if (controller.Thermistor_on_off == 1)
164164
{
165165
static int temperature_tick = 0;
166166
if (temperature_tick >= 15000)
@@ -202,7 +202,7 @@ void IT_callback(void)
202202
/* Check for errors, If errors are present go idle */
203203

204204
/// Check termistor
205-
if (controller.Termistor_on_off == 1)
205+
if (controller.Thermistor_on_off == 1)
206206
{
207207
if (controller.TEMP_DEG < controller.Min_temperature || controller.TEMP_DEG > controller.Max_temperature)
208208
{
@@ -1812,7 +1812,7 @@ void Gripper_mode()
18121812
PID.Velocity_setpoint = -vel_sepoint;
18131813
}
18141814

1815-
if (Gripper.action_status == 1 && Gripper.calibrated == 1 && Gripper.activated == 1) // if it is goto
1815+
if (Gripper.action_status == 1 && Gripper.calibrated == 1 && Gripper.activated == 1 && controller.I_AM_GRIPPER == 1) // if it is goto
18161816
{
18171817
// If our gripper is at the requested positon hold that position
18181818
if (Gripper.position_setpoint == Gripper.position || Gripper.At_position == 1)

0 commit comments

Comments
 (0)