Merged changes from work script into JKMM100, works on device in both work script and deployment one

This commit is contained in:
Matt McWilliams 2024-04-06 15:48:02 -04:00
parent c1da7b53a2
commit 3f58bbc617
9 changed files with 31 additions and 13 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.8.91",
"version": "1.8.92",
"ext_port": 1111,
"profiles": {
"mcopy": {

2
app/package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "mcopy-app",
"version": "1.8.91",
"version": "1.8.92",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -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": {

View File

@ -1,5 +1,5 @@
{
"version": "1.8.91",
"version": "1.8.92",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -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
}
}

View File

@ -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
}
}

4
package-lock.json generated
View File

@ -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",

View File

@ -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": {

View File

@ -1,5 +1,5 @@
{
"version": "1.8.91",
"version": "1.8.92",
"ext_port": 1111,
"profiles": {
"mcopy": {