Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 47c75f5ba9 - Show all commits

View File

@ -11,7 +11,7 @@ const log = require('../log')('ble')
const wifi = require('../wifi') const wifi = require('../wifi')
const BLENO_DEVICE_NAME = process.env.BLENO_DEVICE_NAME || 'intval3' const BLENO_DEVICE_NAME = process.env.BLENO_DEVICE_NAME || 'intval3'
const DEVICE_ID = process.env.DEVICE_ID || 'intval3' let DEVICE_ID = process.env.DEVICE_ID || 'intval3'
const SERVICE_ID = process.env.SERVICE_ID || 'intval3_ble' const SERVICE_ID = process.env.SERVICE_ID || 'intval3_ble'
const CHAR_ID = process.env.CHAR_ID || 'intval3char' const CHAR_ID = process.env.CHAR_ID || 'intval3char'
const WIFI_ID = process.env.WIFI_ID || 'wifichar' const WIFI_ID = process.env.WIFI_ID || 'wifichar'
@ -134,7 +134,7 @@ class BLE {
log.info('stateChange', { state : state }) log.info('stateChange', { state : state })
if (state === 'poweredOn') { if (state === 'poweredOn') {
log.info('Starting advertising', { BLE_ID : BLE_ID }) log.info('Starting advertising', { BLE_ID : BLE_ID })
bleno.startAdvertising(BLENO_DEVICE_NAME, [BLE_ID]) bleno.startAdvertising(BLE_ID, [CHAR_ID, WIFI_ID])
} else { } else {
bleno.stopAdvertising() bleno.stopAdvertising()
} }