Merged changes from work script into JKMM100, works on device in both work script and deployment one
This commit is contained in:
parent
c1da7b53a2
commit
3f58bbc617
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.8.91",
|
"version": "1.8.92",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.8.91",
|
"version": "1.8.92",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.8.91",
|
"version": "1.8.92",
|
||||||
"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.91",
|
"version": "1.8.92",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
|
@ -51,6 +51,7 @@ const int PROJECTOR_FRAME = 600;
|
||||||
const int PROJECTOR_MICROSWITCH_CLOSED = 0;
|
const int PROJECTOR_MICROSWITCH_CLOSED = 0;
|
||||||
const int PROJECTOR_MICROSWITCH_OPENED = 1;
|
const int PROJECTOR_MICROSWITCH_OPENED = 1;
|
||||||
const int PROJECTOR_HALF_TIME = 450;
|
const int PROJECTOR_HALF_TIME = 450;
|
||||||
|
const int PROJECTOR_STOP_DELAY = 3;
|
||||||
|
|
||||||
//PROJECTOR VARIABLES
|
//PROJECTOR VARIABLES
|
||||||
boolean proj_dir = true;
|
boolean proj_dir = true;
|
||||||
|
@ -126,17 +127,34 @@ void proj_start () {
|
||||||
|
|
||||||
void proj_stop () {
|
void proj_stop () {
|
||||||
//stop both directions
|
//stop both directions
|
||||||
delay(10);
|
delay(2);
|
||||||
digitalWrite(PROJECTOR_FWD, LOW);
|
digitalWrite(PROJECTOR_FWD, LOW);
|
||||||
digitalWrite(PROJECTOR_BWD, LOW);
|
digitalWrite(PROJECTOR_BWD, LOW);
|
||||||
digitalWrite(LED_FWD, LOW);
|
digitalWrite(LED_FWD, LOW);
|
||||||
digitalWrite(LED_BWD, LOW);
|
digitalWrite(LED_BWD, LOW);
|
||||||
|
if (digitalRead(PROJECTOR_MICROSWITCH) == PROJECTOR_MICROSWITCH_CLOSED) {
|
||||||
|
if (proj_dir) {
|
||||||
|
while (digitalRead(PROJECTOR_MICROSWITCH) == PROJECTOR_MICROSWITCH_CLOSED) {
|
||||||
|
digitalWrite(PROJECTOR_BWD, HIGH);
|
||||||
|
delay(PROJECTOR_STOP_DELAY);
|
||||||
|
}
|
||||||
|
digitalWrite(PROJECTOR_BWD, LOW);
|
||||||
|
} else {
|
||||||
|
while (digitalRead(PROJECTOR_MICROSWITCH) == PROJECTOR_MICROSWITCH_CLOSED) {
|
||||||
|
digitalWrite(PROJECTOR_FWD, HIGH);
|
||||||
|
delay(PROJECTOR_STOP_DELAY);
|
||||||
|
}
|
||||||
|
digitalWrite(PROJECTOR_FWD, LOW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mc.confirm(mc.PROJECTOR);
|
mc.confirm(mc.PROJECTOR);
|
||||||
mc.log("projector()");
|
mc.log("projector()");
|
||||||
proj_running = false;
|
proj_running = false;
|
||||||
|
|
||||||
|
delay(16);
|
||||||
update_timing(millis() - proj_time);
|
update_timing(millis() - proj_time);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void proj_direction (boolean state) {
|
void proj_direction (boolean state) {
|
||||||
|
@ -171,7 +189,7 @@ void proj_microswitch () {
|
||||||
proj_micro_state = val; //unneeded?
|
proj_micro_state = val; //unneeded?
|
||||||
proj_stop();
|
proj_stop();
|
||||||
} else {
|
} else {
|
||||||
//delay(2); //some smothing value
|
delay(2); //some smothing value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ const int PROJECTOR_FRAME = 600;
|
||||||
const int PROJECTOR_MICROSWITCH_CLOSED = 0;
|
const int PROJECTOR_MICROSWITCH_CLOSED = 0;
|
||||||
const int PROJECTOR_MICROSWITCH_OPENED = 1;
|
const int PROJECTOR_MICROSWITCH_OPENED = 1;
|
||||||
const int PROJECTOR_HALF_TIME = 450;
|
const int PROJECTOR_HALF_TIME = 450;
|
||||||
const int PROJECTOR_STOP_DELAY = 1;
|
const int PROJECTOR_STOP_DELAY = 3;
|
||||||
|
|
||||||
//PROJECTOR VARIABLES
|
//PROJECTOR VARIABLES
|
||||||
boolean proj_dir = true;
|
boolean proj_dir = true;
|
||||||
|
@ -127,7 +127,7 @@ void proj_start () {
|
||||||
|
|
||||||
void proj_stop () {
|
void proj_stop () {
|
||||||
//stop both directions
|
//stop both directions
|
||||||
//delay(10);
|
delay(2);
|
||||||
digitalWrite(PROJECTOR_FWD, LOW);
|
digitalWrite(PROJECTOR_FWD, LOW);
|
||||||
digitalWrite(PROJECTOR_BWD, LOW);
|
digitalWrite(PROJECTOR_BWD, LOW);
|
||||||
digitalWrite(LED_FWD, LOW);
|
digitalWrite(LED_FWD, LOW);
|
||||||
|
@ -194,7 +194,7 @@ void proj_microswitch () {
|
||||||
proj_micro_state = val; //unneeded?
|
proj_micro_state = val; //unneeded?
|
||||||
proj_stop();
|
proj_stop();
|
||||||
} else {
|
} else {
|
||||||
//delay(1); //some smothing value
|
delay(2); //some smothing value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.91",
|
"version": "1.8.92",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mcopy",
|
"name": "mcopy",
|
||||||
"version": "1.8.91",
|
"version": "1.8.92",
|
||||||
"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.91",
|
"version": "1.8.92",
|
||||||
"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.91",
|
"version": "1.8.92",
|
||||||
"ext_port": 1111,
|
"ext_port": 1111,
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"mcopy": {
|
"mcopy": {
|
||||||
|
|
Loading…
Reference in New Issue