Skip to content

Commit

Permalink
update core and add power level
Browse files Browse the repository at this point in the history
  • Loading branch information
carterharrison committed Apr 10, 2019
1 parent dd2776e commit ae88e9f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ble-xyo-module/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.github.XYOracleNetwork:sdk-core-kotlin:0.1.3-beta.4'
implementation 'com.github.XYOracleNetwork:sdk-core-kotlin:0.1.4-beta.0'
implementation 'com.github.XYOracleNetwork:sdk-core-android:1.2.5'
implementation 'com.github.XYOracleNetwork:sdk-ble-android:5d97d1a633'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import network.xyo.sdkobjectmodelkotlin.objects.toHexString
import java.nio.ByteBuffer
import java.util.*
import java.util.concurrent.ConcurrentHashMap
import kotlin.collections.ArrayList
import kotlin.collections.HashMap
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
Expand Down Expand Up @@ -92,12 +93,17 @@ open class XyoBluetoothClient: XYIBeaconBluetoothDevice {
}

override fun getNetworkHeretics(): Array<XyoBuff> {
val toReturn = ArrayList<XyoBuff>()

if (rssi != null) {
val encodedRssi = XyoBuff.newInstance(XyoSchemas.RSSI, byteArrayOf(rssi.toByte()))
return arrayOf(encodedRssi)
toReturn.add(encodedRssi)
}

return arrayOf()
val pwr = XyoBuff.newInstance(XyoSchemas.BLE_POWER_LVL, byteArrayOf(power))
toReturn.add(pwr)

return toReturn.toTypedArray()
}

/**
Expand Down
2 changes: 1 addition & 1 deletion xyo-mod-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies {
implementation "androidx.legacy:legacy-support-v4:1.0.0"

implementation 'com.github.XYOracleNetwork:sdk-core-android:1.2.5'
implementation 'com.github.XYOracleNetwork:sdk-core-kotlin:0.1.3-beta.4'
implementation 'com.github.XYOracleNetwork:sdk-core-kotlin:0.1.4-beta.0'
implementation 'com.github.XYOracleNetwork:sdk-ble-android:5d97d1a633'

implementation "com.nabinbhandari.android:permissions:3.8"
Expand Down

0 comments on commit ae88e9f

Please sign in to comment.