mirror of
https://github.com/johndoe6345789/tustu.git
synced 2026-05-03 18:15:00 +00:00
110 lines
2.9 KiB
Java
110 lines
2.9 KiB
Java
package com.efiAnalytics.apps.ts.dashboard;
|
|
|
|
import G.T;
|
|
import G.cq;
|
|
import G.cu;
|
|
import V.a;
|
|
import aE.a;
|
|
import bH.D;
|
|
import d.d;
|
|
import d.j;
|
|
import java.io.Serializable;
|
|
|
|
public abstract class SingleChannelDashComponent extends s implements cq, d, j, Serializable {
|
|
protected String S = null;
|
|
|
|
private String a = null;
|
|
|
|
private String b = null;
|
|
|
|
private double c = 0.0D;
|
|
|
|
private String d = null;
|
|
|
|
private static String[] f = new String[] { "veTuneValue", "deadValue" };
|
|
|
|
public String getOutputChannel() {
|
|
return this.S;
|
|
}
|
|
|
|
public abstract void setCurrentOutputChannelValue(String paramString1, String paramString2);
|
|
|
|
public abstract void setValue(double paramDouble);
|
|
|
|
public abstract double getValue();
|
|
|
|
public abstract void setCurrentOutputChannelValue(String paramString, double paramDouble);
|
|
|
|
public void setOutputChannel(String paramString) {
|
|
this.S = paramString;
|
|
invalidatePainter();
|
|
}
|
|
|
|
public void subscribeToOutput() {
|
|
String str = this.e;
|
|
if (a.A() != null && (str == null || str.equals("") || (!str.equals(cu.a) && T.a().c(str) == null)))
|
|
str = a.A().u();
|
|
try {
|
|
if (getOutputChannel() != null && !isOnDontSubscribeList(getOutputChannel())) {
|
|
cu cu = cu.a();
|
|
cu.a(this);
|
|
cu.a(str, getOutputChannel(), this);
|
|
}
|
|
} catch (Exception exception) {
|
|
if (this.d == null || (getOutputChannel() != null && !this.d.equals(getOutputChannel()))) {
|
|
D.b("Failed to subscribe DashComp to OutputChannel " + getOutputChannel() + "\nNot found in current configuration.");
|
|
this.d = getOutputChannel();
|
|
}
|
|
setInvalidState(true);
|
|
throw new a("Failed to subscribe DashComp to OutputChannel " + getOutputChannel() + "\nPlease set to a valid OutputChannel.");
|
|
}
|
|
setInvalidState(false);
|
|
}
|
|
|
|
public void unsubscribeToOutput() {
|
|
cu.a().a(this);
|
|
}
|
|
|
|
private boolean isOnDontSubscribeList(String paramString) {
|
|
for (byte b = 0; b < f.length; b++) {
|
|
if (f[b].equals(paramString))
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public boolean isDirty() {
|
|
return super.isDirty();
|
|
}
|
|
|
|
protected void updateLastsVals() {
|
|
super.updateLastsVals();
|
|
this.c = getValue();
|
|
}
|
|
|
|
public String getShortClickAction() {
|
|
return this.a;
|
|
}
|
|
|
|
public void setShortClickAction(String paramString) {
|
|
this.a = paramString;
|
|
}
|
|
|
|
public String getLongClickAction() {
|
|
return this.b;
|
|
}
|
|
|
|
public void setLongClickAction(String paramString) {
|
|
this.b = paramString;
|
|
}
|
|
|
|
public String getParameterValue(String paramString) {
|
|
return paramString.equals("outputChannelName") ? getOutputChannel() : (paramString.equals("ecuConfigName") ? getEcuConfigurationName() : null);
|
|
}
|
|
}
|
|
|
|
|
|
/* Location: /home/rewrich/Downloads/TunerStudioMS/TunerStudioMS/!/com/efiAnalytics/apps/ts/dashboard/SingleChannelDashComponent.class
|
|
* Java compiler version: 8 (52.0)
|
|
* JD-Core Version: 1.1.3
|
|
*/ |