yutotnh / spirit

モータードライバ用ライブラリ
https://yutotnh.github.io/spirit/
MIT License
2 stars 2 forks source link

Feature: float型の定数に代入する値に接尾辞(F)を付ける #183

Closed yutotnh closed 1 year ago

yutotnh commented 1 year ago

なぜ機能が欲しいのか

build-and-test (windows-latest)で警告が出てきた

警告内容はまっとうなため、代入する定数をdouble型からfloat型にしたい

image

提案の説明

変更後

https://github.com/yutotnh/spirit/blob/9b64df44e533d452446db29feddb89f89649aa88/include/Motor.h#L282-L284

変更前

        static constexpr float         Kp                        = 1.0F;   // 暫定
        static constexpr float         Ki                        = 0.1F;   // 暫定
        static constexpr float         Kd                        = 0.01F;  // 暫定

その他