From: yu.dongliang <18588496441@163.com> Date: Tue, 24 Oct 2023 11:38:38 +0000 (+0800) Subject: _dc_diode_handler() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=3db23fd6fefccacdde90c7fc385072a600b03a50;p=ses.git _dc_diode_handler() --- 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;