Skip to content

Commit dcd5107

Browse files
committed
Merge branch 'production' of https://github.com/hisashin/NinjaPCR-web into production
2 parents 82fc1ea + a56c017 commit dcd5107

28 files changed

+722
-695
lines changed

ios/NinjaPCR_console/console/js/chromeSerial.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Serial.prototype.requestStatus = function (callback) {
149149
var self = this;
150150
var connectionId = self.connectionId;
151151
var data = getFullCommand("", STATUS_REQ);
152-
console.verbose("Request status... connectionId=" + connectionId);
152+
console.log("Request status... connectionId=" + connectionId);
153153
chrome.serial.send(connectionId, data, function (sendInfo) {
154154
if (sendInfo.error) {
155155
console.log("sendInfo=" + sendInfo.error);

ios/NinjaPCR_console/console/js/chromeUtil.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
var chromeUtil = {
22
};
33
chromeUtil.getOS = function () {
4-
console.verbose("getOS OS=" + navigator.appVersion);
4+
console.log("getOS OS=" + navigator.appVersion);
55
return navigator.appVersion;
66
};
77
chromeUtil.alert = function (message) {
8-
console.verbose("Alert " + message);
8+
console.log("Alert " + message);
99
if (!chromeUtil.alertDialogInit) {
1010
chromeUtil.alertDialogInit = true;
1111
$('#alert_dialog').dialog({
@@ -71,7 +71,7 @@ chromeUtil.alertUpdate = function (currentVersion, latestVersion) {
7171
var message = getLocalizedMessage('firmwareUpdateAvailable')
7272
.replace("___LATEST_VERSION___", latestVersion)
7373
.replace("___INSTALLED_VERSION___", currentVersion);
74-
console.verbose(message);
74+
console.log(message);
7575
}
7676

7777
var Storage = function () {
@@ -84,20 +84,20 @@ var STORAGE_KEY_EXPERIMENT_LIST = "experimentList";
8484
var STORAGE_KEY_EXPERIMENT_PREFIX = "pcr_";
8585

8686
Storage.prototype.loadList = function (callback) {
87-
console.verbose("Storage.prototype.loadList");
87+
console.log("Storage.prototype.loadList");
8888
var self = this;
8989
chrome.storage.sync.get(STORAGE_KEY_EXPERIMENT_LIST, function (data) {
90-
console.verbose("Load done. data=" + data);
90+
console.log("Load done. data=" + data);
9191
if (data[STORAGE_KEY_EXPERIMENT_LIST])
9292
self.experiments = JSON.parse(data[STORAGE_KEY_EXPERIMENT_LIST]);
9393
else
9494
self.experiments = [];
9595
if (self.experiments && self.experiments.length>0) {
96-
console.verbose("Storage.loadList Experiment List Found.");
96+
console.log("Storage.loadList Experiment List Found.");
9797
callback(self.experiments);
9898
} else {
9999
//Empty
100-
console.verbose("Empty. Add default experiment and save.");
100+
console.log("Empty. Add default experiment and save.");
101101
self.insertDefaultExperiment(callback);
102102
}
103103
});
@@ -114,7 +114,7 @@ Storage.prototype.loadExperiment = function (experimentId, callback) {
114114
var self = this;
115115
chrome.storage.sync.get(key, function(data){
116116
var dataStr = data[key];
117-
console.verbose("Data str=" + dataStr);
117+
console.log("Data str=" + dataStr);
118118
var experiment = null;
119119

120120
if (dataStr!=null) {
@@ -131,9 +131,9 @@ Storage.prototype.loadExperiment = function (experimentId, callback) {
131131

132132
};
133133
Storage.prototype.clearAllData = function () {
134-
console.verbose("clearAllData");
134+
console.log("clearAllData");
135135
chrome.storage.sync.clear (function(){
136-
console.verbose("Done.");
136+
console.log("Done.");
137137
});
138138
};
139139
Storage.prototype.generateId = function () {
@@ -148,15 +148,15 @@ Storage.prototype.updateCurrentExperiment = function (name, newData, callback) {
148148
for (var i=0; i<this.experiments.length; i++) {
149149
var experiment = this.experiments[i];
150150
if (experiment.id==id) {
151-
console.verbose("Old name=" + experiment.name);
151+
console.log("Old name=" + experiment.name);
152152
this.experiments[i].name = name;
153153
}
154154
}
155155
var storageObj = {};
156156
storageObj[STORAGE_KEY_EXPERIMENT_LIST] = JSON.stringify(this.experiments, null, '');
157157
var self = this;
158158
chrome.storage.sync.set(storageObj, function() {
159-
console.verbose('Experiment "'+name+'" saved');
159+
console.log('Experiment "'+name+'" saved');
160160
var detailStorageObj = {};
161161
detailStorageObj[key] = JSON.stringify(newData, null, '');
162162
chrome.storage.sync.set(detailStorageObj, function() {
@@ -168,12 +168,12 @@ Storage.prototype.updateCurrentExperiment = function (name, newData, callback) {
168168
});
169169
};
170170
Storage.prototype.deleteCurrentExperiment = function (callback) {
171-
console.verbose("deleteCurrentExperiment " + this.currentExperimentId);
171+
console.log("deleteCurrentExperiment " + this.currentExperimentId);
172172

173173
for (var i=0; i<this.experiments.length; i++) {
174174
var experiment = this.experiments[i];
175175
if (experiment.id==this.currentExperimentId) {
176-
console.verbose("Remove " + i);
176+
console.log("Remove " + i);
177177
this.experiments.splice(i, 1);
178178
break;
179179
}
@@ -182,11 +182,11 @@ Storage.prototype.deleteCurrentExperiment = function (callback) {
182182
storageObj[STORAGE_KEY_EXPERIMENT_LIST] = JSON.stringify(this.experiments, null, '');
183183
var self = this;
184184
chrome.storage.sync.set(storageObj, function() {
185-
console.verbose('List saved.');
185+
console.log('List saved.');
186186
var detailStorageObj = {};
187187
var key = self.getKeyForId(self.currentExperimentId);
188188
chrome.storage.sync.remove(key, function() {
189-
console.verbose('Detail data removed.');
189+
console.log('Detail data removed.');
190190
callback();
191191
});
192192
});
@@ -202,7 +202,7 @@ Storage.prototype.insertExperiment = function (name, experiment, callback) {
202202
storageObj[STORAGE_KEY_EXPERIMENT_LIST] = JSON.stringify(this.experiments, null, '');
203203
var self = this;
204204
chrome.storage.sync.set(storageObj, function() {
205-
console.verbose('Experiment "'+name+'" saved');
205+
console.log('Experiment "'+name+'" saved');
206206
var detailStorageObj = {};
207207
var key = self.getKeyForId(id);
208208
detailStorageObj[key] = JSON.stringify(experiment, null, '');
@@ -215,7 +215,7 @@ Storage.prototype.insertExperiment = function (name, experiment, callback) {
215215
});
216216
};
217217
Storage.prototype.updateExperiment = function (experiment) {
218-
console.verbose("Storage#updateExperiment");
218+
console.log("Storage#updateExperiment");
219219
};
220220

221221
Storage.prototype.getLogFileName = function () {

ios/NinjaPCR_console/console/js/form.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ var ProfileForm = function () {
225225
}, {
226226
key: 'save',
227227
value: function save(name, isNew, callback) {
228-
console.verbose("save " + name + ", isNew=" + isNew); // grab the current experiment and update window.experiment
228+
console.log("save " + name + ", isNew=" + isNew); // grab the current experiment and update window.experiment
229229

230230
var pcrProgram = this.writeoutExperiment();
231231
console.log("pcrProgram=" + pcrProgram); // update the name of the experiment
@@ -234,7 +234,7 @@ var ProfileForm = function () {
234234

235235
if (isNew) {
236236
pcrStorage.insertExperiment(name, pcrProgram, function (result) {
237-
console.verbose("result=" + result);
237+
console.log("result=" + result);
238238

239239
if (callback) {
240240
callback();
@@ -248,7 +248,7 @@ var ProfileForm = function () {
248248
});
249249
} else {
250250
pcrStorage.updateCurrentExperiment(name, pcrProgram, function (result) {
251-
console.verbose("result=" + result);
251+
console.log("result=" + result);
252252

253253
if (callback) {
254254
callback();
@@ -589,7 +589,7 @@ var ProfileForm = function () {
589589
*/
590590

591591
$('.deleteStepButton').on('click', function () {
592-
console.verbose("deleteStepButton");
592+
console.log("deleteStepButton");
593593
$(this).parent().slideUp('slow', function () {
594594
// after animation is complete, remove parent step
595595
$(this).remove(); //// if the length is now 0, hide the whole div
@@ -606,7 +606,7 @@ var ProfileForm = function () {
606606
*/
607607

608608
$('.deleteStepButton').on('click', function () {
609-
console.verbose("deleteStepButton");
609+
console.log("deleteStepButton");
610610
$(this).parent().slideUp('slow', function () {
611611
// after animation is complete, remove parent step
612612
$(this).remove(); //// if the length is now 0, hide the whole div

ios/NinjaPCR_console/console/js/logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ console.log = function(msg) {
4747
Log.showInDebugArea("L", msg);
4848
4949
};
50-
console.verbose = function(msg) {
50+
console.log = function(msg) {
5151
console.log_orig(msg);
5252
Log.showInDebugArea("V", msg);
5353

ios/NinjaPCR_console/console/js/openpcr.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
var FIRMWARE_VERSION_CURRENT = "0.0.0";
16-
var FIRMWARE_VERSION_LATEST = "1.0.5";
16+
var FIRMWARE_VERSION_LATEST = "1.2.2";
1717
var FIRMWARE_VERSION_REQUIRED = "1.0.5";
1818
var CURRENT_UI_VERSION = "1.1";
1919
var MIN_FINAL_HOLD_TEMP = 16;
@@ -178,7 +178,7 @@ function listSubmit() {
178178
* loads the experiment with the given experimentID
179179
*/
180180
function loadExperiment(experimentID) {
181-
console.verbose("loadExperiment id=" + experimentID);
181+
console.log("loadExperiment id=" + experimentID);
182182
pcrStorage.loadExperiment(experimentID, function(experiment) {
183183
// Now we've made all the modifications needed, display the Form page
184184

@@ -321,38 +321,38 @@ function startPCR() {
321321
// command id can't be 0
322322
// where is OpenPCR
323323
var devicePort = communicator.port;
324-
console.verbose("devicePort=" + devicePort);
324+
console.log("devicePort=" + devicePort);
325325

326326
pcrProgram = profileForm.writeoutExperiment();
327327
var encodedProgram = programToDeviceCommand (pcrProgram);
328328
// verify that there are no more than 16 top level steps
329-
console.verbose(pcrProgram.steps.length + " : top level steps");
330-
console.verbose(window.lessthan20steps + " : cycle level steps");
329+
console.log(pcrProgram.steps.length + " : top level steps");
330+
console.log(window.lessthan20steps + " : cycle level steps");
331331
var totalSteps = window.lessthan20steps + pcrProgram.steps.length;
332332

333333
// check that the entire protocol isn't >252 bytes
334-
console.verbose("encodedProgram=" + encodedProgram);
334+
console.log("encodedProgram=" + encodedProgram);
335335
if (encodedProgram.length > 512) {
336336
chromeUtil.alert(getLocalizedMessage('lengthLimit').replace('___LENGTH___', encodedProgram.length));
337337
return 0;
338338
}
339339

340340
// verify the cycle step has no more than 16 steps
341341
else if (window.lessthan20steps > 16) {
342-
console.verbose(encodedProgram);
342+
console.log(encodedProgram);
343343
chromeUtil.alert(getLocalizedMessage('stepLimit').replace('___STEPS___',window.lessthan20steps));
344344
return 0;
345345
}
346346

347347
// and check that the total overall is less than 25
348348
else if (totalSteps > 25) {
349-
console.verbose(encodedProgram);
349+
console.log(encodedProgram);
350350
chromeUtil.alert(getLocalizedMessage('totalStepLimit').replace('___STEPS___',totalSteps));
351351
return 0;
352352
}
353353

354354
//debug
355-
console.verbose(encodedProgram);
355+
console.log(encodedProgram);
356356

357357
// go to the Running dashboard
358358
showRunningDashboard();
@@ -502,7 +502,7 @@ function stopPCR() {
502502
// increment the window.command id and send the new command to the device
503503
window.command_id++;
504504
stopCommand += '&d=' + window.command_id;
505-
console.verbose(stopCommand);
505+
console.log(stopCommand);
506506
// Send out the STOP command
507507
communicator.sendStopCommand(stopCommand, function() {
508508
onStopPCR();
@@ -729,7 +729,7 @@ $(function() {
729729
+ '&d=' + command_id;
730730

731731
// trace it
732-
console.verbose("string: " + contrast_string);
732+
console.log("string: " + contrast_string);
733733

734734
// Write out the command to CONTROL.TXT
735735
// name of the output file
@@ -755,7 +755,7 @@ $(function() {
755755
contrast_string = 's=ACGTC&c=cfg&o=' + contrast
756756
+ '&d=' + command_id;
757757
// trace it
758-
console.verbose("string: " + contrast_string);
758+
console.log("string: " + contrast_string);
759759
// Write out the command to CONTROL.TXT
760760
// name of the output file
761761
if (window.path != null) {

ios/NinjaPCR_console/console/js/serialPortScanner.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,3 @@ SerialPortScanner.prototype._read = function (data) {
116116
}
117117
}
118118
};
119-
console.log("_read 2");

0 commit comments

Comments
 (0)