Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
エラー修正, noexceptキーワードを追加 #29 #25 #13
Browse files Browse the repository at this point in the history
  • Loading branch information
H1rono committed Sep 12, 2022
1 parent 0505486 commit 22e7f95
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/ssr/MovingAverage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace ssr {
* @brief 平均値を取得する
* @return T 現在保持している値の平均 値を1つも保持していない場合は0
*/
virtual T read() const noexcept override {
virtual T read() noexcept override {
if (_index == 0) {
return static_cast<T>(0);
}
Expand Down
6 changes: 3 additions & 3 deletions include/ssr/Solenoid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ namespace ssr {
/**
* @brief 初期化 全体のsetup()で呼ぶこと
*/
void begin();
void begin() noexcept;

/**
* @brief 状態更新 定期的に呼ぶこと
*/
void update();
void update() noexcept;

/**
* @brief ソレノイドを発火させる
*/
void fire();
void fire() noexcept;
}; // class Solenoid
} // namespace ssr

Expand Down
6 changes: 3 additions & 3 deletions include/ssr/SyncServo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ namespace ssr {
* @param pin2 ssr::PinType サーボ2に割り当てるピン
* @return uint16_t (servo2.attach(pin2) << 8) | servo1.attach(pin1)
*/
uint16_t attach(PinType pin1, PinType pin2);
uint16_t attach(PinType pin1, PinType pin2) noexcept;

/**
* @brief 角度を設定する
* @param value uint8_t サーボ1に設定する角度 サーボ2の角度はmirroredの値次第で変わる
*/
virtual void write(uint8_t value) override;
virtual void write(uint8_t value) noexcept override;

/**
* @brief 角度を読む
* @return int サーボ1の角度 同期できていない場合は-1
*/
virtual int16_t read() override;
virtual int16_t read() noexcept override;
}; // class SyncServo
} // namespace ssr

Expand Down

0 comments on commit 22e7f95

Please sign in to comment.