Compare commits
2 Commits
99b63150ac
...
f707dedc91
Author | SHA1 | Date |
---|---|---|
Matt McWilliams | f707dedc91 | |
Matt McWilliams | 702fc4680d |
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.54",
|
||||
"version": "1.8.56",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy-app",
|
||||
"version": "1.8.54",
|
||||
"version": "1.8.56",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy-app",
|
||||
"version": "1.8.54",
|
||||
"version": "1.8.56",
|
||||
"description": "GUI for the mcopy small gauge film optical printer platform",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.54",
|
||||
"version": "1.8.56",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -43,16 +43,16 @@ class McopyProjector {
|
|||
|
||||
int64_t _posTakeup = 0;
|
||||
int64_t _posFeed = 0;
|
||||
//X
|
||||
//Y
|
||||
uint8_t _takeupSettingA;
|
||||
uint8_t _takeupSettingB;
|
||||
//Y
|
||||
//X
|
||||
uint8_t _feedSettingA;
|
||||
uint8_t _feedSettingB;
|
||||
//X
|
||||
//Y
|
||||
uint8_t _takeupEmitter;
|
||||
uint8_t _takeupReceiver;
|
||||
//Y
|
||||
//X
|
||||
uint8_t _feedEmitter;
|
||||
uint8_t _feedReceiver;
|
||||
|
||||
|
|
|
@ -107,13 +107,26 @@ void home () {
|
|||
uint16_t eighth = quarter / 2;
|
||||
uint16_t takeupPeak = 0;
|
||||
uint16_t feedPeak = 0;
|
||||
uint16_t takeupOffset = 0;
|
||||
uint16_t feedOffset = 0;
|
||||
int16_t takeupOffset = 0;
|
||||
int16_t feedOffset = 0;
|
||||
long takeupReading = 0.0;
|
||||
long feedReading = 0.0;
|
||||
|
||||
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);
|
||||
|
||||
for (uint16_t i = 0; i < steps; i++) {
|
||||
|
@ -153,17 +166,13 @@ void home () {
|
|||
Serial.println(feedOffset);
|
||||
|
||||
if (takeupOffset > 0) {
|
||||
for (uint16_t i = 0; i < takeupOffset; i++) {
|
||||
_takeup.move(-1);
|
||||
_takeup.move(takeupOffset < steps/2 ? -takeupOffset : steps - takeupOffset);
|
||||
_takeup.runToPosition();
|
||||
}
|
||||
}
|
||||
if (feedOffset > 0) {
|
||||
for (uint16_t i = 0; i < feedOffset; i++) {
|
||||
_feed.move(-1);
|
||||
_feed.move(feedOffset < steps/2 ? -feedOffset : steps - feedOffset);
|
||||
_feed.runToPosition();
|
||||
}
|
||||
}
|
||||
/*
|
||||
for (uint16_t i = 0; i < eighth; i++) {
|
||||
_takeup.move(-1);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "mcopy",
|
||||
"version": "1.8.54",
|
||||
"version": "1.8.56",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mcopy",
|
||||
"version": "1.8.54",
|
||||
"version": "1.8.56",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"arduino": "file:app/lib/arduino",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy",
|
||||
"version": "1.8.54",
|
||||
"version": "1.8.56",
|
||||
"description": "Small gauge film optical printer platform",
|
||||
"main": "build.js",
|
||||
"directories": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.54",
|
||||
"version": "1.8.56",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
Loading…
Reference in New Issue