SCF_EDA_Inductor
authoryu.dongliang <18588496441@163.com>
Tue, 14 Nov 2023 03:01:11 +0000 (11:01 +0800)
committeryu.dongliang <18588496441@163.com>
Tue, 14 Nov 2023 03:01:11 +0000 (11:01 +0800)
ses_step_simplify.c
ses_steps.c

index 850690ef925f4992a562e4429d8a8c08212820ba..534c3fd0f02c07131ff536f2957b0b23c7dfd23a 100644 (file)
@@ -60,28 +60,28 @@ void __ses_function_draw(ScfEfunction* f, cairo_t* cr)
                                p = c->pins[SCF_EDA_Battery_POS];
 
                                if (p->y < c->y) {
-                                       cairo_move_to(cr, c->x - 8, c->y - 5);
-                                       cairo_line_to(cr, c->x + 8, c->y - 5);
+                                       cairo_move_to(cr, c->x - 12, c->y - 5);
+                                       cairo_line_to(cr, c->x + 12, c->y - 5);
 
                                        cairo_move_to(cr, c->x, c->y - 5);
                                        cairo_line_to(cr, p->x, p->y);
 
-                                       cairo_move_to(cr, c->x - 5, c->y + 5);
-                                       cairo_line_to(cr, c->x + 5, c->y + 5);
+                                       cairo_move_to(cr, c->x - 8, c->y + 5);
+                                       cairo_line_to(cr, c->x + 8, c->y + 5);
 
                                        p = c->pins[SCF_EDA_Battery_NEG];
                                        cairo_move_to(cr, c->x, c->y + 5);
                                        cairo_line_to(cr, p->x, p->y);
 
                                } else {
-                                       cairo_move_to(cr, c->x - 8, c->y + 5);
-                                       cairo_line_to(cr, c->x + 8, c->y + 5);
+                                       cairo_move_to(cr, c->x - 12, c->y + 5);
+                                       cairo_line_to(cr, c->x + 12, c->y + 5);
 
                                        cairo_move_to(cr, c->x, c->y + 5);
                                        cairo_line_to(cr, p->x, p->y);
 
-                                       cairo_move_to(cr, c->x - 5, c->y - 5);
-                                       cairo_line_to(cr, c->x + 5, c->y - 5);
+                                       cairo_move_to(cr, c->x - 8, c->y - 5);
+                                       cairo_line_to(cr, c->x + 8, c->y - 5);
 
                                        p = c->pins[SCF_EDA_Battery_NEG];
                                        cairo_move_to(cr, c->x, c->y - 5);
@@ -91,6 +91,24 @@ void __ses_function_draw(ScfEfunction* f, cairo_t* cr)
                                cairo_stroke(cr);
                                break;
 
+                       case SCF_EDA_Inductor:
+                               p = c->pins[SCF_EDA_Battery_POS];
+                               cairo_move_to(cr, c->x - 8, c->y - 5);
+                               cairo_line_to(cr, c->x + 8, c->y - 5);
+
+                               cairo_move_to(cr, c->x, c->y - 5);
+                               cairo_line_to(cr, p->x, p->y);
+
+                               cairo_move_to(cr, c->x - 8, c->y + 5);
+                               cairo_line_to(cr, c->x + 8, c->y + 5);
+
+                               p = c->pins[SCF_EDA_Battery_NEG];
+                               cairo_move_to(cr, c->x, c->y + 5);
+                               cairo_line_to(cr, p->x, p->y);
+
+                               cairo_stroke(cr);
+                               break;
+
                        case SCF_EDA_Resistor:
                                p = c->pins[0];
 
index 044cbc92bcf8c946bf7e101167eb50e19858cc48..204bbab7b4fa979f9735dc2d6e97ebde6dd05495 100644 (file)
@@ -144,7 +144,7 @@ int ses_steps_analyse(ScfEfunction* f, int64_t ns, int64_t count)
                        return ret;
 
                int j;
-               for (j = 0; j < 3; j++) {
+               for (j = 0; j < 1; j++) {
                        printf("\n\033[33m%s(), %d(), j: %d\033[0m\n", __func__, __LINE__, j);
 
                        ret = __ses_steps_analyse(f, ns, i, ctx);