20260603-① 适配桨频器,做了连接和设置页面,已经内测ok。
② 适配T5骑行台,做了相关页面。内测还不够充分,产品也不着急上市,所以此版更新中,应该需要隐藏掉。 ③ 修复了之前 盘爪设备信息 读取时,有概率出现乱码的情况。读取时做了排序和延迟,修复了此问题。 ④ 多语言我们这边做更新时,拉取的是仅有中英文的版本,当时你们那好像有更新更多语言?所以需要适配一下。 ⑤ 蓝牙名搜索时,适配最新的固件名称: 盘爪为:PF-PM5-前缀,桨频器为PF-STK-前缀,骑行台为PF-T5-前缀。同时允许前缀POWERFUN-也能显示并连接。
This commit is contained in:
1 parent
d3d6774448
commit
8dd0edd2ce
20 files changed
+6689
-938
No files matched your search
@@ -1,23 +1,55 @@
|
||||
console.log("🔥 当前 App.tsx 已加载");
|
||||
import * as React from "react";
|
||||
import { NavigationContainer } from "@react-navigation/native";
|
||||
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
||||
|
||||
import HomeScreen from "./src/HomeScreen";
|
||||
import ScanScreen from "./src/ScanScreen";
|
||||
import ScanScreen2 from "./src/ScanScreen2";
|
||||
import ScanScreen3 from "./src/ScanScreen3";
|
||||
import InfoScreen from "./src/InfoScreen";
|
||||
import DfuScreen from "./src/DfuScreen";
|
||||
import PrivacyScreen from "./src/PrivacyScreen";
|
||||
import SplashScreen from "./src/SplashScreen"; // ✅ 新增启动页
|
||||
import pxToDp from "./src/helper/pxToDp";
|
||||
import SettingScreen from "./src/SettingScreen";
|
||||
import './src/i18n'
|
||||
import InfoScreen2 from "./src/InfoScreen2";
|
||||
import InfoScreen3 from "./src/InfoScreen3";
|
||||
import SpindownScreen from "./src/SpindownScreen";
|
||||
import { decode } from "base-64";
|
||||
|
||||
|
||||
// 不要 global.atob
|
||||
// 不要 atob
|
||||
|
||||
const base64ToBytes = (base64: string): number[] => {
|
||||
const binary = decode(base64);
|
||||
const bytes: number[] = [];
|
||||
|
||||
for (let i = 0; i < binary.length; i++) {
|
||||
bytes.push(binary.charCodeAt(i));
|
||||
}
|
||||
|
||||
return bytes;
|
||||
};
|
||||
|
||||
export type RootStackParamList = {
|
||||
Splash: undefined;
|
||||
Home: undefined;
|
||||
Scan: undefined;
|
||||
ScanScreen2: undefined;
|
||||
ScanScreen3: undefined;
|
||||
Info: { peripheral: any };
|
||||
Dfu: { deviceId: string; name: string; firmware: string };
|
||||
Info2: { peripheral: any };
|
||||
Info3: { peripheral: any };
|
||||
Spindown: { peripheral: any };
|
||||
Dfu: {
|
||||
deviceId: string;
|
||||
systemId?: string;
|
||||
address?: string | number;
|
||||
name: string;
|
||||
firmware: string;
|
||||
};
|
||||
Privacy: undefined;
|
||||
Setting: undefined;
|
||||
};
|
||||
@@ -25,6 +57,23 @@ export type RootStackParamList = {
|
||||
const Stack = createNativeStackNavigator<RootStackParamList>();
|
||||
|
||||
export default function App() {
|
||||
|
||||
//linshi
|
||||
React.useEffect(() => {
|
||||
const test = async () => {
|
||||
try {
|
||||
console.log("🔥 App.tsx fetch test start");
|
||||
const resp = await fetch("https://www.baidu.com");
|
||||
console.log("🔥 App.tsx fetch status =", resp.status);
|
||||
const text = await resp.text();
|
||||
console.log("🔥 App.tsx fetch text length =", text.length);
|
||||
} catch (e) {
|
||||
console.log("❌ App.tsx fetch error =", e);
|
||||
}
|
||||
};
|
||||
|
||||
test();
|
||||
}, []);
|
||||
return (
|
||||
<NavigationContainer>
|
||||
<Stack.Navigator
|
||||
@@ -32,13 +81,18 @@ export default function App() {
|
||||
screenOptions={{
|
||||
animation : 'slide_from_right'
|
||||
}}>
|
||||
<Stack.Screen
|
||||
name="Info2"
|
||||
component={InfoScreen2}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
{/* 启动页(无标题) */}
|
||||
<Stack.Screen
|
||||
name="Splash"
|
||||
component={SplashScreen}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
|
||||
|
||||
{/* 首页(标题栏无文字) */}
|
||||
<Stack.Screen
|
||||
name="Home"
|
||||
@@ -53,12 +107,35 @@ export default function App() {
|
||||
// options={{ title: "搜索设备" }}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="ScanScreen2"
|
||||
component={ScanScreen2}
|
||||
// options={{ title: "搜索设备" }}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="ScanScreen3"
|
||||
component={ScanScreen3}
|
||||
// options={{ title: "搜索设备" }}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Info"
|
||||
component={InfoScreen}
|
||||
// options={{ title: "设备详情" }}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Info3"
|
||||
component={InfoScreen3}
|
||||
// options={{ title: "设备详情" }}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Spindown"
|
||||
component={SpindownScreen}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Dfu"
|
||||
component={DfuScreen}
|
||||
|
||||
Reference in new issue
Block a user