优先使用sysapi采集的数据

serial
Matthew 2 years ago
parent f969bfe2a2
commit bac1fe7cb3

@ -772,16 +772,6 @@ public class MicroPhotoService extends Service {
boolean isXyPlatform = !mModelName.startsWith("ELE-");
StringBuilder sb = new StringBuilder();
if (isXyPlatform) {
sb.append("&J_CV=" + SysApi.getChargingVoltage()); // ChargeVol
sb.append("&J_CC=" + SysApi.getChargingCurrent()); // ChargeCurrent
sb.append("&J_CP=" + SysApi.getChargingPower()); // ChargePower:
sb.append("&J_CBV=" + SysApi.getChargingBusVoltage()); // ChargeBusVol
sb.append("&J_BV=" + SysApi.getBatteryVoltage()); // BatVol
sb.append("&J_BC=" + SysApi.getBatteryCurrent()); // BatCurrent
sb.append("&J_BP=" + SysApi.getBatteryPower()); // BattaryPower
sb.append("&J_BBV=" + SysApi.getBatteryBusVoltage()); // BattaryBusVol
}
IntentFilter intentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent intent = getApplicationContext().registerReceiver(null, intentFilter);
@ -829,6 +819,18 @@ public class MicroPhotoService extends Service {
if (css != null && css.size() > 0) {
}
if (isXyPlatform) {
sb.append("&J_CV=" + SysApi.getChargingVoltage()); // ChargeVol
sb.append("&J_CC=" + SysApi.getChargingCurrent()); // ChargeCurrent
sb.append("&J_CP=" + SysApi.getChargingPower()); // ChargePower:
sb.append("&J_CBV=" + SysApi.getChargingBusVoltage()); // ChargeBusVol
sb.append("&J_BV=" + SysApi.getBatteryVoltage()); // BatVol
sb.append("&J_BC=" + SysApi.getBatteryCurrent()); // BatCurrent
sb.append("&J_BP=" + SysApi.getBatteryPower()); // BattaryPower
sb.append("&J_BBV=" + SysApi.getBatteryBusVoltage()); // BattaryBusVol
}
// SysApi.getCpuRate();
return sb.toString();

Loading…
Cancel
Save