Skip to content

Fix (crashing) error on M105 output #6584

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

Merged
merged 1 commit into from
May 4, 2017

Conversation

bgort
Copy link
Contributor

@bgort bgort commented May 4, 2017

Use SERIAL_PROTOCOL for ints instead of SERIAL_PROTOCOL_F.

Also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters.

See #6571.

@colinrgodsey
Copy link
Contributor

LGTM. Will verify shortly if you need an extra +, need to get my cube printing shoes on.

…ERIAL_PROTOCOL_F

also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
@Roxy-3D
Copy link
Member

Roxy-3D commented May 4, 2017

I think I agree the 'address of' does not serve a purpose in these function declarations. Why was that put there? If I knew the answer, I would merge this right now....

@bgort
Copy link
Contributor Author

bgort commented May 4, 2017

I have no idea why it's there, but there's no purpose for it that I can see. We're just referencing the value of the int passed in when setting the temps.

My guess is that there was some need for it in a previous version.

@Roxy-3D
Copy link
Member

Roxy-3D commented May 4, 2017

OK... We can change it back if it turns out there is a real reason for it. I think it can also be argued that the non-BugFix branch should get this change, but we should probably have a discussion about that...

I'll merge just to help get rid of some of the crashes...

@Roxy-3D Roxy-3D merged commit ae7c602 into MarlinFirmware:bugfix-1.1.x May 4, 2017
@bgort
Copy link
Contributor Author

bgort commented May 4, 2017

Yeah, it's a pretty big deal. I can't imagine anyone who checks temps w/M105 can use 1.1.0?

@bgort bgort deleted the restart branch May 4, 2017 21:17
@Roxy-3D
Copy link
Member

Roxy-3D commented May 4, 2017

Actually... part of the discussion ought to be what the default branch is... If we are NOT going to cross bug fixes over to the v1.1.0 branch... Probably the default branch should not point at it. The default branch should point at something that works for most people.

#6571 (comment)

@Grogyan
Copy link
Contributor

Grogyan commented May 4, 2017 via email

@Roxy-3D
Copy link
Member

Roxy-3D commented May 4, 2017

I believe the answer is "Yes." It maybe that switching to double is better than int.

@Tannoo
Copy link
Contributor

Tannoo commented May 4, 2017

My build from Compiled: May 3 2017, had these:

temperature.h:
static void setTargetHotend(const float& celsius, uint8_t e) {
and
static void setTargetBed(const float& celsius) {

And M105 works fine:

echo:Marlin 1.1.0-RCBugFix

echo: Last Updated: 2016-12-06 12:00 | Author: (none, default config)
Compiled: May  3 2017
echo: Machine Name: Prusa i3
echo: Free Memory: 2261  PlannerBufferBytes: 1232
echo:V36 stored settings retrieved (453 bytes)
 UBL active!
...
echo:DEBUG:ECHO
ok
echo:M105
ok T:25.0 /0.0 B:25.5 /0.0 @:0 B@:0
echo:M105
ok T:25.0 /0.0 B:25.5 /0.0 @:0 B@:0
echo:M105
ok T:25.0 /0.0 B:25.5 /0.0 @:0 B@:0
echo:M105
ok T:25.0 /0.0 B:25.5 /0.0 @:0 B@:0
echo:M105
ok T:25.0 /0.0 B:25.5 /0.0 @:0 B@:0
echo:M105
ok T:25.0 /0.0 B:25.5 /0.0 @:0 B@:0

@bgort
Copy link
Contributor Author

bgort commented May 4, 2017

Do you know which commit that is, Tannoo? Looks like it's from before 2658cc7, which would make sense.

EDIT: I don't think the ampersand was causing a problem, necessarily, but it was unnecessary and didn't make sense, given what the function does now.

@colinrgodsey
Copy link
Contributor

seems to work with OctoPi so far

Recv: ok T:20 /0 B:19 /0 @:0 B@:0
Send: M105
Recv: ok T:20 /0 B:20 /0 @:0 B@:0
Send: M105
Recv: ok T:19 /0 B:20 /0 @:0 B@:0

Not a huge fan of that missing point of precision tho....

Now to try and print something!

thinkyhead pushed a commit that referenced this pull request May 5, 2017
…ERIAL_PROTOCOL_F (#6584)

also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
thinkyhead pushed a commit that referenced this pull request May 5, 2017
…ERIAL_PROTOCOL_F (#6584)

also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
thinkyhead pushed a commit that referenced this pull request May 5, 2017
…ERIAL_PROTOCOL_F (#6584)

also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
thinkyhead pushed a commit that referenced this pull request May 8, 2017
…ERIAL_PROTOCOL_F (#6584)

also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
damicreabox pushed a commit to damicreabox/Marlin that referenced this pull request Sep 14, 2018
…ERIAL_PROTOCOL_F (MarlinFirmware#6584)

also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
bakaufman pushed a commit to bakaufman/Marlin that referenced this pull request Oct 16, 2020
…ERIAL_PROTOCOL_F (MarlinFirmware#6584)

also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants