@@ -531,8 +531,9 @@ bool conf_general_detect_motor_param(float current, float min_rpm, float low_dut
531
531
// Disable timeout
532
532
systime_t tout = timeout_get_timeout_msec ();
533
533
float tout_c = timeout_get_brake_current ();
534
+ KILL_SW_MODE tout_ksw = timeout_get_kill_sw_mode ();
534
535
timeout_reset ();
535
- timeout_configure (60000 , 0.0 );
536
+ timeout_configure (60000 , 0.0 , KILL_SW_MODE_DISABLED );
536
537
537
538
mc_interface_lock ();
538
539
@@ -597,7 +598,7 @@ bool conf_general_detect_motor_param(float current, float min_rpm, float low_dut
597
598
598
599
if (!started ) {
599
600
mc_interface_set_current (0.0 );
600
- timeout_configure (tout , tout_c );
601
+ timeout_configure (tout , tout_c , tout_ksw );
601
602
mc_interface_set_configuration (mcconf_old );
602
603
mc_interface_unlock ();
603
604
mempools_free_mcconf (mcconf );
@@ -689,7 +690,7 @@ bool conf_general_detect_motor_param(float current, float min_rpm, float low_dut
689
690
690
691
// Restore settings
691
692
mc_interface_set_configuration (mcconf_old );
692
- timeout_configure (tout , tout_c );
693
+ timeout_configure (tout , tout_c , tout_ksw );
693
694
694
695
mc_interface_unlock ();
695
696
@@ -762,8 +763,9 @@ bool conf_general_measure_flux_linkage(float current, float duty,
762
763
// Disable timeout
763
764
systime_t tout = timeout_get_timeout_msec ();
764
765
float tout_c = timeout_get_brake_current ();
766
+ KILL_SW_MODE tout_ksw = timeout_get_kill_sw_mode ();
765
767
timeout_reset ();
766
- timeout_configure (60000 , 0.0 );
768
+ timeout_configure (60000 , 0.0 , KILL_SW_MODE_DISABLED );
767
769
768
770
mc_interface_lock ();
769
771
@@ -838,7 +840,7 @@ bool conf_general_measure_flux_linkage(float current, float duty,
838
840
839
841
if (!started ) {
840
842
mc_interface_set_current (0.0 );
841
- timeout_configure (tout , tout_c );
843
+ timeout_configure (tout , tout_c , tout_ksw );
842
844
mc_interface_set_configuration (mcconf );
843
845
mc_interface_unlock ();
844
846
mempools_free_mcconf (mcconf );
@@ -861,7 +863,7 @@ bool conf_general_measure_flux_linkage(float current, float duty,
861
863
chThdSleepMilliseconds (1.0 );
862
864
}
863
865
864
- timeout_configure (tout , tout_c );
866
+ timeout_configure (tout , tout_c , tout_ksw );
865
867
mc_interface_set_configuration (mcconf_old );
866
868
mc_interface_unlock ();
867
869
mc_interface_set_current (0.0 );
@@ -978,8 +980,9 @@ bool conf_general_measure_flux_linkage_openloop(float current, float duty,
978
980
// Disable timeout
979
981
systime_t tout = timeout_get_timeout_msec ();
980
982
float tout_c = timeout_get_brake_current ();
983
+ KILL_SW_MODE tout_ksw = timeout_get_kill_sw_mode ();
981
984
timeout_reset ();
982
- timeout_configure (60000 , 0.0 );
985
+ timeout_configure (60000 , 0.0 , KILL_SW_MODE_DISABLED );
983
986
984
987
mc_interface_lock ();
985
988
@@ -1100,7 +1103,7 @@ bool conf_general_measure_flux_linkage_openloop(float current, float duty,
1100
1103
result = true;
1101
1104
}
1102
1105
1103
- timeout_configure (tout , tout_c );
1106
+ timeout_configure (tout , tout_c , tout_ksw );
1104
1107
mc_interface_unlock ();
1105
1108
mc_interface_release_motor ();
1106
1109
mc_interface_wait_for_motor_release (1.0 );
@@ -1166,8 +1169,9 @@ int conf_general_autodetect_apply_sensors_foc(float current,
1166
1169
// Disable timeout
1167
1170
systime_t tout = timeout_get_timeout_msec ();
1168
1171
float tout_c = timeout_get_brake_current ();
1172
+ KILL_SW_MODE tout_ksw = timeout_get_kill_sw_mode ();
1169
1173
timeout_reset ();
1170
- timeout_configure (60000 , 0.0 );
1174
+ timeout_configure (60000 , 0.0 , KILL_SW_MODE_DISABLED );
1171
1175
1172
1176
mc_interface_lock ();
1173
1177
@@ -1242,7 +1246,7 @@ int conf_general_autodetect_apply_sensors_foc(float current,
1242
1246
res = true;
1243
1247
}
1244
1248
1245
- timeout_configure (tout , tout_c );
1249
+ timeout_configure (tout , tout_c , tout_ksw );
1246
1250
mc_interface_unlock ();
1247
1251
mc_interface_release_motor ();
1248
1252
mc_interface_wait_for_motor_release (1.0 );
@@ -1531,8 +1535,9 @@ int conf_general_detect_apply_all_foc(float max_power_loss,
1531
1535
// Disable timeout
1532
1536
systime_t tout = timeout_get_timeout_msec ();
1533
1537
float tout_c = timeout_get_brake_current ();
1538
+ KILL_SW_MODE tout_ksw = timeout_get_kill_sw_mode ();
1534
1539
timeout_reset ();
1535
- timeout_configure (60000 , 0.0 );
1540
+ timeout_configure (60000 , 0.0 , KILL_SW_MODE_DISABLED );
1536
1541
1537
1542
mc_interface_lock ();
1538
1543
@@ -1565,7 +1570,7 @@ int conf_general_detect_apply_all_foc(float max_power_loss,
1565
1570
#endif
1566
1571
1567
1572
if (!res_r_l_imax_m1 || !res_r_l_imax_m2 ) {
1568
- timeout_configure (tout , tout_c );
1573
+ timeout_configure (tout , tout_c , tout_ksw );
1569
1574
mc_interface_unlock ();
1570
1575
mc_interface_release_motor ();
1571
1576
mc_interface_wait_for_motor_release (1.0 );
@@ -1690,7 +1695,7 @@ int conf_general_detect_apply_all_foc(float max_power_loss,
1690
1695
result = -10 ;
1691
1696
}
1692
1697
1693
- timeout_configure (tout , tout_c );
1698
+ timeout_configure (tout , tout_c , tout_ksw );
1694
1699
mc_interface_lock_override_once ();
1695
1700
mc_interface_release_motor ();
1696
1701
mc_interface_wait_for_motor_release (1.0 );
0 commit comments