Commit 48d8f7ed authored by German Leon's avatar German Leon
Browse files

Poner close en iamalive

parent e18f5f86
No preview for this file type
No preview for this file type
......@@ -36,6 +36,7 @@ int main(int argc, char*argv[]) {
fdf=fopen(buffer,"r");
fscanf (fdf,"%d",&valor);
fprintf(stdout,"%.1f,",valor/1000.0);
fclose(fdf);
}
for(i=0; i<3;i++) {
......
......@@ -79,7 +79,6 @@ int main(int argc, char*argv[]) {
fprintf(stdout,"Code: %d \r\n", ident.options);
}
while (1) {
nom=getenv("MYHOME");
if (nom==NULL)
sprintf(buffer,"./watchdog.log");
......@@ -88,6 +87,7 @@ int main(int argc, char*argv[]) {
if ( (fdl = fopen(buffer, "a") ) == NULL ) {
printf("Error! opening watchog.log file\n");
}
while (1) {
sleep (timeslice);
......@@ -110,6 +110,7 @@ int main(int argc, char*argv[]) {
fdf=fopen(buffer,"r");
fscanf (fdf,"%d",&valor);
fprintf(stdout,"%.1f,",valor/1000.0);
fclose(fdf);
}
for(i=0; i<3;i++) {
sprintf(buffer,"/sys/bus/i2c/drivers/ina3221x/6-0040/iio:device0/rail_name_%d",i);
......@@ -129,10 +130,10 @@ int main(int argc, char*argv[]) {
}
fprintf (stdout,"\r\n");
fclose(fdl);
} // end while
fclose(fdl);
close(fd);
if (ret<0) {
fprintf(stderr, "Failed to close watchdog device.");
......
#!/bin/bash
# start the four cores
#/home/ubuntu/bin/startcores
export MYHOME=$(echo $0|cut -d'/' -f1-3)
cd $MYHOME
#chmod a+rw /dev/watchdog0
date>> reboot.log
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
#chmod 0666 /dev/ttyS0
# Nos vamos al directorio donde estan los test
# Nos vamos al directorio donde estan los test
cd `grep -v \# dir_test`
#tools/serie.py
echo "Solo lo mantenemos vivo..."
#$MYHOME/bin/serie.py
#/home/happy/bin/serie.py
if test -f "deleteindex.flag"; then
rm lastFiNumber deleteindex.flag
fi
#/bin/bash
$MYHOME/bin/iamalive_ini 20 10 &
$MYHOME/bin/iamalive
./test.sh
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment