From 3db23fd6fefccacdde90c7fc385072a600b03a50 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Tue, 24 Oct 2023 19:38:38 +0800 Subject: [PATCH] _dc_diode_handler() --- ses_step_dc_diode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ses_step_dc_diode.c b/ses_step_dc_diode.c index ada2aaa..031024f 100644 --- a/ses_step_dc_diode.c +++ b/ses_step_dc_diode.c @@ -91,11 +91,12 @@ static int _dc_diode_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx else c->status = SCF_EDA_Status_ON; } else { + pb->v = lb->v; + pe->v = le->v; c->status = SCF_EDA_Status_OFF; - scf_logd("Diode c%ld, status: %d, pb: %lg, pe: %lg, diff: %lg\n", c->id, c->status, pb->v, pe->v, pb->v - pe->v); } - scf_loge("\033[34mDiode c%ld, status: %d\033[0m\n", c->id, c->status); + scf_loge("\033[34mDiode c%ld, status: %d, pb: %lg, pe: %lg, diff: %lg\033[0m\n", c->id, c->status, pb->v, pe->v, pb->v - pe->v); } return 0; -- 2.25.1