@@ -98,21 +98,22 @@ public void run()
98
98
// Enviar Finish y Data Flags
99
99
try
100
100
{
101
+ this .out .flush ();
101
102
this .out .writeInt (finishFlag );
102
103
this .out .writeInt (dataFlag );
103
104
}catch (IOException e )
104
105
{
105
106
System .out .println ("Error enviando la señalización al servidor" );
106
107
e .printStackTrace ();
107
- this .alive = false ;
108
+ // this.alive = false;
108
109
}
109
110
110
111
111
112
if (finishFlag == 1 )
112
113
{
113
114
// Terminar todo el hilo adecuadamente (cerrar la conexión)
114
115
System .out .println ("Cerrando la conexión" );
115
- this .alive = false ;
116
+ // this.alive = false;
116
117
}
117
118
else if (dataFlag == 1 )
118
119
{
@@ -130,10 +131,10 @@ else if(dataFlag == 1)
130
131
{
131
132
System .out .println ("Error enviando valores de setpoint" );
132
133
e .printStackTrace ();
133
- this .alive = false ;
134
+ // this.alive = false;
134
135
}
135
- dataFlag = 0 ;
136
- }
136
+ }
137
+ dataFlag = 0 ;
137
138
138
139
// Lectura de valores provenientes de la planta
139
140
if (finishFlag == 0 )
@@ -149,9 +150,10 @@ else if(dataFlag == 1)
149
150
{
150
151
System .out .println ("No se pudo hacer la lectura de la señal o la transferencia del finish" );
151
152
e .printStackTrace ();
152
- this .alive = false ;
153
+ // this.alive = false;
153
154
}
154
155
}
156
+ //System.out.println("u_temp="+u_temp+" u_flow="+u_flow+" outemp="+out_temp+" outFlow="+out_flow+" time="+time_value);
155
157
// Actualizar gráficos con los nuevos valores
156
158
this .UpdateChart ();
157
159
}
@@ -182,8 +184,8 @@ public void UpdateChart()
182
184
this .gui .output_I .add (time_value , this .out_temp );
183
185
this .gui .input_I .add (time_value , this .u_temp );
184
186
this .gui .setpoint_I .add (time_value , this .setpoint_temp );
185
- this .gui .output_I .add (time_value , this .out_flow );
186
- this .gui .input_I .add (time_value , this .u_flow );
187
- this .gui .setpoint_I .add (time_value , this .setpoint_flow );
187
+ this .gui .output_II .add (time_value , this .out_flow );
188
+ this .gui .input_II .add (time_value , this .u_flow );
189
+ this .gui .setpoint_II .add (time_value , this .setpoint_flow );
188
190
}//UpdateChart
189
191
}
0 commit comments