/roboti/istrobot/camerus/SW/876/camerus.c |
---|
125,9 → 125,9 |
} |
// Zaznam LOGu do EEPROM |
void SaveLog(int8 xlog) |
void SaveLog() |
{ |
int8 n,i; |
int8 n,i,xlog; |
i=0; |
for(n=0;n<=(log*3);n+=3) // Ulozeni Black Boxu do EEPROM |
137,6 → 137,7 |
write_eeprom(n+2,bb_l[i]); |
i++; |
}; |
if(log>0) {xlog=log-1;} else {xlog=0;}; |
write_eeprom(EEMAX,xlog); // Zapis poctu zaznamu na konec EEPROM |
} |
614,7 → 615,7 |
if(BUMPER) // Sakra, do neceho jsme narazili a nevideli jsme to! |
{ |
bum(); |
SaveLog(log-1); // Zapis Black Boxu do EEPROM |
SaveLog(); // Zapis Black Boxu do EEPROM |
delay_ms(TUHOS); //!!! Zatuhle prevodovky |
set_pwm1_duty(200); // pomalu vpred |
set_pwm2_duty(200); |
/roboti/istrobot/camerus/SW/876/diag.c |
---|
8,7 → 8,7 |
bb_l[0]=0; // Zapis na pozici 0 vzdalenost 0 |
bb_h[0]=0; |
bb_f[0]=0; |
SaveLog(0); // Zapis do EEPROM pocet zaznamu 0, tedy jeden zaznam |
write_eeprom(EEMAX,0); // Zapis do EEPROM pocet zaznamu 0, tedy jeden zaznam |
for(n=0;n<=4;n++) |
{ |
disp(0x55); // Blikni pro potvrzeni |
/roboti/istrobot/camerus/SW/876/objizdka_L.c |
---|
30,7 → 30,7 |
if(BUMPER) // Narazili jsme do cihly, musime couvnout! |
{ |
bum(); |
SaveLog(log-1); // Zapis Black Boxu do EEPROM |
SaveLog(); // Zapis Black Boxu do EEPROM |
delay_ms(TUHOS); //!!! Zatuhle prevodovky |
brzda(); |
goto cihla; // Znovu zacni cihlu objizdet |
61,7 → 61,7 |
if(BUMPER) // Narazili jsme do cihly, musime couvnout! |
{ |
bum(); |
SaveLog(log-1); // Zapis Black Boxu do EEPROM |
SaveLog(); // Zapis Black Boxu do EEPROM |
delay_ms(TUHOS); //!!! Zatuhle prevodovky |
set_pwm1_duty(160); // vpred |
set_pwm2_duty(160); |