功能优化,增加心跳数据处理
This commit is contained in:
@@ -104,8 +104,11 @@ class ShelfActivity : BaseActivity() {
|
||||
binding.btnClearZero.setOnClickListener { v ->
|
||||
lifecycleScope.launch {
|
||||
val shelfNo = shelfModel?.shelfNo ?: 0
|
||||
val hex = shelfNo.toString(16).padStart(2, '0').uppercase()
|
||||
Log.d(TAG, "onCreate: hex=$hex")
|
||||
val zeroClearingCmd =
|
||||
"${HomeActivity.HEADER}0401${decToHex(shelfNo)}${HomeActivity.FOOTER}"
|
||||
"${HomeActivity.HEADER}0401${hex}${HomeActivity.FOOTER}"
|
||||
Log.d(TAG, "onCreate: zeroClearingCmd=$zeroClearingCmd")
|
||||
SerialPortManager.send(zeroClearingCmd)
|
||||
}
|
||||
KeyboardUtil.hideKeyboard(v.context, v)
|
||||
|
||||
Reference in New Issue
Block a user