Compare commits

..

No commits in common. "f707dedc911c96a7d2fa425850ddfad65150d4b6" and "99b63150ac98193719d6997096dc86fd0173b094" have entirely different histories.

9 changed files with 24 additions and 33 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "1.8.56", "version": "1.8.54",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

2
app/package-lock.json generated
View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "mcopy-app", "name": "mcopy-app",
"version": "1.8.56", "version": "1.8.54",
"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": {

View File

@ -1,5 +1,5 @@
{ {
"version": "1.8.56", "version": "1.8.54",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

View File

@ -43,16 +43,16 @@ class McopyProjector {
int64_t _posTakeup = 0; int64_t _posTakeup = 0;
int64_t _posFeed = 0; int64_t _posFeed = 0;
//Y //X
uint8_t _takeupSettingA; uint8_t _takeupSettingA;
uint8_t _takeupSettingB; uint8_t _takeupSettingB;
//X //Y
uint8_t _feedSettingA; uint8_t _feedSettingA;
uint8_t _feedSettingB; uint8_t _feedSettingB;
//Y //X
uint8_t _takeupEmitter; uint8_t _takeupEmitter;
uint8_t _takeupReceiver; uint8_t _takeupReceiver;
//X //Y
uint8_t _feedEmitter; uint8_t _feedEmitter;
uint8_t _feedReceiver; uint8_t _feedReceiver;

View File

@ -107,26 +107,13 @@ void home () {
uint16_t eighth = quarter / 2; uint16_t eighth = quarter / 2;
uint16_t takeupPeak = 0; uint16_t takeupPeak = 0;
uint16_t feedPeak = 0; uint16_t feedPeak = 0;
int16_t takeupOffset = 0; uint16_t takeupOffset = 0;
int16_t feedOffset = 0; uint16_t feedOffset = 0;
long takeupReading = 0.0; long takeupReading = 0.0;
long feedReading = 0.0; long feedReading = 0.0;
Serial.println("home()"); Serial.println("home()");
takeupReading = analogReadAccurateAverage(TAKEUP_RECEIVER);
feedReading = analogReadAccurateAverage(FEED_RECEIVER);
if (takeupReading > 2) {
_takeup.move(-25);
_takeup.runToPosition();
}
if (feedReading > 2) {
_feed.move(-25);
_feed.runToPosition();
}
delay(10); delay(10);
for (uint16_t i = 0; i < steps; i++) { for (uint16_t i = 0; i < steps; i++) {
@ -166,13 +153,17 @@ void home () {
Serial.println(feedOffset); Serial.println(feedOffset);
if (takeupOffset > 0) { if (takeupOffset > 0) {
_takeup.move(takeupOffset < steps/2 ? -takeupOffset : steps - takeupOffset); for (uint16_t i = 0; i < takeupOffset; i++) {
_takeup.move(-1);
_takeup.runToPosition(); _takeup.runToPosition();
} }
}
if (feedOffset > 0) { if (feedOffset > 0) {
_feed.move(feedOffset < steps/2 ? -feedOffset : steps - feedOffset); for (uint16_t i = 0; i < feedOffset; i++) {
_feed.move(-1);
_feed.runToPosition(); _feed.runToPosition();
} }
}
/* /*
for (uint16_t i = 0; i < eighth; i++) { for (uint16_t i = 0; i < eighth; i++) {
_takeup.move(-1); _takeup.move(-1);

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "mcopy", "name": "mcopy",
"version": "1.8.56", "version": "1.8.54",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "mcopy", "name": "mcopy",
"version": "1.8.56", "version": "1.8.54",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"arduino": "file:app/lib/arduino", "arduino": "file:app/lib/arduino",

View File

@ -1,6 +1,6 @@
{ {
"name": "mcopy", "name": "mcopy",
"version": "1.8.56", "version": "1.8.54",
"description": "Small gauge film optical printer platform", "description": "Small gauge film optical printer platform",
"main": "build.js", "main": "build.js",
"directories": { "directories": {

View File

@ -1,5 +1,5 @@
{ {
"version": "1.8.56", "version": "1.8.54",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {