More small updates.

pull/1/head
Mark Jessop 2016-09-09 22:52:29 +09:30
rodzic 2afb7bdcdd
commit 1abf29a96e
3 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -21,7 +21,7 @@ try:
_ldpc_enc.encode.restype = None
_ldpc_enc.encode.argtypes = (ndpointer(ctypes.c_ubyte, flags="C_CONTIGUOUS"), ndpointer(ctypes.c_ubyte, flags="C_CONTIGUOUS"))
except OSError as e:
raise OSError("Could not find ldpc_enc.so! Have you compiled ldpc_enc.c?")
print("WARNING: Could not find ldpc_enc.so! Have you compiled ldpc_enc.c? \n gcc -fPIC -shared -o ldpc_enc.so ldpc_enc.c")
#
# LDPC Encoder.

Wyświetl plik

@ -115,5 +115,5 @@ if __name__ == '__main__':
sys.exit(1)
print("Using callsign: %s" % callsign)
ssdv_dir_watcher(callsign=callsign)

Wyświetl plik

@ -18,18 +18,18 @@ temp_file_prefix = "./temp_pic"
def capture_single(filename="temp.jpg"):
os.system(picam_str % filename)
def capture_multiple(filename="output.jpg", n=5, temp_prefix=temp_file_prefix):
def capture_multiple(filename="output.jpg", n=5, temp_prefix=temp_file_prefix, debug_ptr = None):
# Remove any existing temporary images
os.system("rm %s*.jpg"%temp_prefix)
# Capture n images
for pic_num in range(n):
write_debug_message("Capturing Image %d of %d..." % (pic_num, n))
debug_ptr("Capturing Image %d of %d..." % (pic_num, n))
capture_single("%s_%d.jpg"%(temp_prefix,pic_num))
# Super high-tech image quality recognition filter
# (pick the largest image... thanks daveake!)
write_debug_message("Choosing Best Image...")
debug_ptr("Choosing Best Image...")
pic_list = glob.glob("%s*.jpg"%temp_prefix)
pic_sizes = []
for pic in pic_list: