Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories: dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { maven { url = uri("https://jitpack.io") } } } Step 2. Add the dependency // https://jitpack.io/com/github/zrenjun/pc700sdk/1.1.4/pc700sdk-1.1.4.aar dependencies { implementation 'com.github.zrenjun:pc700sdk:1.1.14' } Step 3. Add the ndk ndk { abiFilters.add("arm64-v8a") }
初始化
//初始化日志 LogUtil.isSaveLog(applicationContext) //初始化bus CommonApp.init(this) //初始化串口 serial = SerialViewModel(this) serial.start()
发送命令
App.serial.mAPI?.startNIBPMeasure()
获取数据
observeEvent<NIBPGetMeasureResultEvent> { }
具体参见Ecg12Fragment
- XmlUtil(输出xml)
- JniTraditionalAnalysis(本地心电传统分析)
- EcgDataManager(jpg,pdf)
MainEcgManager.getInstance().updateMainEcgShowStyle(LeadType.LEAD_6)
具体参见:FirmwareUpgradeDialog 注意:有主固件需先升级,每次升级到100%需等待一会儿固件重启
串口日志分享:StreamLogFileManager.share()
host/device模式:sendBroadcast(Intent("android.intent.action.${if (flag) "enablehostmode" else "disablehostmode"}"))