Commit 77f2c8db authored by German Leon's avatar German Leon
Browse files

Añado configs3

parent a1a6d261
#! /usr/bin/python
import sys, os, subprocess, random, time, datetime
timeout_hardware=30;
from multiprocessing import Process
import time
inject = False
import serial
def watchdog_pro (serie):
print ("Watchdog ini")
os.system ("tools/watchset "+`timeout_hardware`)
serie.write ("Watchdog timeout value: "+`timeout_hardware`+"\r\n")
while True :
time.sleep (timeout_hardware-1)
w=open("/dev/watchdog0","r+")
serie.write ("Watchdog timeout value: "+`timeout_hardware`+"\r\n")
def configurate_serie():
#os.system("sudo stop ttyS0")
Puerto="/dev/ttyS0"
try:
serie = serial.Serial(Puerto, 115200)
serie.timeout=1;
except serial.SerialException:
#-- Error al abrir el puerto serie
sys.stderr.write("Error al abrir puerto (%s)\n" % Puerto)
return serie
def main():
configurate_serie()
##############################################################################
main()
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