Skip to content
Snippets Groups Projects
Commit b403e92b authored by Paulus Kruger's avatar Paulus Kruger
Browse files

lmp id bug fix

parent 52d19d86
No related branches found
No related tags found
No related merge requests found
Pipeline #70214 failed
...@@ -5,23 +5,23 @@ IP_APSCT_TEST='10.99.100.100' ...@@ -5,23 +5,23 @@ IP_APSCT_TEST='10.99.100.100'
import logging import logging
import subprocess import subprocess
try: #try:
from .lmp_id import get_LMP_ID #from .lmp_id import get_LMP_ID
except: #except:
from lmp_id import get_LMP_ID # from lmp_id import get_LMP_ID
#import RPi.GPIO as GPIO import RPi.GPIO as GPIO
#def get_LMP_ID(): def get_LMP_ID():
# pins=[21,20,16,12,7,8] pins=[21,20,16,12,7,8]
# Npins=len(pins); Npins=len(pins);
# GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
# for i,pin in enumerate(pins): for i,pin in enumerate(pins):
# GPIO.setup(pin,GPIO.IN) GPIO.setup(pin,GPIO.IN)
#
# value=0; value=0;
# for pin in pins: for pin in pins:
# value=2*value+1 if GPIO.input(pin) else 2*value value=2*value+1 if GPIO.input(pin) else 2*value
# return value return value
def get_eth0_ip_ifconfig(): def get_eth0_ip_ifconfig():
result=subprocess.run(['ifconfig','eth0'],stdout=subprocess.PIPE).stdout.decode() result=subprocess.run(['ifconfig','eth0'],stdout=subprocess.PIPE).stdout.decode()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment