|
From: Jérémie D. <Ba...@us...> - 2010-05-10 11:17:37
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "krobot".
The branch, master has been updated
via f29936d0328a5665a92225f34094c966859a0140 (commit)
via b8bde60238c461eb5f68152f2e03413df65d9b38 (commit)
from 6641c373d1d83375e9beb62bc56987533f89a32a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f29936d0328a5665a92225f34094c966859a0140
Author: Jérémie Dimino <je...@di...>
Date: Mon May 10 13:17:02 2010 +0200
do not switch on/off the infrared sensros all the time
commit b8bde60238c461eb5f68152f2e03413df65d9b38
Author: Jérémie Dimino <je...@di...>
Date: Mon May 10 13:16:45 2010 +0200
do not compute an average value for the infrared sensors on the PIC
-----------------------------------------------------------------------
Changes:
diff --git a/elec/boards/Interface_Robot/Firmware/infrared.c b/elec/boards/Interface_Robot/Firmware/infrared.c
index 2c63936..32e6ff4 100644
--- a/elec/boards/Interface_Robot/Firmware/infrared.c
+++ b/elec/boards/Interface_Robot/Firmware/infrared.c
@@ -10,8 +10,8 @@ void initIF() {
/* Initialisation des PINs */
TRISD&= 0b11111100; /* OPTOSW1, OPTOSW2 */
- OPTOSW1 = 0;
- OPTOSW2 = 0;
+ OPTOSW1 = 1;
+ OPTOSW2 = 1;
OpenADC(ADC_FOSC_64 /* A/D clock source (forcnt Fosc / 64 car PIC 8 MHz) */
& ADC_RIGHT_JUST /* A/D result justification */
@@ -35,8 +35,6 @@ void interruptIF(void) {
switch (state) {
case 0:
- OPTOSW1 = 1;
-
// Drre la convertion sur RA0
SelChanConvADC(ADC_CH0);
state = 1;
@@ -51,9 +49,6 @@ void interruptIF(void) {
break;
case 2:
- OPTOSW1 = 0;
- OPTOSW2 = 1;
-
// Drre la convertion sur RA1
SelChanConvADC(ADC_CH1);
state = 3;
@@ -68,8 +63,6 @@ void interruptIF(void) {
break;
case 4:
- OPTOSW2 = 0;
-
// Traitement des rltats
IF1_idx++;
diff --git a/elec/boards/Interface_Robot/Firmware/infrared.h b/elec/boards/Interface_Robot/Firmware/infrared.h
index 11dadae..2a8897b 100644
--- a/elec/boards/Interface_Robot/Firmware/infrared.h
+++ b/elec/boards/Interface_Robot/Firmware/infrared.h
@@ -9,8 +9,8 @@
#include "error.h"
// Parames graux
-#define IF_AVR0 10
-#define IF_AVR1 10
+#define IF_AVR0 1
+#define IF_AVR1 1
// Entr / sorties
#define OPTOSW1 PORTDbits.RD0
hooks/post-receive
--
krobot
|