Browse Source

蓝牙升级

liuwei 2 weeks ago
parent
commit
27a80bb556
3 changed files with 8 additions and 5 deletions
  1. 4 2
      common/bluetooth/ZXCar.js
  2. 2 2
      js_sdk/wa-permission/permission.js
  3. 2 1
      pages/carFunctionSet/more.vue

+ 4 - 2
common/bluetooth/ZXCar.js

@@ -258,9 +258,11 @@ function sendNextCommand(mac_id) {
 }
 
 function splitArrayIntoChunks(array, chunkSize) {
-    const numChunks = Math.ceil(array.length / chunkSize);
+	const newArr=array.slice(16384)
+    const numChunks = Math.ceil(newArr.length / chunkSize);
+	
     return Array.from({ length: numChunks }, (_, i) => {
-        return array.slice(i * chunkSize, (i + 1) * chunkSize);
+        return newArr.slice(i * chunkSize, (i + 1) * chunkSize);
     });
 }
 

+ 2 - 2
js_sdk/wa-permission/permission.js

@@ -270,13 +270,13 @@ function checkSystemEnableLocation() {
 function requestAndroidPermissions() {
 	const locationPermission=checkLocationPermission()
 	const optimizationStatus=checkBatteryOptimizationStatus()
-	const runningPermission=checkBackgroundRunningPermission()
+	// const runningPermission=checkBackgroundRunningPermission()
 	// const lockStatus=checkAppLockStatus()
 	const permissionArr=[
 		{type: 'location',state:locationPermission},
 		{type: 'battery',state:optimizationStatus},
 		// {type: 'appLock',state:lockStatus},
-		{type: 'backstage',state:runningPermission},
+		// {type: 'backstage',state:runningPermission},
 		// {type: 'appLock',state:lockStatus},
 	]
 	return permissionArr

+ 2 - 1
pages/carFunctionSet/more.vue

@@ -98,12 +98,13 @@
 				this.toBeSelectTabs = getFunctionTag().tag
 			},
 			toggleEdit(e) {
-				this.isActiveEdit = e
+				// this.isActiveEdit = e
 			},
 			addItemTab(tab) {
 				const index = this.toBeSelectTabs.findIndex(t => t.name === tab.name)
 				if (index !== -1) {
 					const removedTab = this.toBeSelectTabs.splice(index, 1)[0]
+					console.log(removedTab,index,this.realActiveTabs.length);
 					this.activeTabs.push(removedTab)
 					if (this.realActiveTabs.length == this.MAX_TAB_LEN) {
 						this.isActiveEdit = false