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_sections.cpp
- Revision:
- 9:1b54bac6d9a7
- Parent:
- 8:f23601373e8b
- Child:
- 10:e63fe4080760
diff -r f23601373e8b -r 1b54bac6d9a7 sm_sections.cpp --- a/sm_sections.cpp Wed Oct 02 22:25:12 2019 +0000 +++ b/sm_sections.cpp Thu Oct 03 23:28:56 2019 +0000 @@ -18,18 +18,18 @@ //section de départ s_section1.nextSection = &s_section2; - s_section1.consigne_position = 0.75; + s_section1.consigne_position = 0.5; s_section1.targetSpeed_mps = 1640; - s_section1.lng_section_m = 4.0; + s_section1.lng_section_m = 2.0; s_section1.coef_p = 1.0; s_section1.coef_d = 0.0; s_section1.coef_i = 0.000; //epingle 1 s_section2.nextSection = NULL; - s_section2.consigne_position = 0.75; + s_section2.consigne_position = 0.5; s_section2.targetSpeed_mps = 1640; - s_section2.lng_section_m = 4.0; + s_section2.lng_section_m = 2.0; s_section2.coef_p = 1.0; s_section2.coef_d = 0.0; s_section2.coef_i = 0.000; @@ -41,27 +41,27 @@ E_STATE_SECTIONS e_next_state = e_SECTIONS_state; - //rs_UTILS_pc.printf("\r\nUpdate Section\r\n"); + //rs_LOG_pc.printf("\r\nUpdate Section\r\n"); if(b_UTILS_flag_emergency_stop) { - rs_UTILS_pc.printf("emergency stop -> STOPPED\r\n"); + rs_LOG_pc.printf("emergency stop -> STOPPED\r\n"); e_next_state = STOPPED; } else { switch (e_SECTIONS_state) { case INIT_SECTION: e_next_state = RUNNING_SECTION; - //rs_UTILS_pc.printf("RUNNING SECTION\r\n"); + //rs_LOG_pc.printf("RUNNING SECTION\r\n"); break; case RUNNING_SECTION: if(d_ODOM_distFromSectionStart_m > s_UTILS_currentSection->lng_section_m) { e_next_state = LOADING_SECTION; - //rs_UTILS_pc.printf("LOADING SECTION !\r\n"); + //rs_LOG_pc.printf("LOADING SECTION !\r\n"); } break; case LOADING_SECTION: if(s_UTILS_currentSection != NULL) { e_next_state = RUNNING_SECTION; - //rs_UTILS_pc.printf("RUNNING SECTION !\r\n"); + //rs_LOG_pc.printf("RUNNING SECTION !\r\n"); } else { b_UTILS_flag_emergency_stop = true; e_next_state = STOPPED; @@ -70,7 +70,7 @@ case STOPPED: if(b_UTILS_flag_button_SECTIONS) { e_next_state = INIT_SECTION; - rs_UTILS_pc.printf("INIT SECTION !\r\n"); + rs_LOG_pc.printf("INIT SECTION !\r\n"); } break; default: @@ -86,12 +86,11 @@ case INIT_SECTION: b_UTILS_flag_button_SECTIONS = false; s_UTILS_currentSection = &s_section1; - rs_UTILS_pc.printf("sect 1 INITIALIZED\r\n"); - mpu_log_start(10000); + rs_LOG_pc.printf("sect 1 INITIALIZED\r\n"); case RUNNING_SECTION: break; case LOADING_SECTION: - //rs_UTILS_pc.printf("next section loading\r\n"); + //rs_LOG_pc.printf("next section loading\r\n"); s_UTILS_currentSection=s_UTILS_currentSection->nextSection; d_ODOM_distFromSectionStart_m = 0.0; break;