Commit dad367f7 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

removed old inits

parent de39ccc5
......@@ -165,23 +165,6 @@ def init_mux10359(index):
def init_autoexp_daemon(index):
shout("autoexposure -p "+index+" -c 0 -b 0 -d 1 &")
def init_autoexp(index):
shout("wget -O /dev/null \"localhost/parsedit.php?immediate&sensor_port="+index+"&COMPRESSOR_RUN=2&DAEMON_EN=1*12&AUTOEXP_ON=1&AEXP_FRACPIX=0xff80&AEXP_LEVEL=0xf800&AE_PERIOD=4&AE_THRESH=500&HIST_DIM_01=0x0a000a00&HIST_DIM_23=0x0a000a00&EXP_AHEAD=3\"")
def init_autoexp_eyesis(index):
shout("autoexposure -p "+index+" -c 0 -b 0 -d 1 &")
roi = "HISTWND_RWIDTH=0xc000&HISTWND_RHEIGHT=0xffff&HISTWND_RLEFT=0xffff&HISTWND_RTOP=0x8000"
shout("wget -O /dev/null \"localhost/parsedit.php?immediate&sensor_port="+index+"&COMPRESSOR_RUN=2&DAEMON_EN=1*12&AUTOEXP_ON=1&AEXP_FRACPIX=0xff80&AEXP_LEVEL=0xf800&AUTOEXP_EXP_MAX=5000&AE_PERIOD=4&AE_THRESH=500&HIST_DIM_01=0x0a000a00&HIST_DIM_23=0x0a000a00&EXP_AHEAD=1&"+roi+"\"")
def init_autowb(index):
shout("wget -O /dev/null \"localhost/parsedit.php?immediate&sensor_port="+index+"&COMPRESSOR_RUN=2&DAEMON_EN=1&WB_EN=0x1&WB_MASK=0xd&WB_PERIOD=16&WB_WHITELEV=0xfae1&WB_WHITEFRAC=0x028f&WB_SCALE_R=0x10000&WB_SCALE_GB=0x10000&WB_SCALE_B=0x10000&WB_THRESH=500&GAIN_MIN=0x20000&GAIN_MAX=0xfc000&ANA_GAIN_ENABLE=1&GAINR=0x10000&GAING=0x10000&GAINGB=0x10000&GAINB=0x10000\"")
def init_autowb_eyesis(index):
shout("wget -O /dev/null \"localhost/parsedit.php?immediate&sensor_port="+index+"&COMPRESSOR_RUN=2&DAEMON_EN=1&WB_EN=0x0&WB_MASK=0xd&WB_PERIOD=16&WB_WHITELEV=0xfae1&WB_WHITEFRAC=0x028f&WB_SCALE_R=0x10000&WB_SCALE_GB=0x10000&WB_SCALE_B=0x10000&WB_THRESH=500&GAIN_MIN=0x20000&GAIN_MAX=0xfc000&ANA_GAIN_ENABLE=1&GAINR=0x1be3e&GAING=0x18000&GAINGB=0x18000&GAINB=0x26667\"")
def init_other_eyesis(index):
shout("wget -O /dev/null \"localhost/camogm_interface.php?cmd=set_parameter&sensor_port="+index+"&pname=QUALITY&pvalue=97\"")
shout("wget -O /dev/null \"localhost/camogm_interface.php?cmd=set_parameter&sensor_port="+index+"&pname=COLOR&pvalue=5\"")
def init_sata(sata_en,pydir):
if (sata_en==1):
......@@ -241,17 +224,17 @@ def disable_gpio_10389():
switch = {
'usb_hub':1,
'ip':1,
'mcntrl':1,
'mcntrl':0,
'imgsrv':1,
'port1':1,
'port2':1,
'port3':1,
'port4':1,
'framepars':1,
'autoexp_daemon':0,
'autocampars':0,
'autoexp':1,
'autowb':1,
'port1':0,
'port2':0,
'port3':0,
'port4':0,
'framepars':0,
'autoexp_daemon':1,
'autocampars':1,
'autoexp':0,
'autowb':0,
'sata':1,
'gps':1,
'eyesis':0
......@@ -299,76 +282,20 @@ else:
log_msg("skip ip")
#2
if switch['mcntrl']==1:
log_msg(sys.argv[0]+": mcntrl")
if switch['eyesis']!=0:
init_mcntrl_eyesis(PYDIR,VERILOG_DIR)
else:
init_mcntrl(PYDIR,VERILOG_DIR)
else:
log_msg("skip mcntrl")
#3
if switch['imgsrv']==1:
log_msg(sys.argv[0]+": imgsrv")
init_imgsrv(IMGSRV_PORT)
else:
log_msg("skip imgsrv")
#4
for i in range(1,5):
if switch['port'+str(i)]==1:
init_port(str(i-1))
else:
log_msg("skip sensor port "+str(i))
#5
if (switch['eyesis'] != 0) and (switch['framepars'] != 0):
#time.sleep(1)
for i in range(4):
sysfs_content = init_port_readsysfs("sensor"+str(i)+"0")
if sysfs_content=="mt9p006":
shout("wget -O - \"localhost/framepars.php?sensor_port="+str(i)+"&cmd=min_init\"")
time.sleep(2)
shout("cat /proc/interrupts")
for i in range(4):
sysfs_content = init_port_readsysfs("sensor"+str(i)+"0")
if sysfs_content=="mt9p006":
shout("wget -O - \"localhost/framepars.php?sensor_port="+str(i)+"&cmd=eyesis_trig\"")
time.sleep(2)
shout("cat /proc/interrupts")
for i in range(4):
sysfs_content = init_port_readsysfs("sensor"+str(i)+"0")
if sysfs_content=="mt9p006":
log_msg("AUTOEXP und AUTOWB, channel = "+str(i))
init_other_eyesis(str(i))
time.sleep(1)
init_autoexp_eyesis(str(i))
init_autowb_eyesis(str(i))
else:
log_msg(sys.argv[0]+": auto exposure and auto white balance")
log_msg(sys.argv[0]+": auto exposure and auto white balance")
if switch['autoexp_daemon']==1:
for i in range(1,5):
if (switch['autoexp_daemon']==1) or (switch['autoexp']==1):
init_autoexp_daemon(str(i-1))
if switch['port'+str(i)]==1:
if switch['autoexp']==1:
sysfs_content = init_port_readsysfs("sensor"+str(i-1)+"0")
if sysfs_content=="mt9p006":
init_autoexp(str(i-1))
else:
log_msg("Port "+str(i)+": skip autoexp")
if switch['autowb']==1:
sysfs_content = init_port_readsysfs("sensor"+str(i-1)+"0")
if sysfs_content=="mt9p006":
init_autowb(str(i-1))
else:
log_msg("Port "+str(i)+": skip autowb")
init_autoexp_daemon(str(i-1))
if switch ['autocampars'] == 1:
# shout("autocampars.php --init --ignore-revision")
shout("autocampars.php --init")
......
Markdown is supported
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