_dc_diode_handler()
authoryu.dongliang <18588496441@163.com>
Tue, 24 Oct 2023 11:38:38 +0000 (19:38 +0800)
committeryu.dongliang <18588496441@163.com>
Tue, 24 Oct 2023 11:38:38 +0000 (19:38 +0800)
ses_step_dc_diode.c

index ada2aaad1784ea156143d82d0844426232d28aba..031024f3a5e9954eaba4ca1921c0f780316115a8 100644 (file)
@@ -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;