|
@@ -201,10 +201,7 @@
|
201
|
201
|
}
|
202
|
202
|
});
|
203
|
203
|
var doRoast = function() {
|
204
|
|
- var lc = 1;
|
205
|
204
|
currentBatchInfo = batch;
|
206
|
|
- var targetseries = -1;
|
207
|
|
- navigationwindow.loggingWindow.clearLog();
|
208
|
205
|
query = new QSqlQuery();
|
209
|
206
|
var q = "SELECT file FROM sample_roast_profiles WHERE profile_name = :name AND time = (SELECT max(time) FROM sample_roast_profiles WHERE profile_name = :again)";
|
210
|
207
|
query.prepare(q);
|
|
@@ -220,47 +217,17 @@
|
220
|
217
|
if(query.next())
|
221
|
218
|
{
|
222
|
219
|
var buffer = new QBuffer(query.value(0));
|
223
|
|
- var input = new XMLInput(buffer, 1);
|
224
|
|
- var graph = findChildObject(navigationwindow.loggingWindow, 'graph');
|
225
|
|
- var log = findChildObject(navigationwindow.loggingWindow, 'log');
|
226
|
|
- input.newTemperatureColumn.connect(function(col, text) {
|
227
|
|
- log.setHeaderData(col, text);
|
228
|
|
- if(text == navigationwindow.loggingWindow.targetcolumnname)
|
229
|
|
- {
|
230
|
|
- targetseries = col;
|
231
|
|
- }
|
232
|
|
- });
|
233
|
|
- input.newAnnotationColumn.connect(log.setHeaderData);
|
234
|
|
- input.measure.connect(graph.newMeasurement);
|
235
|
|
- input.measure.connect(log.newMeasurement);
|
236
|
|
- input.measure.connect(function(data, series) {
|
237
|
|
- if(series == targetseries) {
|
238
|
|
- targetDetector.newMeasurement(data);
|
239
|
|
- }
|
240
|
|
- });
|
241
|
|
- input.annotation.connect(log.newAnnotation);
|
242
|
|
- input.lastColumn.connect(function(c) {
|
243
|
|
- lc = c;
|
244
|
|
- QSettings.setValue("liveColumn", c+1);
|
245
|
|
- navigationwindow.loggingWindow.postLoadColumnSetup(c);
|
246
|
|
- });
|
247
|
|
- log.updatesEnabled = false;
|
248
|
|
- graph.updatesEnabled = false;
|
249
|
|
- input.input();
|
250
|
|
- graph.updatesEnabled = true;
|
251
|
|
- log.updatesEnabled = true;
|
252
|
|
- log.newAnnotation(TTR("sampleRoastingBatch", "End"), 1, lc);
|
|
220
|
+ Windows.loggingWindow.loadPlan(buffer, name.text);
|
253
|
221
|
}
|
254
|
222
|
}
|
255
|
|
- navigationwindow.loggingWindow.raise();
|
256
|
|
- navigationwindow.loggingWindow.activateWindow();
|
257
|
|
- query = query.invalidate();
|
258
|
|
- var t = TTR("sampleRoastingBatch", "Typica - Sample Roasting: [*]") + name.text;
|
259
|
|
- if(profileName.currentText != '')
|
|
223
|
+ else
|
260
|
224
|
{
|
261
|
|
- t = t + ", " + profileName.currentText;
|
|
225
|
+ Windows.loggingWindow.clearLog();
|
|
226
|
+ Windows.loggingWindow.windowTitle = 'Typica - [*]' + name.text;
|
|
227
|
+ Windows.loggingWindow.raise();
|
|
228
|
+ Windows.loggingWindow.activateWindow();
|
262
|
229
|
}
|
263
|
|
- navigationwindow.loggingWindow.windowTitle = t;
|
|
230
|
+ query = query.invalidate();
|
264
|
231
|
};
|
265
|
232
|
var notes = findChildObject(this, 'annotation');
|
266
|
233
|
var machine = findChildObject(this, 'machine');
|