taotoolkit 1.0.2__tar.gz → 1.0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: taotoolkit
3
- Version: 1.0.2
3
+ Version: 1.0.5
4
4
  Summary: Tao ToolKit
5
5
  Author-email: taotaoli <taotaoli@asrmicro.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "taotoolkit"
7
- version = "1.0.2"
7
+ version = "1.0.5"
8
8
  description = "Tao ToolKit"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -385,7 +385,7 @@ class DevOp:
385
385
 
386
386
  cmd3 = f"--size {recordWidth}x{recordHeight} /sdcard/{mp4Name}"
387
387
  cmd = f"{cmd1} {cmd2} {cmd3}"
388
- if sysVersion == "Linux":
388
+ if sysVersion == "linux":
389
389
  pCmd(cmd, showCmd=True, splitCmd=False, shell=True, logLevel="info", waitDone=False)
390
390
  else:
391
391
  pCmd(cmd, showCmd=True, splitCmd=False, shell=False, logLevel="info", waitDone=False)
@@ -52,13 +52,13 @@ class jenkinsTool:
52
52
  self.isUserDebug = True if isUserDebug == "1" else False
53
53
  self.packageFile = "release.zip"
54
54
  self.retainUserData = False # 是否保留用户数据,默认不保留
55
- if sysVersion == "Linux":
55
+ if sysVersion == "linux":
56
56
  self.downloadPath = "/home/local/Downloads/jenkin" # 下载路径和解压路径
57
- self.extractPath = "/home/local/Downloads/jenkin"
57
+ self.extractPath = self.downloadPath
58
58
  self.aimgTool = "aimgtool"
59
59
  else:
60
60
  self.downloadPath = r"D:\jenkin" # 下载路径和解压路径
61
- self.extractPath = r"D:\jenkin"
61
+ self.extractPath = self.downloadPath
62
62
  self.aimgTool = "aimgtool.exe"
63
63
  # logi(f"download package to {self.downloadPath}")
64
64
 
@@ -341,7 +341,7 @@ class jenkinsTool:
341
341
  return dict_from_list
342
342
 
343
343
  def browserDownload(self, url, timeOut=600):
344
- if sysVersion == "Linux":
344
+ if sysVersion == "linux":
345
345
  browser = "wget"
346
346
  else:
347
347
  browser = "C:\\Program Files\\Mozilla Firefox\\firefox.exe -headless"
@@ -511,12 +511,11 @@ class jenkinsTool:
511
511
  logd(f"{url} {dest_path}")
512
512
  start = time.time()
513
513
 
514
- windowsDownloadPath = r"D:\jenkin"
515
- if sysVersion == "Linux":
514
+ if sysVersion == "linux":
516
515
  targetZip = os.path.join(os.getcwd(), self.packageFile)
517
516
  else:
518
- targetZip = os.path.join(windowsDownloadPath, self.packageFile)
519
- partFile = findFilesBySuffixKeyword(windowsDownloadPath, ".part", "release")
517
+ targetZip = os.path.join(self.downloadPath, self.packageFile)
518
+ partFile = findFilesBySuffixKeyword(self.downloadPath, ".part", "release")
520
519
  for i in partFile:
521
520
  os.remove(targetZip)
522
521
 
@@ -635,7 +634,7 @@ class jenkinsTool:
635
634
  logi(f"download {finalCfg}, wait for download port ready ... ")
636
635
  refreshWait("usbdownload", 60, 0.3, self.getInfo, devSerial)
637
636
  cmd = ""
638
- if sysVersion == "Linux":
637
+ if sysVersion == "linux":
639
638
  cmd = f"./{self.aimgTool} download -t {finalCfg}"
640
639
  else:
641
640
  cmd = f"{self.aimgTool} download -t {finalCfg}"
@@ -761,7 +760,7 @@ def getInfo(acmd):
761
760
 
762
761
 
763
762
  def CLI_aimgDownload(args):
764
- if sysVersion == "Linux":
763
+ if sysVersion == "linux":
765
764
  aimgTool = "aimgtool"
766
765
  acmd = "./aimgtool"
767
766
  else:
@@ -540,7 +540,7 @@ class asrCamOp(DevOp):
540
540
  def __init__(self, checkCam=False, useUi=False, **kwargs):
541
541
  logd(f"needroot = {kwargs.get('needRoot', False)}, serial = {kwargs.get('serial', '')}")
542
542
  super().__init__(**kwargs)
543
- if sysVersion == "Linux":
543
+ if sysVersion == "linux":
544
544
  self.tuning_assistant = "tuning_assistant64.out"
545
545
  else:
546
546
  self.tuning_assistant = "tuning_assistant64.exe"
@@ -623,7 +623,7 @@ class asrCamOp(DevOp):
623
623
  def netCon(self, on=True):
624
624
  if on:
625
625
  logi("ip connect on")
626
- if sysVersion == "Linux":
626
+ if sysVersion == "linux":
627
627
  rCmd(
628
628
  "echo AAbbcc123 |sudo -S sysctl -w net.ipv4.conf.enp3s0.route_localnet=1",
629
629
  showCmd=True,
@@ -657,12 +657,10 @@ class asrCamOp(DevOp):
657
657
  else:
658
658
  loge("windows unsupport")
659
659
  return
660
- else:
661
- loge(f"unsupport cmd in {sysVersion}")
662
- return
660
+
663
661
  else:
664
662
  logi("ip connect off")
665
- if sysVersion == "Linux":
663
+ if sysVersion == "linux":
666
664
  rCmd(
667
665
  "sudo iptables -t nat -F PREROUTING ",
668
666
  showRet=True,
@@ -676,8 +674,6 @@ class asrCamOp(DevOp):
676
674
  self.resetNet()
677
675
  rCmd(f"adb -s {self.serial} forward --remove tcp:10000")
678
676
  rCmd("netsh interface portproxy reset", showRet=False)
679
- else:
680
- loge(f"unsupport cmd in {sysVersion}")
681
677
 
682
678
  def openCam(self, id=0):
683
679
  if id == 0:
@@ -690,7 +686,7 @@ class asrCamOp(DevOp):
690
686
  self.tuningGetModuleGroup()
691
687
 
692
688
  def readIsp(self, CFliter: str, param: str, row=0, col=0, is_float=False, showCmd=False, module=0, group=0)-> Union[int, float]:
693
- if sysVersion == "Linux":
689
+ if sysVersion == "linux":
694
690
  eExit("tuning_assistant not support linux")
695
691
  cmd = f"{self.tuning_assistant} 127.0.0.1 t 3000 3000 3000 r m{module}_g{group} {CFliter} {param} {row} {col}"
696
692
  try:
@@ -716,7 +712,7 @@ class asrCamOp(DevOp):
716
712
  return 0
717
713
 
718
714
  def writeIsp(self, CFliter: str, param: str, row: int, col: int, value: Union[int, float], showCmd=False):
719
- if sysVersion == "Linux":
715
+ if sysVersion == "linux":
720
716
  eExit("tuning_assistant not support linux")
721
717
  if isinstance(value, float):
722
718
  cf = ctypes.c_float(value)
@@ -1157,8 +1153,8 @@ def CLI_capVrf(argsList):
1157
1153
 
1158
1154
 
1159
1155
  def CLI_saveTuning(argsList):
1160
- if sysVersion == "Linux":
1161
- loge("Linux not support save tuning!")
1156
+ if sysVersion == "linux":
1157
+ loge("linux not support save tuning!")
1162
1158
  return
1163
1159
  parser = argparse.ArgumentParser(prog="savetuning", description="保存tuning参数")
1164
1160
  parser.add_argument("-a", "--all", type=str, default="1", choices=["0", "1"], help="是否保存包含RO的参数")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: taotoolkit
3
- Version: 1.0.2
3
+ Version: 1.0.5
4
4
  Summary: Tao ToolKit
5
5
  Author-email: taotaoli <taotaoli@asrmicro.com>
6
6
  License-Expression: MIT
File without changes
File without changes