Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Skye Yu
jensen
Commits
968016cc
Commit
968016cc
authored
Jun 09, 2025
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 删除async关键字
parent
3e0e948c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
index.tsx
src/index.tsx
+15
-11
jensen.js
src/utils/jensen.js
+1
-1
No files found.
src/index.tsx
View file @
968016cc
...
...
@@ -175,20 +175,24 @@ export function Home() {
});
}
const
writeSN
=
async
()
=>
{
let
nsn
=
prompt
(
'请输入新的SN号'
,
''
);
if
(
nsn
&&
nsn
.
match
(
/^HD
(
H1|1E|P1
)\w{9}
$/gi
))
{
let
rst
=
await
jensen
.
writeSerialNumber
(
nsn
);
alert
(
rst
.
result
);
}
}
return
(
<>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'row'
,
gap
:
'16px'
,
padding
:
'16px'
,
alignItems
:
'center'
}
}
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
connect
}
>
Connect
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
getFilePart
}
>
get File Part
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
getTime
}
>
Get Time
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
listFiles
}
>
List Files
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
transferFile
}
>
Transfer File
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
connect
}
>
连接
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
getFilePart
}
>
获取文件
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
writeSN
}
>
SN写号
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
getTime
}
>
获取时间
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
listFiles
}
>
文件列表
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
transferFile
}
>
传输文件
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
getBluetoothStatus
}
>
蓝牙连接状态
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
bluetoothScan
}
>
蓝牙扫描
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
disconnectBTDevice
}
>
蓝牙断开
</
button
>
...
...
src/utils/jensen.js
View file @
968016cc
...
...
@@ -71,7 +71,7 @@ const COMMAND_NAMES = {
let
Logger
=
null
;
async
function
Jensen
(
log
,
conn
)
{
function
Jensen
(
log
,
conn
)
{
Logger
=
log
||
internalLogger
;
let
device
=
conn
;
let
actions
=
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment