Comments (17)
Hey, I'm going to fix up your existing tests! No guarantees on any new tests being written though...
from octolapse.
from octolapse.
You might want to hold off fixing any tests of timelapse.py, btw. It's going to change a lot soon when I remove the pause/resume from the snapshot process.
from octolapse.
Can you please post the contents of c://test
? I'm on a Ubuntu machine and this is completely breaking most of your tests anyways. I'll see if I can trick it with some temp directory magic.
Brb, reading up on how settings are stored to begin with.
from octolapse.
It's just a log path. We can change it to a a subdirectory of test and add to gitignore?
from octolapse.
I need an Octolapse profile. A lot of the tests are erroring out because the printer homes, but all positions still return None
.
In position.py
, the plugin detects G28 Home
and does:
pos.X = self.Origin["X"] if not self.Printer.auto_detect_position else None
self.Printer.auto_detect_position = True
(I think this is correct, as default). So it sets pos.X
to None. And no homed position/coordinates is ever generated. Am I missing something?
By the way, it takes like 2 lines of code to use a temp directory and it works out fine. SHOULD be fine.
from octolapse.
from octolapse.
I suppose I should give a clearer example:
In test_trigger_gcode.py
# home the axis and resend the snap command - will be false because the PREVEIOUS state must be homed
position.Update("G28")
trigger.Update(position, "snap")
self.assertFalse(trigger.IsTriggered(0))
self.assertFalse(trigger.IsWaiting(0))
The first trigger.Update(...)
parses the home command, so following commands should be homed.
The test continues with:
# try again, should now work
position.Update("Snap")
trigger.Update(position, "snap")
self.assertTrue(trigger.IsTriggered(0))
self.assertFalse(trigger.IsWaiting(0))
Somewhere in the trigger.Update(...)
, we have the following if-else
:
if(not position.HasHomedPosition(1)):
... (skip command)
else:
... (parse command)
However, it appears if(not position.HasHomedPosition(1))
is True
(branch is taken), so it never even attempts to parse the command. Is this working as intended?
from octolapse.
from octolapse.
I have fixed most of the tests that were throwing exceptions. Most of this (and probably most of the other breaking changes) was due to the addition of the circular buffers you noticed. These were added to position.py and extruder.py so that I could easily 'Undo' position and extruder updates. I figure they might be useful in the future to allow for more complicated triggers/snapshot gcode. I hadn't planned initially on doing this, but realized at some point that it was necessary. You can imagine how much that change affected everything.
Since you mentioned working more on the tests, I'll push these changes as soon as I run a couple quick test prints.
from octolapse.
Would be great! I'm mostly looking at position.py
. By the way, the structure I'm looking at using is collections.deque
.
from octolapse.
Ok, Just this AM i standardized most of the calls to Position that retrieve something from the PositionState (GetPosition), and I did something similar to extruder.py (GetState). I didn't change it everywhere, but hopefully that will make what you're doing easier.
BTW, I'm having some trouble with Git recognizing my credentials. This has happened before and it's something to do with the credential manager. I'll let you know when I've pushed the changes I've been making this AM.
from octolapse.
K, those changes are in BetaDevelopment now after applying a patch to my IDE (apparently there was an issue with TLSv1.2).
I'm really sorry if I stepped on your toes with this update, but I didn't expect us to both be working in the same file (position.py) this morning!
from octolapse.
I'm super confused. I pushed those changes but I don't see the commit on github.com. However, when I clone betadevelopment, the changes are there!
Can you let me know if you see this line in utility.py after pulling the latest code from BetaDevelopment branch?
Line 281: return None if v is None else min(max(v, v_min), v_max)
If it's there I"ll assume it's some glitch on github, otherwise I messed something up somehow.
from octolapse.
Looks fine on my end.
from octolapse.
Aside from test_timelapse.py (which will be a real bear), there are 7 tests left to fix in the following files:
test_utility.py - 2 fail
test_timerTrigger.py - 4 fail
test_layerTrigger.py - 1 fail (I thought I fixed this one...)
Getting close!
from octolapse.
All of the tests except those from test_timelapse.py are fixed! There are probably some flawed tests in there, but we'll find them eventually. At some point many probably need to be re-written, split or removed. I'm going to create a separate issue for test_timelapse.py, since it will probably need to be completely rewritten anyway, but probably won't do this until timelapse.py is re-written to include Gina's newly implemented lock that will allow me to take snapshots without pausing the print. I fear we will need a testing master to write useful tests for timelapse.py, though....
FYI, I changed trigger.py so that it looks at the current trigger state instead of the previous to determine when to trigger. Then in timelapse.py I look at the PREVIOUS trigger state. This REALLY simplified a lot of the tests by preventing me from having to send a dummy command (or other such nonsense) to read the previous trigger state. Honestly I have no idea why I did it that way in the first place, but it's fixed now!
I deem this issue CLOSED! Thank you so much for your help. I was DREADING fixing these up, but knew it would be good medicine.
from octolapse.
Related Issues (20)
- Request for Creality Slicer to be added to Slicer List HOT 1
- [Request] Allow compatability with Orcaslicer for automatic slicer configuration HOT 4
- [Request] Pause and play sound upon parking for snapshot trigger
- Octolapse Startup Failed: Error Starting Timelapse
- Can't install Octolaspe on windows (Octoprint version 1.9.3).
- Octolapse Install issue on Debian Bookworm
- Error on startup with GcodePositionProcessor
- Error downloading rendered videos HOT 4
- [Request] Add max_layer to overlay text template
- [Request] Automatic Slicer Settings for Bambu Studio HOT 6
- "CAMERA TEST FAILED - Errors were detected (read timeout)" on the first print attempt, every time
- {Request] Prusa MK3S+ with MMU3 printer profile
- External trigger
- Receiving Error when starting to Print - Some slicer settings were missing from your gcode file. Missing Settings: Retraction Length,Retraction Speed,Deretraction Speed,Z Lift Height,X/Y Travel Speed,Z Travel Speed HOT 1
- Stringing
- Octolapse issue while interfacing to a Canon EOS450 DSLR HOT 1
- Cannot start prints remotely when octolapse is on HOT 1
- Prusa MK4IS Octolapse causes missing layers
- Octolapse Startup Failed - Automatic Configuration - Ender 3 V2 Neo HOT 1
- [Request] Add placeholder to event manager trigger.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octolapse.