update 2016-11-10 b4
1. implemented irda_encoder completely
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,5 +5,6 @@ src/ir_encoder/.idea
|
|||||||
src/ir_decoder/out
|
src/ir_decoder/out
|
||||||
src/ir_decoder/libs
|
src/ir_decoder/libs
|
||||||
src/ir_decoder/obj
|
src/ir_decoder/obj
|
||||||
|
src/ir_encoder/source
|
||||||
files/
|
files/
|
||||||
files/*
|
files/*
|
||||||
@@ -95,17 +95,17 @@ def print_remote(input_file, real_path, real_name, category):
|
|||||||
key.append(data)
|
key.append(data)
|
||||||
|
|
||||||
key[0].pack_length(binary)
|
key[0].pack_length(binary)
|
||||||
for j in range(len(keymap_dicts[category])):
|
for j in range(len(keymap_dicts[int(category)])):
|
||||||
empty_key = CKeyMap(keymap_dicts[category][j], empty_value)
|
empty_key = CKeyMap(keymap_dicts[int(category)][j], empty_value)
|
||||||
find = 0
|
find = 0
|
||||||
for n in range(len(key)):
|
for n in range(len(key)):
|
||||||
if cmp(keymap_dicts[category][j], key[n].name) == 0:
|
if cmp(keymap_dicts[int(category)][j], key[n].name) == 0:
|
||||||
key[n].print_info()
|
key[n].print_info()
|
||||||
key[n].pack_key(binary)
|
key[n].pack_key(binary)
|
||||||
find = 1
|
find = 1
|
||||||
break
|
break
|
||||||
if find == 0:
|
if find == 0:
|
||||||
print "Don't file this key %s" % (keymap_dicts[category][j])
|
print "Don't file this key %s" % (keymap_dicts[int(category)][j])
|
||||||
empty_key.pack_key(binary)
|
empty_key.pack_key(binary)
|
||||||
|
|
||||||
fileName = sys.argv[1]
|
fileName = sys.argv[1]
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ for root, dirs, files in os.walk(sys.argv[1]):
|
|||||||
if cmp(protocolType[0].split('/')[-1], fileType[0]) == 0:
|
if cmp(protocolType[0].split('/')[-1], fileType[0]) == 0:
|
||||||
outName = remotePath.split('#')
|
outName = remotePath.split('#')
|
||||||
binary = open(sys.argv[3] + "/irda_" + outName[0].split('/')[-1] + "_" + outName[1], 'wb')
|
binary = open(sys.argv[3] + "/irda_" + outName[0].split('/')[-1] + "_" + outName[1], 'wb')
|
||||||
prot_file = open(root+i, "rb")
|
prot_file = open(root + i, "rb")
|
||||||
remote_file = open(remotePath, "rb")
|
remote_file = open(remotePath, "rb")
|
||||||
binary.write(prot_file.read())
|
binary.write(prot_file.read())
|
||||||
binary.write(remote_file.read())
|
binary.write(remote_file.read())
|
||||||
Reference in New Issue
Block a user