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:
- 12:58ad06f9847d
- Parent:
- 11:2156cb77d0d6
- Child:
- 13:3868cbdfa5ce
--- a/sm_sections.cpp Fri Oct 04 09:58:51 2019 +0000
+++ b/sm_sections.cpp Fri Oct 04 22:20:23 2019 +0000
@@ -4,7 +4,21 @@
s_Section s_section1;
s_Section s_section2;
+s_Section s_section2_1;
s_Section s_section3;
+s_Section s_section3_1;
+s_Section s_section4;
+s_Section s_section5;
+s_Section s_section5_1;
+s_Section s_section6_0;
+s_Section s_section6;
+s_Section s_section7;
+s_Section s_section8;
+s_Section s_section9;
+s_Section s_section9_1;
+s_Section s_section10;
+s_Section s_section11;
+s_Section s_section12;
E_STATE_SECTIONS e_SECTIONS_state;
@@ -20,30 +34,160 @@
//section de départ
s_section1.nextSection = &s_section2;
s_section1.consigne_position = 0.5;
- s_section1.targetSpeed_mps = 1700;
- s_section1.lng_section_m = 10.0;
- s_section1.coef_p = 1.0;
- s_section1.coef_d = 0.0;
- s_section1.coef_i = 0.000;
+ s_section1.targetSpeed_mps = 1750;
+ s_section1.lng_section_m = 0.8;
+ s_section1.coef_pos = 40;
+ s_section1.coef_bord = 0.6;
+ s_section1.plagePulseFreinage = 20;
- //epingle 1
- s_section2.nextSection = &s_section3;
+ //ligne droite debut
+ s_section2.nextSection = &s_section2_1;
s_section2.consigne_position = 0.5;
- s_section2.targetSpeed_mps = 1700;
- s_section2.lng_section_m = 5.0;
- s_section2.coef_p = 1.0;
- s_section2.coef_d = 0.0;
- s_section2.coef_i = 0.000;
+ s_section2.targetSpeed_mps = 1770;
+ s_section2.lng_section_m = 10.0;
+ s_section2.coef_pos = 30;
+ s_section2.coef_bord = 0.5;
+ s_section2.plagePulseFreinage = 50;
+
+
+ //ligne droite debut
+ s_section2_1.nextSection = &s_section3;
+ s_section2_1.consigne_position = 0.4;
+ s_section2_1.targetSpeed_mps = 1600;
+ s_section2_1.lng_section_m = 3.0;
+ s_section2_1.coef_pos = 30;
+ s_section2_1.coef_bord = 0.4;
+ s_section2_1.plagePulseFreinage = 50;
+
+ //epingle 1 debut
+ s_section3.nextSection = &s_section3_1;
+ s_section3.consigne_position = 0.7;
+ s_section3.targetSpeed_mps = 1620;
+ s_section3.lng_section_m = 2.0;
+ s_section3.coef_pos = 30;
+ s_section3.coef_bord = 2.0;
+ s_section3.plagePulseFreinage = 20;
+
+ //epingle 1 milieu
+ s_section3_1.nextSection = &s_section4;
+ s_section3_1.consigne_position = 0.7;
+ s_section3_1.targetSpeed_mps = 1690;
+ s_section3_1.lng_section_m = 4.0;
+ s_section3_1.coef_pos = 30;
+ s_section3_1.coef_bord = 2.0;
+ s_section3_1.plagePulseFreinage = 20;
+
+ //post epingle 1
+ s_section4.nextSection = &s_section5;
+ s_section4.consigne_position = 0.8;
+ s_section4.targetSpeed_mps = 1720;
+ s_section4.lng_section_m = 5.0;
+ s_section4.coef_pos = 30;
+ s_section4.coef_bord = 1.3;
+ s_section4.plagePulseFreinage = 30;
+
+ //droite epingle chicane
+ s_section5.nextSection = &s_section5_1;
+ s_section5.consigne_position = 0.6;
+ s_section5.targetSpeed_mps = 1780;
+ s_section5.lng_section_m = 7.0;
+ s_section5.coef_pos = 30;
+ s_section5.coef_bord = 0.7;
+ s_section5.plagePulseFreinage = 40;
- //epingle 1
- s_section3.nextSection = NULL;
- s_section3.consigne_position = 0.5;
- s_section3.targetSpeed_mps = 1500;
- s_section3.lng_section_m = 0.2;
- s_section3.coef_p = 1.0;
- s_section3.coef_d = 0.0;
- s_section3.coef_i = 0.000;
+ //avant chicane
+ s_section5_1.nextSection = &s_section6_0;
+ s_section5_1.consigne_position = 0.8;
+ s_section5_1.targetSpeed_mps = 1650;
+ s_section5_1.lng_section_m = 4.0;
+ s_section5_1.coef_pos = 30;
+ s_section5_1.coef_bord = 2.0;
+ s_section5_1.plagePulseFreinage = 40;
+
+ //pre chicane
+ s_section6_0.nextSection = &s_section6;
+ s_section6_0.consigne_position = 0.5;
+ s_section6_0.targetSpeed_mps = 1650;
+ s_section6_0.lng_section_m = 3.0;
+ s_section6_0.coef_pos = 30;//50
+ s_section6_0.coef_bord = 1.0;//2.0
+ s_section6_0.plagePulseFreinage = 45;
+
+
+ //chicane
+ s_section6.nextSection = &s_section7;
+ s_section6.consigne_position = 0.58;
+ s_section6.targetSpeed_mps = 1675;
+ s_section6.lng_section_m = 18.0;
+ s_section6.coef_pos = 30;//50
+ s_section6.coef_bord = 2.0;//2.0
+ s_section6.plagePulseFreinage = 50;
+
+ //ligne droite postchicane
+ s_section7.nextSection = &s_section8;
+ s_section7.consigne_position = 0.5;
+ s_section7.targetSpeed_mps = 1770;
+ s_section7.lng_section_m = 8.0;
+ s_section7.coef_pos = 30;
+ s_section7.coef_bord = 0.5;
+ s_section7.plagePulseFreinage = 50;
+
+
+ //ligne droite debut
+ s_section8.nextSection = &s_section9;
+ s_section8.consigne_position = 0.4;
+ s_section8.targetSpeed_mps = 1600;
+ s_section8.lng_section_m = 3.0;
+ s_section8.coef_pos = 30;
+ s_section8.coef_bord = 0.4;
+ s_section8.plagePulseFreinage = 50;
+
+ //epingle 2 debut
+ s_section9.nextSection = &s_section9_1;
+ s_section9.consigne_position = 0.7;
+ s_section9.targetSpeed_mps = 1620;
+ s_section9.lng_section_m = 2.0;
+ s_section9.coef_pos = 30;
+ s_section9.coef_bord = 2.0;
+ s_section9.plagePulseFreinage = 20;
+
+ //epingle 2 milieu
+ s_section9_1.nextSection = &s_section10;
+ s_section9_1.consigne_position = 0.7;
+ s_section9_1.targetSpeed_mps = 1680;
+ s_section9_1.lng_section_m = 4.0;
+ s_section9_1.coef_pos = 30;
+ s_section9_1.coef_bord = 2.0;
+ s_section9_1.plagePulseFreinage = 20;
+
+ //post epingle 2
+ s_section10.nextSection = &s_section11;
+ s_section10.consigne_position = 0.8;
+ s_section10.targetSpeed_mps = 1720;
+ s_section10.lng_section_m = 5.0;
+ s_section10.coef_pos = 30;
+ s_section10.coef_bord = 1.3;
+ s_section10.plagePulseFreinage = 30;
+
+ //dernière ligne droite
+ s_section11.nextSection = &s_section12;
+ s_section11.consigne_position = 0.5;
+ s_section11.targetSpeed_mps = 1790;
+ s_section11.lng_section_m = 37.0;
+ s_section11.coef_pos = 30;
+ s_section11.coef_bord = 0.7;
+ s_section11.plagePulseFreinage = 100;
+
+
+ //frein
+ s_section12.nextSection = NULL;
+ s_section12.consigne_position = 0.5;
+ s_section12.targetSpeed_mps = 1300;
+ s_section12.lng_section_m = 0.1;
+ s_section12.coef_pos = 80;
+ s_section12.coef_bord = 1.0;
+ s_section12.plagePulseFreinage = 20;
return;
}
@@ -55,7 +199,7 @@
//rs_LOG_pc.printf("\r\nUpdate Section\r\n");
if(b_UTILS_flag_emergency_stop) {
- rs_LOG_pc.printf("emergency stop -> STOPPED\r\n");
+ rs_LOG.printf("emergency stop -> STOPPED\r\n");
e_next_state = STOPPED;
} else {
switch (e_SECTIONS_state) {
@@ -82,7 +226,7 @@
case STOPPED:
if(b_UTILS_flag_button_SECTIONS) {
e_next_state = INIT_SECTION;
- rs_LOG_pc.printf("INIT SECTION !\r\n");
+ rs_LOG.printf("INIT SECTION !\r\n");
}
break;
default:
@@ -98,7 +242,7 @@
case INIT_SECTION:
b_UTILS_flag_button_SECTIONS = false;
s_UTILS_currentSection = &s_section1;
- rs_LOG_pc.printf("sect 1 INITIALIZED\r\n");
+ rs_LOG.printf("sect 1 INITIALIZED\r\n");
case RUNNING_SECTION:
break;
case LOADING_SECTION: