Browse Source

修复定时校准增量值下发

datasub12_previous
H Vs 1 year ago
parent
commit
e6bc6af091
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      HealthMonitor.WebApi/Worker.cs

+ 8
- 0
HealthMonitor.WebApi/Worker.cs View File

@@ -249,10 +249,18 @@ namespace HealthMonitor.WebApi
var currentSystolicInc = (int)((systolicRefValue - systolicAvg) * systolicAvgOffset)!; var currentSystolicInc = (int)((systolicRefValue - systolicAvg) * systolicAvgOffset)!;
var currentDiastolicInc = (int)((diastolicRefValue - diastolicAvg) * diastolicAvgOffset)!; var currentDiastolicInc = (int)((diastolicRefValue - diastolicAvg) * diastolicAvgOffset)!;


lastPushSystolicInc = lastPush!.SystolicIncValue;
lastPushDiastolicInc= lastPush!.DiastolicIncValue;
// 累计增量 // 累计增量
systolicInc = currentSystolicInc + lastPushSystolicInc; systolicInc = currentSystolicInc + lastPushSystolicInc;
diastolicInc = currentDiastolicInc + lastPushDiastolicInc; diastolicInc = currentDiastolicInc + lastPushDiastolicInc;


_logger.LogInformation($"{imeiDel}--{nameof(Worker)}--计算增量值" +
$"\n systolicInc:{systolicInc}-- currentSystolicInc:{currentSystolicInc} -- lastPushSystolicInc:{lastPushSystolicInc}" +
$"\n diastolicInc:{diastolicInc} --currentDiastolicInc:{currentDiastolicInc} -- lastPushDiastolicInc:{lastPushDiastolicInc}");
_logger.LogInformation($"{imeiDel}--{nameof(Worker)}-- 定时校准,发给设备的绝对增量值=(上次绝对增量值+新数据的增量值)");


_logger.LogInformation($"{nameof(Worker)} 开启血压标定值下发: {_configBoodPressResolver.EnableBPRefPush}"); _logger.LogInformation($"{nameof(Worker)} 开启血压标定值下发: {_configBoodPressResolver.EnableBPRefPush}");
if (_configBoodPressResolver.EnableBPRefPush) if (_configBoodPressResolver.EnableBPRefPush)
// if (false) // 临时关闭 // if (false) // 临时关闭


Loading…
Cancel
Save