Skip to content

Commit

Permalink
draft(blocks): added todos for future blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinepringalle committed Jul 6, 2021
1 parent 3d4d4d5 commit 12021d3
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions scratch_vm_files/scratch3_poppy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class Scratch3Poppy {
arguments: {
TEXT: {
type: ArgumentType.STRING,
defaultValue: ' '
defaultValue: 'My custom alert'
}
}
}
Expand Down Expand Up @@ -494,14 +494,10 @@ class Scratch3Poppy {
}


// TODO: (Antoine) Implement QR code reader
detectMarker(args) {
let argText = args.TEXT.toString();
let url = this._robotUrl + '/detect/' + argText;
axios.get(url)
.then(resp => resp.data)
.catch(() => {
return 'Error with the connection';
});
return "Block is not implemented yet."
}

/**
Expand Down Expand Up @@ -679,7 +675,10 @@ class Scratch3Poppy {
}
}

// Todo : popup
/**
* Gives a custom alert to the user
* @param args custom message is stored in args.TEXT
*/
popup(args) {
let argText = args.TEXT.toString();
return alert(argText);
Expand Down Expand Up @@ -782,14 +781,10 @@ class Scratch3Poppy {
}
}


// Todo : initRobot
initRobot(args) {
let argText = args.TEXT.toString();
let url = 'http://poppy.local/api/' + argText;
axios.get(url)
.catch(() => {
return 'Error with parameter.';
});
return 'Block not implemented yet';
}

deleteRecord(args) {
Expand Down

0 comments on commit 12021d3

Please sign in to comment.