IMyMotorStator.UpperLimitDeg

Michael Winge shared this bug 5 years ago
Outdated

UpperLimitDeg behaves like UpperLimitRad.

UpperLimitRad behaves normally.


LowerLimitDeg behaves normally.

LowerLimitRad behaves normally.

Replies (3)

photo
1

Hello, Engineer!


Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.


We really appreciate your patience.


Kind Regards

Keen Software House: QA Department

photo
1

In MyMotorStator the setter should convert the value passed-in to radians.

Error still here in Update 1.190

From decompiler:


        float IMyMotorStator.UpperLimitDeg
        {
            get {
                if (this.m_maxAngle >= 6.30063868F) {
                    return global::System.Single.MaxValue;
                }
                return MathHelper.ToDegrees(this.m_maxAngle);
            }
            set {
                value = MathHelper.Clamp(value, -6.28318548F, 6.30063868F);
                this.m_maxAngle.Value = value; // <== Missing conversion to rad!!!!
            }
        }

photo
1

If you use UpperLimitDeg as intended it will break the control panel. I tried setting it to 180 degrees and it ended up setting upper limit to 361 degrees and you won't be able to change it unless you fiddle a bit back and forth between rotor panel and other panels while try to set it again. It will also cause the rotor to, what seems like a visual only, spin like crazy. Probably to realign with actual degrees.

It's been 4 months and it just needs one line of math. Took me hours to figure out this was a bug. Please fix.

Leave a Comment
 
Attach a file