forked from srn/hyperx-cloud-flight-wireless
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
15 lines (14 loc) · 623 Bytes
/
test.js
File metadata and controls
15 lines (14 loc) · 623 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const hyperxCloudFlight = require('./')({ debug: true })
hyperxCloudFlight.on('power', (power) => console.log(`power: ${power}`))
hyperxCloudFlight.on('muted', (status) => console.log(`muted: ${status}`))
hyperxCloudFlight.on('volume', (direction) =>
console.log(`volume: ${direction}`)
)
hyperxCloudFlight.on('charging', (charging) =>
console.log(`charging: ${charging}`)
)
hyperxCloudFlight.on('battery', (percentage) =>
console.log(`current battery: ${percentage}%`)
)
hyperxCloudFlight.on('unknown', (data) => console.log('unknown', data))
hyperxCloudFlight.on('error', (error) => console.error('error', error))