Commit c19eb0c6 authored by Andrey Filippov's avatar Andrey Filippov

minor cleanup

parent ff7aa493
...@@ -144,8 +144,8 @@ class X393ExportC(object): ...@@ -144,8 +144,8 @@ class X393ExportC(object):
txt += '// init_mmio_ptr() should be called once before using any of the other declared functions\n\n' txt += '// init_mmio_ptr() should be called once before using any of the other declared functions\n\n'
txt += 'int init_mmio_ptr(void);\n' txt += 'int init_mmio_ptr(void);\n'
txt += '#ifndef PARS_FRAMES\n' txt += '#ifndef PARS_FRAMES\n'
txt += ' #define PARS_FRAMES 16 ///< Number of frames in a sequencer TODO:// move it here from <elphel/c313a.h>\n' txt += ' #define PARS_FRAMES 16 ///< Number of frames in a sequencer TODO:// move it here from <uapi/elphel/c313a.h>\n'
txt += ' #define PARS_FRAMES_MASK (PARS_FRAMES-1) ///< Maximal frame number (15 for NC393) TODO:// move it here from <elphel/c313a.h>\n' txt += ' #define PARS_FRAMES_MASK (PARS_FRAMES-1) ///< Maximal frame number (15 for NC393) TODO:// move it here from <uapi/elphel/c313a.h>\n'
txt += '#endif\n' txt += '#endif\n'
txt += 'typedef enum {DIRECT,ABSOLUTE,RELATIVE,ASAP} x393cmd_t; ///< How to apply command - directly or through the command sequencer\n' txt += 'typedef enum {DIRECT,ABSOLUTE,RELATIVE,ASAP} x393cmd_t; ///< How to apply command - directly or through the command sequencer\n'
txt += """// IRQ commands applicable to several targets txt += """// IRQ commands applicable to several targets
...@@ -651,7 +651,7 @@ class X393ExportC(object): ...@@ -651,7 +651,7 @@ class X393ExportC(object):
sdefines = [] sdefines = []
sdefines +=[ sdefines +=[
(('R/W addresses to set up memory arbiter priorities. For sensors (chn = 8..11), for compressors - 12..15',)), (('R/W addresses to set up memory arbiter priorities. For sensors (chn = 8..11), for compressors - 12..15',)),
(("X393_MCNTRL_ARBITER_PRIORITY", c, vrlg.MCONTR_ARBIT_ADDR + ba, ia, z15, "x393_arbiter_pri", "rw", "Set memory arbiter priority (currently r/w, may become just wo)"))] (("X393_MCNTRL_ARBITER_PRIORITY", c, vrlg.MCONTR_ARBIT_ADDR + ba, ia, z15, "x393_arbiter_pri", "rw", "Set memory arbiter priority (currently r/w, may become just wo)"))]
sdefines +=[ sdefines +=[
(('Enable/disable memory channels (bits in a 16-bit word). For sensors (chn = 8..11), for compressors - 12..15',)), (('Enable/disable memory channels (bits in a 16-bit word). For sensors (chn = 8..11), for compressors - 12..15',)),
...@@ -1914,7 +1914,7 @@ class X393ExportC(object): ...@@ -1914,7 +1914,7 @@ class X393ExportC(object):
def _enc_mcntrl_priorities(self): def _enc_mcntrl_priorities(self):
dw=[] dw=[]
dw.append(("priority", 0, 16, 0, "Channel priority (the larger the higher)")) dw.append(("priority", 0, 16, 0, "Channel priority (the larger the higher). Each grant resets this channel to 'priority', increments others. Highest wins (among want/need)"))
return dw return dw
def _enc_mcntrl_chnen(self): def _enc_mcntrl_chnen(self):
......
...@@ -68,13 +68,16 @@ class X393Mem(object): ...@@ -68,13 +68,16 @@ class X393Mem(object):
print("Program is forced to run in SIMULATED mode as '/dev/xdevcfg' does not exist (not a camera)") print("Program is forced to run in SIMULATED mode as '/dev/xdevcfg' does not exist (not a camera)")
self.DRY_MODE=dry_mode self.DRY_MODE=dry_mode
if (dry_mode) and (X393_CLIENT is None): if (dry_mode) and (X393_CLIENT is None):
print("Creating X393_CLIENT") if ":" in dry_mode:
try: print("Creating X393_CLIENT")
X393_CLIENT= x393Client(host=dry_mode.split(":")[0], port=int(dry_mode.split(":")[1])) try:
print("Created X393_CLIENT") X393_CLIENT= x393Client(host=dry_mode.split(":")[0], port=int(dry_mode.split(":")[1]))
except: print("Created X393_CLIENT")
X393_CLIENT= True except:
print("Failed to create X393_CLIENT") X393_CLIENT= True
print("Failed to create X393_CLIENT")
else:
X393_CLIENT= True # just will not complain "Failed to create..."
if not X393_CLIENT is True: if not X393_CLIENT is True:
print("Starting X393_CLIENT") print("Starting X393_CLIENT")
try: try:
......
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