Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: sm_esc.cpp
- Revision:
- 9:1b54bac6d9a7
- Parent:
- 8:f23601373e8b
- Child:
- 12:58ad06f9847d
--- a/sm_esc.cpp Wed Oct 02 22:25:12 2019 +0000 +++ b/sm_esc.cpp Thu Oct 03 23:28:56 2019 +0000 @@ -4,7 +4,6 @@ PwmOut pwm_ESC(PD_12); DigitalOut relay_ESC(PG_0); E_STATE_ESC e_ESC_state; -Timer t_emergency_brake; void init_sm_esc() { @@ -43,7 +42,7 @@ switch(e_ESC_state) { case ESC_DISABLED: if(b_UTILS_flag_emergency_stop) { - rs_UTILS_pc.printf("EMERGENCY STOP\r\n"); + rs_LOG_pc.printf("EMERGENCY STOP\r\n"); b_UTILS_flag_emergency_stop = false; if(b_CHASSIS_with_pushbutton) { relay_ESC = 1; @@ -54,7 +53,7 @@ break; case ESC_INIT: - rs_UTILS_pc.printf("Init esc\r\n"); + rs_LOG_pc.printf("Init esc\r\n"); b_UTILS_flag_button_ESC = false; pwm_ESC.period_ms(ESC_PERIOD_DURATION_MS); //20 ms is default pwm_ESC.pulsewidth_us(0); @@ -72,8 +71,7 @@ wait(1); pwm_ESC.pulsewidth_us(ESC_PULSE_IDLE_US); wait(1); - t_emergency_brake.start(); - t_emergency_brake.reset(); + log_start(10000); break; case ESC_COMMAND: