From f89b1acf88cc2622d8bbf8a8ba63ee2739586092 Mon Sep 17 00:00:00 2001 From: Paul Falstad Date: Wed, 23 Oct 2024 19:24:51 -0700 Subject: [PATCH] show current source power (#958) --- src/com/lushprojects/circuitjs1/client/CurrentElm.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/lushprojects/circuitjs1/client/CurrentElm.java b/src/com/lushprojects/circuitjs1/client/CurrentElm.java index 822a542c8..1606a7a7d 100644 --- a/src/com/lushprojects/circuitjs1/client/CurrentElm.java +++ b/src/com/lushprojects/circuitjs1/client/CurrentElm.java @@ -99,7 +99,8 @@ public void setEditValue(int n, EditInfo ei) { } void getInfo(String arr[]) { arr[0] = "current source"; - getBasicInfo(arr); + int i = getBasicInfo(arr); + arr[i++] = "P = " + getUnitText(getPower(), "W"); } double getVoltageDiff() { return volts[1] - volts[0];