Revision 543

View differences:

branch/zemeta/Emb_App.tws
19 19
[WORKSPACE_FILE_STATES]
20 20
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\Debug\mr308.inc" 25 25 1430 351 0 8 
21 21
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\conf_noyau.cfg" 1 0 1426 347 0 1 
22
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" 0 0 1596 527 0 5 
23
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 527 1 4 
22
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" -8 -30 1596 527 1 5 
23
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" 0 0 1596 527 0 4 
24 24
"E:\tp_info6_2018_zemeta\tp_info6\bsp\can.c" 50 50 1430 351 0 2 
25 25
"E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 75 75 1430 351 0 3 
26 26
"E:\tp_info6_2018_zemeta\tp_info6\bsp\lcd.c" 50 50 1430 339 0 9 
branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf
151 151
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000512" 
152 152
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF058C" 
153 153
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
154
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000C24" 
155
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000095E" 
154
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000C3A" 
155
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000974" 
156 156
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000001" 
157 157
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000004044" 
158 158
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" 
......
173 173
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_35" "0000000000000000" 
174 174
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000008" 
175 175
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
176
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000C5A" 
176
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000C70" 
177 177
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000512" 
178 178
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" 
179 179
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" 
......
239 239
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0015_SCOPE" "Current Scope," 
240 240
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0016" "noire, 10, 0, P, Col, Hex, N" 
241 241
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0016_SCOPE" "Current Scope," 
242
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "17" 
242
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0017" "temps, 2, 0, P, Col, Dec, MA" 
243
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0017_SCOPE" "Current Scope," 
244
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "18" 
243 245
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
244 246
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
245 247
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
......
341 343
[WINDOW_POSITION_STATE_DATA_VD3]
342 344
[WINDOW_POSITION_STATE_DATA_VD4]
343 345
[WINDOW_Z_ORDER]
346
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" 
344 347
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" 
345
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" 
346
"E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 
347 348
"E:\tp_info6_2018_zemeta\tp_info6\bsp\uart0.c" 
348 349
"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\conf_noyau.cfg" 
350
"E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 
349 351
"E:\tp_info6_2018_zemeta\tp_info6\bsp\periph.c" 
350 352
"E:\tp_info6_2018_zemeta\tp_info6\bsp\lcd.c" 
351 353
"E:\tp_info6_2018_zemeta\tp_info6\Disassembly" 
......
397 399
[FLASH_DETAILS]
398 400
"" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" 
399 401
[BREAKPOINTS]
400
"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 92721520 1 "{00000000-0000-0000-C000-000000000046}" "" 
402
"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 92796424 1 "{00000000-0000-0000-C000-000000000046}" "" 
401 403
[END]
branch/zemeta/Emb_App/programme_principal_etud.c
118 118
//				correspondant au nom du v?hicule si le nom se termine par '*'
119 119
CanFrame comm,comm2,comm3;
120 120
unsigned short k=1,k2=1, angle_reel, error,error2,d_reel,D/*=714*/, d_max = 2000, appui_Bp = 0 ; // D = 500 pour piste verte , D = 714 pour piste verte
121
unsigned short consigne_tour/*=450*/, vitesse_roue/*=20*/, capt_detecte, comRoue, mode_course ,num_piste ,depart;  // V = 30 pour piste verte , V = 38 pour piste bleu  
121
unsigned short consigne_tour/*=450*/, vitesse_roue/*=20*/, capt_detecte, comRoue, mode_course ,num_piste ,depart,temps;  // V = 30 pour piste verte , V = 38 pour piste bleu  
122 122
unsigned char couleur;
123 123
CanFrame requete,requete3,requete4 ; 
124 124

  
......
144 144
	sta_tsk(id_piste);
145 145
	sta_tsk(id_piste_verte_bleue); // ? activer pour piste verte et bleue
146 146
	sta_tsk(id_noire);
147
	
147
	sta_tsk(id_temps);
148

  
148 149
//	sta_tsk(id_comm_v); ralentit asservissement
149 150
//	sta_tsk(id_arret);  ralentit asservissement
150 151
	comRoue=-k2*error2 ;
......
155 156
	sta_tsk(id_ass_t);	
156 157
	dly_tsk(2000);
157 158
	sta_tsk(id_avance);
158

  
159
	
159 160
	switch(couleur)
160 161
	{
161 162
		case 1:	lcd_str("Verte");
......
317 318
				consigne_tour=450;
318 319
				if(appui_Bp!=1)
319 320
				{
320
					vitesse_roue = 20;
321
					vitesse_roue = 25;
321 322
					comRoue = -k2*error2;
322 323
				}
323 324
				else if (appui_Bp)
......
326 327
					 comRoue = 0;
327 328
				}
328 329
			}
329
		/*	else */if (capt_detecte==30212) // detection de ligne droite de saut
330
			if (capt_detecte==30212) // detection de ligne droite de saut
330 331
			{
331 332
				D=705; 
332 333
				consigne_tour=450;
......
349 350
				consigne_tour=450;
350 351
				if(appui_Bp!=1)
351 352
				{
352
					vitesse_roue = 35;
353
					vitesse_roue = 43;
353 354
					comRoue = -k2*error2;
354 355
				}
355 356
				else if (appui_Bp)
......
697 698
		dly_tsk(5);
698 699
	}
699 700
}
701

  
702

  
703
void temps_course() // Temps reel de course 
704

  
705
{
706
	while (1)
707
	{
708
		requete.data.id = 'H' ; 
709
		requete.data.rtr = 1 ;
710
		snd_dtq(CanTx, requete.msg);
711
		dly_tsk(5) ;
712
		temps = periph[ADDR('H')].val;
713
		
714
		dly_tsk(10) ;
715
	}
716
}
branch/zemeta/Emb_App/conf_noyau.cfg
84 84
};
85 85

  
86 86
task[]{
87
	entry_address	=temps_course();
88
	name	= id_temps;
89
	stack_size	= 256;
90
	stack_section	= stack;
91
	priority	= 2;
92
	initial_start	= OFF;
93
	exinf	= 0x0;
94
};
95

  
96

  
97
task[]{
87 98
	entry_address	= p_noire();
88 99
	name	= id_noire;
89 100
	stack_size	= 256;

Also available in: Unified diff