Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motor position #533

Open
wants to merge 101 commits into
base: Devt
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
3cdace5
Added pin extender support. Made everything compile yet again.
Mar 1, 2022
fe8cde7
Added some test code to first check if the pin extender works. Seems …
Mar 1, 2022
98fece4
Rewrite of I2C extender code.
Mar 2, 2022
292cf08
Fixed a few small bugs. It's not working yet, but getting there...
Mar 2, 2022
04dabfa
Added first I2C extender unit tests
Mar 3, 2022
33ef098
Fixed a few bugs. According to the tests this should pretty much work.
Mar 3, 2022
08c4707
Small fixes
Mar 3, 2022
56b28a4
Fixed unit tests and a few more small bugs.
Mar 4, 2022
cdb1f62
Fixed a few bugs in the pin extender
Mar 4, 2022
5815037
WIP
bdring Apr 16, 2022
476587b
Fixed ISR mess the nasty way. (#273)
atlaste Feb 5, 2022
ab17cdd
Fix VFD Delays (#270)
bdring Feb 5, 2022
4b3a175
Fixed URLs in embedded page, added python build script (#269)
MitchBradley Feb 5, 2022
8257ba8
WIP
bdring Feb 2, 2022
d6d2646
WIP
bdring Feb 3, 2022
0de320f
WIP
bdring Feb 3, 2022
d7c2e05
WIP
bdring Feb 3, 2022
4279bd7
WIP
bdring Feb 3, 2022
d1640d6
WIP
bdring Feb 3, 2022
1b513b2
Cleanup
bdring Feb 4, 2022
0750e65
Cleanup
bdring Feb 6, 2022
86a937c
Fixed folder support in WebUI Tablet tab (#274)
MitchBradley Feb 6, 2022
dbc0387
Cancel pending stepper disable on wake_up (#261)
MitchBradley Feb 6, 2022
66c5708
Move all axes in helical interpolation, fixes #262
MitchBradley Jan 28, 2022
e94638c
Fix #275 - Failed SD open locks SD (#276)
MitchBradley Feb 6, 2022
8b6b5d8
Fixed WebUI hover problem (#277)
MitchBradley Feb 6, 2022
bb63625
Run aborted (#278)
MitchBradley Feb 6, 2022
03a89cc
Yet another thing that needs to be in IRAM (#283)
MitchBradley Feb 8, 2022
7e4436c
Fixed timing-dependent hang with M5 (#282) (#284)
MitchBradley Feb 8, 2022
41136e5
Update Homing.cpp
bdring Feb 7, 2022
e8f00ff
Tablet UI handles 6 axes without jamming up (#290)
MitchBradley Feb 11, 2022
8f25f14
Commented out dead code that was causing Intellisense warnings (#289)
MitchBradley Feb 11, 2022
2538fc2
New $Startup/Show AKA $SS command displays startup messages (#288)
MitchBradley Feb 11, 2022
46b8868
Fixed bug in previous version of index.html.gz with >4 axes (#292)
MitchBradley Feb 11, 2022
2404da8
python3 generic install scripts
easytarget Feb 4, 2022
a684268
permissions as per other installers
easytarget Feb 4, 2022
993f043
check for correct path on older py3 installs
easytarget Feb 4, 2022
47dde12
Document group and other OS considerations
easytarget Feb 4, 2022
8cacae1
add to build script
easytarget Feb 5, 2022
615516e
use pip --user install for esptool.py
easytarget Feb 5, 2022
f56d4fc
esptool from source for python installer
easytarget Feb 7, 2022
affec2e
add the readme for the source package
easytarget Feb 9, 2022
3972f4a
add the esptool source zip to gitignore
easytarget Feb 9, 2022
d7a913d
Esptool version readme filename for reference
easytarget Feb 11, 2022
e811d87
Getting close
MitchBradley Feb 14, 2022
131ac67
Non-windows is now posix
MitchBradley Feb 14, 2022
f1b1bfa
Checked in SecurityFusesOK0.bin
MitchBradley Feb 14, 2022
055733c
Renames and deleted dead directories
MitchBradley Feb 14, 2022
b4df6b2
Limits redux
MitchBradley Feb 12, 2022
da885c9
Do not scale rotary axis report values in report_inches mode
MitchBradley Feb 11, 2022
c2199fc
Fix input conversion of rotary axes too
MitchBradley Feb 12, 2022
4f9de7f
Fixed limits, jogging, and mpos setting
MitchBradley Feb 16, 2022
719a41f
Update CoreXY.cpp
bdring Feb 16, 2022
618403d
Fixed $limits/show cancel time problem
MitchBradley Feb 16, 2022
6fad1f4
Update I2SOPinDetail.cpp
bdring Feb 18, 2022
1591f75
Fix wifi+bt startup crash (#311)
ryba-xek Feb 24, 2022
607c200
Added erase flash and other info to Windows install instructions (#306)
MitchBradley Feb 24, 2022
f62016f
Fix sd reinsert (#313)
MitchBradley Feb 24, 2022
80eb943
Fluid term fix (#307)
MitchBradley Feb 25, 2022
80e0fae
Fixed Feedhold after Soft Limit
MitchBradley Feb 18, 2022
2391b04
WebUI dashboard and tablet file lists conflict - #321 (#323)
MitchBradley Feb 26, 2022
eab6165
Update CoreXY.cpp
bdring Feb 26, 2022
875ab66
Constrain config values - #309 (#326)
MitchBradley Feb 27, 2022
add81a8
Added axes/shared_stepper_reset_pin #309
MitchBradley Feb 27, 2022
2900437
Tablet UI only goes fullscreen on mobile devices
MitchBradley Feb 26, 2022
de774b4
Planner and segment buffers are configurable
MitchBradley Feb 25, 2022
3be79a9
Update MachineConfig.h
bdring Feb 28, 2022
e9ac91d
Added pin extender support. Made everything compile yet again.
Mar 1, 2022
e2fcd5d
Added some test code to first check if the pin extender works. Seems …
Mar 1, 2022
84a9296
Rewrite of I2C extender code.
Mar 2, 2022
2e5f401
Fixed a few small bugs. It's not working yet, but getting there...
Mar 2, 2022
18ff4f0
Added first I2C extender unit tests
Mar 3, 2022
d932cd4
Fixed a few bugs. According to the tests this should pretty much work.
Mar 3, 2022
be1fe14
Small fixes
Mar 3, 2022
ca573e6
Fixed unit tests and a few more small bugs.
Mar 4, 2022
683bdaa
Fixed a few bugs in the pin extender
Mar 4, 2022
f634772
WIP
bdring Apr 16, 2022
107c2e6
Merge branch 'PinExt3' of https://github.com/atlaste/FluidNC into Pin…
Jul 21, 2022
dec4c34
Added pin extender support. Made everything compile yet again.
Mar 1, 2022
255eb39
Added some test code to first check if the pin extender works. Seems …
Mar 1, 2022
774e327
Rewrite of I2C extender code.
Mar 2, 2022
13bee53
Fixed a few small bugs. It's not working yet, but getting there...
Mar 2, 2022
d7487f7
Added first I2C extender unit tests
Mar 3, 2022
b36b5c8
Fixed a few bugs. According to the tests this should pretty much work.
Mar 3, 2022
dff43d2
Small fixes
Mar 3, 2022
bcce698
Fixed unit tests and a few more small bugs.
Mar 4, 2022
07bfcea
Fixed a few bugs in the pin extender
Mar 4, 2022
6c72bfe
WIP
bdring Apr 16, 2022
bcb8295
Fixed ISR mess the nasty way. (#273)
atlaste Feb 5, 2022
5120353
python3 generic install scripts
easytarget Feb 4, 2022
42fb37f
permissions as per other installers
easytarget Feb 4, 2022
3c3bbf5
check for correct path on older py3 installs
easytarget Feb 4, 2022
00a2b14
Document group and other OS considerations
easytarget Feb 4, 2022
2e7aa29
use pip --user install for esptool.py
easytarget Feb 5, 2022
f997fea
add the readme for the source package
easytarget Feb 9, 2022
469ef7b
Checked in SecurityFusesOK0.bin
MitchBradley Feb 14, 2022
29e5dca
Added pin extender support. Made everything compile yet again.
Mar 1, 2022
18d3bd5
Fixed a few conflicts. Should all work again, but untested.
Jul 21, 2022
faccc4b
Fixed error description in I2CBus
Jul 21, 2022
2f1ac3c
Fixed error description.
Jul 21, 2022
fb56fff
Added motor position $MP / $Motors/Position command.
Jul 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
672 changes: 672 additions & 0 deletions CodeCoverage.cov

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion FluidNC/src/ControlPin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ void ControlPin::init() {
_pin.setAttr(attr);
_pin.attachInterrupt(ISRHandler, CHANGE, this);
_rtVariable = false;
_value = _pin.read();
_value = _pin.read();
// Control pins must start in inactive state
if (_value) {
log_error(_legend << " pin is active at startup");
rtAlarm = ExecAlarm::ControlPin;
}
}

String ControlPin::report() {
return get() ? String(_letter) : String("");
}

ControlPin::~ControlPin() {
Expand Down
7 changes: 4 additions & 3 deletions FluidNC/src/ControlPin.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ class ControlPin {
volatile bool& _rtVariable; // The variable that is set when the pin is asserted
int32_t _debounceEnd = 0;

void IRAM_ATTR handleISR();
CreateISRHandlerFor(ControlPin, handleISR);

// Interval during which we ignore repeated control pin activations
const int debounceUs = 10000; // 10000 us = 10 ms
void IRAM_ATTR handleISR();
CreateISRHandlerFor(ControlPin, handleISR);

public:
const char* _legend; // The name that appears in init() messages and the name of the configuration item
Expand All @@ -29,5 +28,7 @@ class ControlPin {
void init();
bool get() { return _value; }

String report();

~ControlPin();
};
58 changes: 58 additions & 0 deletions FluidNC/src/Extenders/Extenders.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyright (c) 2021 - Stefan de Bruijn
// Use of this source code is governed by a GPLv3 license that can be found in the LICENSE file.

#include "Extenders.h"

namespace Extenders {
PinExtender::PinExtender() : _driver(nullptr) {}

void PinExtender::validate() const {
if (_driver) {
_driver->validate();
}
}
void PinExtender::group(Configuration::HandlerBase& handler) { PinExtenderFactory::factory(handler, _driver); }
void PinExtender::init() {
if (_driver) {
_driver->init();
}
}

PinExtender::~PinExtender() { delete _driver; }

Extenders::Extenders() {
for (int i = 0; i < 16; ++i) {
_pinDrivers[i] = nullptr;
}
}

void Extenders::validate() const {}

void Extenders::group(Configuration::HandlerBase& handler) {
for (int i = 0; i < 10; ++i) {
char tmp[11 + 3];
tmp[0] = 0;
strcat(tmp, "pinextender");

for (size_t i = 0; i < 10; ++i) {
tmp[11] = char(i + '0');
tmp[12] = '\0';
handler.section(tmp, _pinDrivers[i]);
}
}
}

void Extenders::init() {
for (int i = 0; i < 16; ++i) {
if (_pinDrivers[i] != nullptr) {
_pinDrivers[i]->init();
}
}
}

Extenders::~Extenders() {
for (int i = 0; i < 16; ++i) {
delete _pinDrivers[i];
}
}
}
25 changes: 25 additions & 0 deletions FluidNC/src/Extenders/Extenders.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) 2021 - Stefan de Bruijn
// Use of this source code is governed by a GPLv3 license that can be found in the LICENSE file.

#pragma once

#include "../Configuration/Configurable.h"
#include "../Configuration/GenericFactory.h"
#include "PinExtender.h"

namespace Extenders {
class Extenders : public Configuration::Configurable {
public:
Extenders();

PinExtender* _pinDrivers[16];

void validate() const override;
void group(Configuration::HandlerBase& handler) override;
void init();

~Extenders();
};

using PinExtenderFactory = Configuration::GenericFactory<PinExtenderDriver>;
}
Loading