添加现有代码V1.6

This commit is contained in:
2026-06-20 15:44:09 +08:00
commit 3c92f6c285
107 changed files with 15211 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import json
import os
CONFIG_PATH = '/flash/config/dev.json'
def read_config():
try:
with open(CONFIG_PATH, 'r') as f:
conf = json.load(f)
except:
conf = {
"id": 1,
"ip": "192.168.100.21",
"code": "1#SCANNER"
}
return conf
def save_config(conf):
try:
with open(CONFIG_PATH, 'w') as f:
json.dump(conf, f)
except:
pass