Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9dea0b3b
authored
Mar 08, 2020
by
pye52
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'new_master' into new_for_phone
parents
c3797dce
57ae0b72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
app/src/main/java/com/bgycc/smartcanteen/qrcode/QRCodeScanFactory.java
+4
-3
No files found.
app/src/main/java/com/bgycc/smartcanteen/qrcode/QRCodeScanFactory.java
View file @
9dea0b3b
...
...
@@ -9,12 +9,13 @@ public class QRCodeScanFactory {
private
static
final
String
TPS_PORT
=
"/dev/ttyS0"
;
private
static
final
String
QUAD_PORT
=
"/dev/ttyS6"
;
public
static
IQRCodeScan
create
()
throws
Exception
{
if
(
Build
.
MODEL
.
contains
(
TPS
))
{
String
model
=
Build
.
MODEL
;
if
(
model
.
contains
(
TPS
))
{
return
new
TPS
(
TPS_PORT
);
}
else
if
(
Build
.
DEVICE
.
contains
(
QUAD
))
{
}
else
if
(
model
.
contains
(
QUAD
))
{
return
new
QUAD
(
QUAD_PORT
);
}
else
{
throw
new
RuntimeException
(
"不明设备型号: "
+
Build
.
DEVICE
);
throw
new
RuntimeException
(
"不明设备型号: "
+
model
);
}
}
}
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