Skip to content

Commit

Permalink
v0.1.14: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin committed Jan 30, 2023
1 parent f71ad47 commit f5bbbc0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pn532.js",
"version": "0.1.13",
"version": "0.1.14",
"author": "taichunmin <[email protected]>",
"browser": "dist/pn532.min.js",
"description": "pn532.js is a JavaScript library for PN532 base on Web Bluetooth and Web Serial.",
Expand Down
5 changes: 3 additions & 2 deletions src/plugin/Hf14a.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,9 @@ export default class Pn532Hf14a {
// 0x633D CIU_BitFraming TxLastBits
await inListPassiveTarget()
await pn532.inSelect({ tg: 1 })
await pn532.inDeselect({ tg: 1 })
await pn532.writeRegisters({ 0x6302: 0x00, 0x6303: 0x00, 0x633D: 0x07 })
await pn532.writeRegisters({ 0x6302: 0x00, 0x6303: 0x00 })
await pn532.inCommunicateThru({ data: new Packet([0x50, 0x00, 0x57, 0xCD]) }).catch(() => {})
await pn532.writeRegisters({ 0x633D: 0x07 })
await pn532.inCommunicateThru({ data: new Packet([0x40]) })
await pn532.writeRegisters({ 0x633D: 0x00 })
await pn532.inCommunicateThru({ data: new Packet([0x43]) })
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/WebbleAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class Pn532WebbleAdapter {
pn532.tx.readable.pipeTo(new WritableStream({ // no wait
write: async chunk => {
if (!me.charWrite) throw new Error('me.charWrite can not be null')
await me.charWrite.writeValueWithoutResponse(chunk.buffer)
await me.charWrite.writeValueWithResponse(chunk.buffer)
},
}, new CountQueuingStrategy({ highWaterMark: 1 })))

Expand Down
2 changes: 1 addition & 1 deletion web/taichunmin-recorder.pug
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ block script
const { data, success } = await this.pn532.$hf14a.mfReadCardGen1a()
if (_.sum(success) !== 64) {
const failed = _.filter(_.map(success, (v, k) => [k, null][v]), _.isInteger)
if (!await this.confirm(`${failed.length} 個 block 讀取失敗,是否上傳記錄?`)) return
if (!await this.confirm(`${failed.length} 個 block 讀取失敗,是否上傳記錄?`, '繼續', '取消')) return
}
await this.uploadGoogleForm({ ...card, data })
await Swal.fire({ icon: 'success', title: '上傳成功' })
Expand Down

0 comments on commit f5bbbc0

Please sign in to comment.