Skip to content

Commit

Permalink
Merge pull request #62 from miamirkovic/master
Browse files Browse the repository at this point in the history
  • Loading branch information
miamirkovic authored Feb 11, 2018
2 parents 8ec6ba1 + 69e9c04 commit 3f7c393
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions client/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,12 @@ Template.controls.events({
},

'click #record_button'() {
recording = true;
var c_n = startLog();

},

'submit #readings_to_file'(event, template) {
var filename = template.find('#readings_to_file').value;
endLog(filename, c_n);
recording = false;
}
});

Expand Down
3 changes: 2 additions & 1 deletion client/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var writer = csvWriter({sendHeaders: true});
var recording;

var startLog = function() {
recording = true;
//create text node of writable stram of data readings
var content = new Buffer();
writer.pipe(content);
Expand Down Expand Up @@ -46,7 +47,7 @@ var startLog = function() {
};

var endLog = function(filename, c_n_tuple) {

recording = false;
//SOURCE: https://github.com/mholt/PapaParse/issues/175
var blob = new Blob(c_n_tuple[0]);
document.page.removeChild(c_n_tuple[1]);
Expand Down

0 comments on commit 3f7c393

Please sign in to comment.