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

[6363] Don't need a parameter of void #22

Open
y-matsuda opened this issue Apr 24, 2015 · 1 comment
Open

[6363] Don't need a parameter of void #22

y-matsuda opened this issue Apr 24, 2015 · 1 comment
Labels

Comments

@y-matsuda
Copy link
Contributor

class Motor
{
public:

    static const S8 PWM_MAX = 100;
    static const S8 PWM_MIN = -100;
    explicit Motor(ePortM port, bool brake = true);
    ~Motor(void);

    inline void reset(void)
    {
        nxt_motor_set_speed(mPort, 0, 1); // need to set brake to stop the motor immidiately
        nxt_motor_set_count(mPort, 0);
    }

    inline S32 getCount(void) const { return nxt_motor_get_count(mPort); }
    inline void setCount(S32 count) { nxt_motor_set_count(mPort, count); }
    void setPWM(S8 pwm);
    void setBrake(bool brake);

protected:

    inline ePortM getPort(void) const { return mPort; }
    inline bool getBrake(void) const { return mBrake; }
    inline S8 getPWM(void) const { return mPWM; }

private:
   ePortM mPort;
    bool mBrake;
    S8 mPWM;
};

When the above is reversed, a parameter of void is made but isn't wonderful as follows.

image

The expectation value.

image

There is this source cord in the following.

Source cord above-mentioned
nxtOSEK_v218/nxtOSEK/ecrobot/c++/device/Motor.h

https://dev.change-vision.com/projects/jude/ticket/6363 (private URL)

@y-matsuda
Copy link
Contributor Author

This defect can be evaded by DeleteVoidParameters.js.
Please carry out by a script plug-in.

But I'd like to settle a problem fundamentally.

@y-matsuda y-matsuda changed the title Don't need a parameter of void [6363] Don't need a parameter of void Jul 9, 2015
@y-matsuda y-matsuda added the bug label Jul 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant