mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-12-03 16:27:26 +00:00
parent
d3d04459d6
commit
139f7eaf17
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit
|
|||
}
|
||||
|
||||
fun noteAdvertisement(rpi: ByteArray, aem: ByteArray, rssi: Int, timestamp: Long = Date().time) = writableDatabase.run {
|
||||
val update = compileStatement("UPDATE $TABLE_ADVERTISEMENTS SET rssi = ((rssi * duration) + (? * (? - timestamp - duration)) / (? - timestamp)), duration = (? - timestamp) WHERE rpi = ? AND timestamp > ? AND timestamp < ?").run {
|
||||
val update = compileStatement("UPDATE $TABLE_ADVERTISEMENTS SET rssi = ((rssi * duration) + (? * (? - timestamp - duration))) / (? - timestamp), duration = (? - timestamp) WHERE rpi = ? AND timestamp > ? AND timestamp < ?").run {
|
||||
bindLong(1, rssi.toLong())
|
||||
bindLong(2, timestamp)
|
||||
bindLong(3, timestamp)
|
||||
|
|
Loading…
Reference in a new issue