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
48571810
Commit
48571810
authored
Apr 14, 2025
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加productId跟踪
parent
1d2ac0d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
index.tsx
src/index.tsx
+6
-1
jensen.js
src/utils/jensen.js
+1
-0
No files found.
src/index.tsx
View file @
48571810
...
...
@@ -40,6 +40,11 @@ export function Home() {
setGreeting
(
null
)
}
const
connect
=
async
()
=>
{
await
jensen
.
connect
();
alert
(
jensen
.
getModel
()
+
' connected'
)
}
const
disconnectBTDevice
=
async
()
=>
{
let
r
=
await
jensen
.
disconnectBTDevice
();
console
.
log
(
r
);
...
...
@@ -168,7 +173,7 @@ export function Home() {
return
(
<>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'row'
,
gap
:
'16px'
,
padding
:
'16px'
,
alignItems
:
'center'
}
}
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
()
=>
jensen
.
connect
()
}
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
connect
}
>
Connect
</
button
>
<
button
style=
{
{
width
:
'200px'
,
height
:
'50px'
}
}
onClick=
{
getFilePart
}
>
...
...
src/utils/jensen.js
View file @
48571810
...
...
@@ -137,6 +137,7 @@ function Jensen(log) {
:
device
.
productId
==
0xb00e
?
'hidock-p1'
:
device
.
productId
==
0xb00f
?
'hidock-p1:mini'
:
'unknown'
;
console
.
log
(
'device pid: '
+
device
.
productId
);
}
catch
(
e
)
{
Logger
.
error
(
'jensen'
,
'setup'
,
String
(
e
));
}
...
...
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