Автоопределение архитектуры процессора и загрузка соотв. sharelib
This commit is contained in:
parent
cf3327ad33
commit
0928a2b61b
|
@ -1,6 +1,6 @@
|
|||
import sys, os, gc, optparse, logging, time
|
||||
from cffi import FFI
|
||||
import datetime
|
||||
import datetime, platform
|
||||
|
||||
SCREEN_PATH="/home/pi/3dscreen"
|
||||
|
||||
|
@ -17,9 +17,12 @@ def load():
|
|||
void free(void*);
|
||||
""")
|
||||
|
||||
try:
|
||||
arch = platform.machine()
|
||||
if arch == "aarch64":
|
||||
lib = ffi.dlopen(SCREEN_PATH+"/lib/lib3dscreen-arm64.so")
|
||||
elif arch == "armv7l":
|
||||
lib = ffi.dlopen(SCREEN_PATH+"/lib/lib3dscreen.so")
|
||||
except:
|
||||
else:
|
||||
lib = ffi.dlopen("/lib/lib3dscreen-host.so")
|
||||
|
||||
def Klippy_Get_Autosave_Filename():
|
||||
|
|
Loading…
Reference in New Issue