Fix for case where this.confirmExec is not a function
This commit is contained in:
parent
754ef17b74
commit
08ce0d792b
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.45",
|
||||
"version": "1.8.46",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -372,7 +372,7 @@ class Arduino {
|
|||
* @param {string} data - The data received from the Arduino.
|
||||
**/
|
||||
confirmEnd(data) {
|
||||
if (this.values.indexOf(data) !== -1) {
|
||||
if (this.values.indexOf(data) !== -1 && typeof this.confirmExec === 'function') {
|
||||
this.confirmExec(null, data);
|
||||
this.confirmExec = {};
|
||||
this.unlock(this.alias['connect']);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy-app",
|
||||
"version": "1.8.45",
|
||||
"version": "1.8.46",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy-app",
|
||||
"version": "1.8.45",
|
||||
"version": "1.8.46",
|
||||
"description": "GUI for the mcopy small gauge film optical printer platform",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.45",
|
||||
"version": "1.8.46",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#include <Servo.h>
|
||||
|
||||
Servo servo;
|
||||
int pos;
|
||||
|
||||
void setup() {
|
||||
servo.attach(9); // attaches the servo on pin 9 to the servo object
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
servo.write(90);
|
||||
delay(1000);
|
||||
//servo.write(60);
|
||||
//delay(2000);
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "mcopy",
|
||||
"version": "1.8.45",
|
||||
"version": "1.8.46",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mcopy",
|
||||
"version": "1.8.45",
|
||||
"version": "1.8.46",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"arduino": "file:app/lib/arduino",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy",
|
||||
"version": "1.8.45",
|
||||
"version": "1.8.46",
|
||||
"description": "Small gauge film optical printer platform",
|
||||
"main": "build.js",
|
||||
"directories": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.45",
|
||||
"version": "1.8.46",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -388,7 +388,7 @@ class Arduino {
|
|||
* @param {string} data - The data received from the Arduino.
|
||||
**/
|
||||
private confirmEnd (data : string) {
|
||||
if (this.values.indexOf(data) !== -1) {
|
||||
if (this.values.indexOf(data) !== -1 && typeof this.confirmExec === 'function') {
|
||||
this.confirmExec(null, data)
|
||||
this.confirmExec = {}
|
||||
this.unlock(this.alias['connect'])
|
||||
|
|
Loading…
Reference in New Issue