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,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -372,7 +372,7 @@ class Arduino {
|
||||||
* @param {string} data - The data received from the Arduino.
|
* @param {string} data - The data received from the Arduino.
|
||||||
**/
|
**/
|
||||||
confirmEnd(data) {
|
confirmEnd(data) {
|
||||||
if (this.values.indexOf(data) !== -1) {
|
if (this.values.indexOf(data) !== -1 && typeof this.confirmExec === 'function') {
|
||||||
this.confirmExec(null, data);
|
this.confirmExec(null, data);
|
||||||
this.confirmExec = {};
|
this.confirmExec = {};
|
||||||
this.unlock(this.alias['connect']);
|
this.unlock(this.alias['connect']);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.8.45",
|
"version": "1.8.46",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.8.45",
|
"version": "1.8.46",
|
||||||
"description": "GUI for the mcopy small gauge film optical printer platform",
|
"description": "GUI for the mcopy small gauge film optical printer platform",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.45",
|
"version": "1.8.46",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"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",
|
"name": "mcopy",
|
||||||
"version": "1.8.45",
|
"version": "1.8.46",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.45",
|
"version": "1.8.46",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"arduino": "file:app/lib/arduino",
|
"arduino": "file:app/lib/arduino",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.45",
|
"version": "1.8.46",
|
||||||
"description": "Small gauge film optical printer platform",
|
"description": "Small gauge film optical printer platform",
|
||||||
"main": "build.js",
|
"main": "build.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.45",
|
"version": "1.8.46",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -388,7 +388,7 @@ class Arduino {
|
||||||
* @param {string} data - The data received from the Arduino.
|
* @param {string} data - The data received from the Arduino.
|
||||||
**/
|
**/
|
||||||
private confirmEnd (data : string) {
|
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(null, data)
|
||||||
this.confirmExec = {}
|
this.confirmExec = {}
|
||||||
this.unlock(this.alias['connect'])
|
this.unlock(this.alias['connect'])
|
||||||
|
|
Loading…
Reference in New Issue