From 655a81da7a95b0d49bf414aaaa359569d9020992 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 29 Aug 2022 12:23:13 +0200 Subject: [PATCH] .probe alli improved: * Enable current mesurement for I source * Look at only the first 2 nodes of S and W switches and F and G controlled current sources, measure current with = voltage source added to second node. So we get I(Fx), I(Gx), I(Sx), and I(Wx). --- src/frontend/inpc_probe.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/frontend/inpc_probe.c b/src/frontend/inpc_probe.c index 0b0d10f5d..8be3bdbeb 100644 --- a/src/frontend/inpc_probe.c +++ b/src/frontend/inpc_probe.c @@ -235,10 +235,15 @@ void inp_probe(struct card* deck) continue; /* select elements not in need of a measure Vsource */ - if (strchr("evihk", *instname)) + if (strchr("ehvk", *instname)) continue; - numnodes = get_number_terminals(card->line); + /* special treatment for controlled current sources and switches: + We have three or four tokens until model name, but only the first 2 are relevant nodes. */ + if (strchr("fgsw", *instname)) + numnodes = 2; + else + numnodes = get_number_terminals(card->line); char* thisline = curr_line; prevcard = card;