mirror of
https://github.com/NaitLee/Cat-Printer.git
synced 2025-05-16 07:10:30 -07:00
default android scan period to 2 seconds
This commit is contained in:
parent
90e1668ab4
commit
1b9ff251ad
@ -182,9 +182,7 @@ class PrinterServerHandler(BaseHTTPRequestHandler):
|
||||
for key in settings:
|
||||
self.settings[key] = settings[key]
|
||||
else:
|
||||
if IsAndroid:
|
||||
self.settings['scan_time'] = 1.0
|
||||
elif os.name in ('posix',):
|
||||
if os.name in ('posix',) or IsAndroid:
|
||||
self.settings['scan_time'] = 2.0
|
||||
self.save_config()
|
||||
|
||||
@ -356,7 +354,11 @@ def serve():
|
||||
try:
|
||||
request_permissions([Permission.BLUETOOTH_SCAN, Permission.BLUETOOTH_CONNECT])
|
||||
except Exception:
|
||||
print('Exception on requesting Android Permissions. Continuing', file=sys.stderr)
|
||||
pass
|
||||
from android.app import Activity
|
||||
from android.content import Intent
|
||||
print(Intent.getIntent().getType())
|
||||
|
||||
try:
|
||||
server.serve_forever()
|
||||
|
Loading…
x
Reference in New Issue
Block a user