-
Notifications
You must be signed in to change notification settings - Fork 61
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
When starting a print, the selected spool from Spool manager shows initial total spool weight not current spool weight #178
Comments
@clarkiej please attach a screenshot of the selected spool-dialog and also the popup. |
Correct. It is just when you select the spool it now shows "Grey PLA (1000gm)" when previous it showed "Grey PLA (670gm)". Once selected it shows the remaining filament. I will do a screenshot once my current print finishes. Kieran ClarkeMobile +61418940005On 28 May 2021 05:53, OllisGit ***@***.***> wrote:
@clarkiej please attach a screenshot of the selected spool-dialog and also the popup.
Btw. the poup before print, shows the same weight as in the selection-box, rigth?
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
I might have the same problem here, but it looks different. There is different data displayed for the same spool. I'm not shown the initial weight of the spool but something is definitely wrong
In loadSpoolsByQuery, the following data is returned:
but then, in the allowedToPrint call, the following data is returned:
If i try to edit the spool, the value displayed it 191.8, so i assume that's the correct one… or is it? The key difference seems to be that loadSpoolsByQuery runs it through transformSpoolModelToDict, and allowedToPrint doesn't. allowedToPrint calculates the remaining weight based on the total and used values from the database, while allowedToPrint just reads the remaining value from the database. That might cause an inconsistency, but it makes me wonder… why is the remaining value not in sync with the value of total weight and used weight? Could there be something wrong with how the multi-tool code commits the usage data to the database? I don't know what your database is supposed to hold and store precisely, so it's for you to find out @OllisGit :) Hope this helps. PS: Wondering if this might be ralted to #175 but it probably isn't. |
Ok, i had toi look some more into it: The culprit is here: After the print, only used filament is updated, not remaining filament. And i'm to blame, since this code was introduced by my pull request. Question: why are used filament and remaining filament stored as seperate values at all. Wouldn't it be a good idea to drop one of them from the database and always calculate it and if the user puts in a new value, just convert it into a new value for used filament instead? |
Okay, apparently i'm no to blame after all, because before my edits, the previous code also didn't update the remainingWeight field:
It looks like you just mistakenly added code to read the remainingWeight value from the spool model isntead of calculating it: Which is an easy mistake to make, since it seems like an obvious thing to do, but that begs the question even more why that field exists if you are not supposed to read data from it? |
Update:
This is only happening with a new spool I added AFTER I performed the update:
With a spool in the system prior to the update, it displays correctly:
From: Laura ***@***.***>
Sent: Friday, 28 May 2021 19:16
To: OllisGit/OctoPrint-SpoolManager ***@***.***>
Cc: clarkiej ***@***.***>; Mention ***@***.***>
Subject: Re: [OllisGit/OctoPrint-SpoolManager] When starting a print, the selected spool from Spool manager shows initial total spool weight not current spool weight (#178)
I might have the same problem here, but it looks different. There is different data displayed for the same spool. I'm not shown the initial weight of the spool but something is definitely wrong
<https://user-images.githubusercontent.com/3868507/119974004-78678200-bfb4-11eb-9520-a836ebd9bc39.png>
* The print i'm trying to start uses 58g of filament so… it doesn't make sense to be related to that.
* I do not have a spool that currently has 276g left, so it can't be mistaking it for a different spool.
In loadSpoolsByQuery, the following data is returned:
"remainingLength": "-256064",
"remainingLengthPercentage": "",
"remainingPercentage": "19.2",
"remainingWeight": "191.8",
but then, in the allowedToPrint call, the following data is returned:
"reminderSpoolSelection": [
{
"bedOffset": null,
"enclosureOffset": null,
"material": "PETG",
"remainingWeight": 276.3485105427127,
"spoolName": "Prusament Jet Black 3",
"toolIndex": 0,
"toolOffset": null
}
]
If i try to edit the spool, the value displayed it 191.8, so i assume that's the correct one… or is it?
The key difference seems to be that loadSpoolsByQuery runs it through transformSpoolModelToDict, and allowedToPrint doesn't. allowedToPrint calculates the remaining weight based on the total and used values from the database, while allowedToPrint just reads the remaining value from the database. That might cause an inconsistency, but it makes me wonder… why is the remaining value not in sync with the value of total weight and used weight? Could there be something wrong with how the multi-tool code commits the usage data to the database?
I don't know what your database is supposed to hold and store precisely, so it's for you to find out @OllisGit <https://github.com/OllisGit> :) Hope this helps.
PS: Wondering if this might be ralted to #175 <#175> but it probably isn't.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#178 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ATOXIDR7HZPQSXPDVPMPGNDTP53QRANCNFSM45VAGWYA> . <https://github.com/notifications/beacon/ATOXIDSGV3P34MCKYUUIG73TP53QRA5CNFSM45VAGWYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGKXT43Q.gif>
|
Update.: If the spool weight is left blank, the spool weight does display when you go to start a print, BUT, the spool weight shown is the spool weight remaining after the previous print -n. It has not updated the total remaining after the previous print, but the filament remaining displayed in the spool catalogue is correct: Filament remaining in spool catalogue showing correctly. Start the next print and the filament remaining is the amount that was left at the START of the previous print, not the end: |
- PR #204, #201 redesign of the Spool-Selection in the sidebar. Huge thanks to @TiziG @MarloSM - E #125 New field "Serialnumber" - E Spool selection from Edit-Dialog - E #141 New Filter: Material, Vendor and Color - E #44 Sidebar filament usage in grams instead of volume - B #199, #198, #163, #156 some QR-Code optimisations - B #197, #196, #188, #181, #178, #177, #172, #162, #142, Some UI optimisations - B #194 CSV import, behind reverse proxy - B #175 Confirm dialog not shown
Hi @clarkiej , Please try and give me a feedback. |
I have updated the spool manager and will let you know how I get on cheers
From: OllisGit ***@***.***>
Sent: Sunday, 24 October 2021 22:59
To: OllisGit/OctoPrint-SpoolManager ***@***.***>
Cc: clarkiej ***@***.***>; Mention ***@***.***>
Subject: Re: [OllisGit/OctoPrint-SpoolManager] When starting a print, the selected spool from Spool manager shows initial total spool weight not current spool weight (#178)
Hi @clarkiej <https://github.com/clarkiej> ,
in latest release 1.5.0 I change the behaviour. The dialog should now present the correct values.
Please try and give me a feedback.
Olli
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#178 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ATOXIDX2VGEQI2BS7ERDM3DUIQNMJANCNFSM45VAGWYA> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub> . <https://github.com/notifications/beacon/ATOXIDVQKPAJQDCDRM3AYO3UIQNMJA5CNFSM45VAGWYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHCSQRKI.gif>
|
Olli,
The new release is working great.
I especially like the new picklist format. It looks sweet
Regards,
Kieran Clarke
From: OllisGit ***@***.***>
Sent: Sunday, 24 October 2021 22:59
To: OllisGit/OctoPrint-SpoolManager ***@***.***>
Cc: clarkiej ***@***.***>; Mention ***@***.***>
Subject: Re: [OllisGit/OctoPrint-SpoolManager] When starting a print, the selected spool from Spool manager shows initial total spool weight not current spool weight (#178)
Hi @clarkiej <https://github.com/clarkiej> ,
in latest release 1.5.0 I change the behaviour. The dialog should now present the correct values.
Please try and give me a feedback.
Olli
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#178 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ATOXIDX2VGEQI2BS7ERDM3DUIQNMJANCNFSM45VAGWYA> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub> . <https://github.com/notifications/beacon/ATOXIDVQKPAJQDCDRM3AYO3UIQNMJA5CNFSM45VAGWYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHCSQRKI.gif>
|
Previous versions showed current spool weight when selecting the spool for printing. For V1.4.3, now when you select the spool the spool choice shows the initial spool weight (1000 gms) instead of the current spool weight (854 gms) as it did previously. It makes it difficult to choose spools if you have more than one spool of the same type/colour of differing remains in your spool catalogue.
The text was updated successfully, but these errors were encountered: