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,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy-app",
|
||||
"version": "1.8.91",
|
||||
"version": "1.8.92",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy-app",
|
||||
"version": "1.8.91",
|
||||
"version": "1.8.92",
|
||||
"description": "GUI for the mcopy small gauge film optical printer platform",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.91",
|
||||
"version": "1.8.92",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -51,6 +51,7 @@ const int PROJECTOR_FRAME = 600;
|
|||
const int PROJECTOR_MICROSWITCH_CLOSED = 0;
|
||||
const int PROJECTOR_MICROSWITCH_OPENED = 1;
|
||||
const int PROJECTOR_HALF_TIME = 450;
|
||||
const int PROJECTOR_STOP_DELAY = 3;
|
||||
|
||||
//PROJECTOR VARIABLES
|
||||
boolean proj_dir = true;
|
||||
|
@ -126,17 +127,34 @@ void proj_start () {
|
|||
|
||||
void proj_stop () {
|
||||
//stop both directions
|
||||
delay(10);
|
||||
delay(2);
|
||||
digitalWrite(PROJECTOR_FWD, LOW);
|
||||
digitalWrite(PROJECTOR_BWD, LOW);
|
||||
digitalWrite(LED_FWD, 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.log("projector()");
|
||||
proj_running = false;
|
||||
|
||||
delay(16);
|
||||
update_timing(millis() - proj_time);
|
||||
|
||||
}
|
||||
|
||||
void proj_direction (boolean state) {
|
||||
|
@ -171,7 +189,7 @@ void proj_microswitch () {
|
|||
proj_micro_state = val; //unneeded?
|
||||
proj_stop();
|
||||
} 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_OPENED = 1;
|
||||
const int PROJECTOR_HALF_TIME = 450;
|
||||
const int PROJECTOR_STOP_DELAY = 1;
|
||||
const int PROJECTOR_STOP_DELAY = 3;
|
||||
|
||||
//PROJECTOR VARIABLES
|
||||
boolean proj_dir = true;
|
||||
|
@ -127,7 +127,7 @@ void proj_start () {
|
|||
|
||||
void proj_stop () {
|
||||
//stop both directions
|
||||
//delay(10);
|
||||
delay(2);
|
||||
digitalWrite(PROJECTOR_FWD, LOW);
|
||||
digitalWrite(PROJECTOR_BWD, LOW);
|
||||
digitalWrite(LED_FWD, LOW);
|
||||
|
@ -194,7 +194,7 @@ void proj_microswitch () {
|
|||
proj_micro_state = val; //unneeded?
|
||||
proj_stop();
|
||||
} else {
|
||||
//delay(1); //some smothing value
|
||||
delay(2); //some smothing value
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "mcopy",
|
||||
"version": "1.8.91",
|
||||
"version": "1.8.92",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mcopy",
|
||||
"version": "1.8.91",
|
||||
"version": "1.8.92",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"arduino": "file:app/lib/arduino",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy",
|
||||
"version": "1.8.91",
|
||||
"version": "1.8.92",
|
||||
"description": "Small gauge film optical printer platform",
|
||||
"main": "build.js",
|
||||
"directories": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.91",
|
||||
"version": "1.8.92",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
Loading…
Reference in New Issue