Revision 403

View differences:

branch/mbaye/Emb_App/SessionM32C_E8a_system.ini
25 25
[Target]
26 26
M32C E8a SYSTEM=Renesas Communications
27 27
[USER_DATA]
28
RESET=ff0016
28
RESET=ff0012
branch/mbaye/Emb_App/programme_principal_etud.c
168 168
	    {
169 169
		   comm.data.val=0;
170 170
	       snd_dtq (CanTx,comm.msg);
171
		    if (dis>710) 
171
		    if (dis>1000) 
172 172
	        {
173 173
		      dis = 710;
174 174
	        }
......
217 217
	             snd_dtq (CanTx,comm.msg);
218 218
	           }
219 219
	       }
220
		   else if(capt==(0x5604))
221
		   {
222
			   comm.data.val=0;
223
	           snd_dtq (CanTx,comm.msg);
224
		       if (dis>1000) 
225
	           {
226
		         dis = 710;
227
	           }
228
		       else
229
	           {
230
			     dis = periph[ADDR('U')].val;
231
	             comm.data.val=-1.0*(710-dis);
232
	             snd_dtq (CanTx,comm.msg);
233
	           }
234
	       }
220 235
		   else
221 236
		   {
222 237
			  comm.data.val=-1.0*(710-dis);
......
235 250
{
236 251
	while(1)
237 252
	{
238
	  CanFrame comm;
239
	  comm.data.id='V'; comm.data.rtr=0; 
253
	  CanFrame commv;
254
	  commv.data.id='V'; commv.data.rtr=0; 
240 255
      dly_tsk(3000);
241 256
	  if(Bp_G==1)
242 257
	  {
243
		  comm.data.val=0;
244
	      snd_dtq (CanTx,comm.msg);
258
		  commv.data.val=0;
259
	      snd_dtq (CanTx,commv.msg);
245 260
	  }
246 261
	    else if(numero_p==0x0001)
247 262
		{
248
		  if(capt==5603)
263
		  if(capt==0x5602)
249 264
		  {
250
	        comm.data.val=30;
251
	        snd_dtq (CanTx,comm.msg);
265
	        commv.data.val=30;
266
	        snd_dtq (CanTx,commv.msg);
252 267
		  }
268
		  
269
		  else if(capt==0x5603)
270
		  {
271
	        commv.data.val=30;
272
	        snd_dtq (CanTx,commv.msg);
273
		  }
274
		  
275
		   else if(capt==0x5604)
276
		  {
277
	        commv.data.val=30;
278
	        snd_dtq (CanTx,commv.msg);
279
		  }
280
		  
281
		  else if(capt==0x5601)
282
		  {
283
	        commv.data.val=30;
284
	        snd_dtq (CanTx,commv.msg);
285
		  }
253 286
		  else
254 287
		  {
255
		    comm.data.val=10;
256
	        snd_dtq (CanTx,comm.msg);	
288
		    commv.data.val=15;
289
	        snd_dtq (CanTx,commv.msg);	
257 290
		  }
258 291
		}
259 292
	    else if(numero_p==0x0002)
260 293
		{
261
		  if(capt==5603)
294
		  if(capt==0x5603)
262 295
		  {
263
	        comm.data.val=30;
264
	        snd_dtq (CanTx,comm.msg);
296
	        commv.data.val=15;
297
	        snd_dtq (CanTx,commv.msg);
265 298
		  }
266 299
		  else
267 300
		  {
268
		    comm.data.val=10;
269
	        snd_dtq (CanTx,comm.msg);	
301
		    commv.data.val=15;
302
	        snd_dtq (CanTx,commv.msg);	
270 303
		  }
271 304
		}
272 305
		else if(numero_p==0x0003)
273 306
		{
274
		  if(capt==5603)
307
		  if(capt==0x5603)
275 308
		  {
276
	        comm.data.val=60;
277
	        snd_dtq (CanTx,comm.msg);
309
	        commv.data.val=60;
310
	        snd_dtq (CanTx,commv.msg);
311
			//dly_tsk(4000);
312
			//commv.data.val=15;
313
	        //snd_dtq (CanTx,commv.msg);
278 314
	 	  }
279 315
		  else
280 316
		  {
281
		    comm.data.val=10;
282
	        snd_dtq (CanTx,comm.msg);	
317
		    commv.data.val=10;
318
	        snd_dtq (CanTx,commv.msg);	
283 319
		  }
284 320
	     }
285 321
	 dly_tsk(100);
......
328 364
	ports_mcu();
329 365
    lcd_init();
330 366
	periph_init();
331
	periph_nom("#AutoTest*");
367
	periph_nom("#km07*");
332 368

  
333 369
    can_init();
334 370
    clavier_init(1);
......
340 376
	sta_tsk(ID_asserv_T);
341 377
	//sta_tsk(ID_hcy_tourelle);
342 378
	sta_tsk(ID_dist_T);
343
	sta_tsk(ID_demarrage_feu);
379
//	sta_tsk(ID_demarrage_feu);
344 380
	sta_tsk(ID_vitesse_roue);
345 381
	sta_tsk(ID_info_capt);
346 382
	sta_tsk(ID_mode_course);
branch/mbaye/Emb_App/conf_noyau.cfg
88 88
	initial_start	= ON;
89 89
	exinf	= 0x0;
90 90
};
91

  
91 92
task[]{
92
	entry_address	= demarrage_feu();
93
	name	= ID_demarrage_feu;
94
	stack_size	= 512;
95
	stack_section	= stack;
96
	priority	= 8;
97
	initial_start	= ON;
98
	exinf	= 0x0;
99
};
100
task[]{
101 93
	entry_address	= periph_tx();
102 94
	name	= ID_periph_tx;
103 95
	stack_size	= 256;

Also available in: Unified diff