You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But that is a hidden side effect and I would like rather make the check in the compile-time and show same compile message (if the parameters would be constexp). Is that possible @yaqwsx ?
Or is there some better way? Are exceptions available in the Arduino EPS32 framework or how the ESP-IDF throws the error message?
The text was updated successfully, but these errors were encountered:
You cannot have a compile-time check on function argument as you are not guaranteed to get a compile-time constant. You would have to make the constructor templated by the servo parameters and hence, prevent them from being computed in run-time.
Is it possible to have some compile-time check of the
attach()
parameters, e.g. withconstexp
?https://github.com/RoboticsBrno/ESP32-Arduino-Servo-Library/blob/4b1f4a560bc0e25c51faf7ac7a7fc35773a4ba7c/src/Servo.cpp#L60
I am now thinking about modification like this:
But that is a hidden side effect and I would like rather make the check in the compile-time and show same compile message (if the parameters would be constexp). Is that possible @yaqwsx ?
Or is there some better way? Are exceptions available in the Arduino EPS32 framework or how the ESP-IDF throws the error message?
The text was updated successfully, but these errors were encountered: