File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#pragma once
22
3- #include " common/result.hpp"
43#include " pros/devices/port.hpp"
54
65namespace zest {
@@ -36,21 +35,4 @@ enum class DeviceType {
3635 */
3736DeviceType get_device_type (SmartPort port);
3837
39- /* *
40- * @brief V5 Port Mismatch Error
41- *
42- */
43- class SmartPortError : public ResultError {
44- public:
45- /* *
46- * @brief Construct a new V5 Port Mismatch Error object
47- *
48- * @param expected the device expected to be on the port
49- * @param actual the device that is actually on the port
50- */
51- SmartPortError (DeviceType expected, std::optional<DeviceType> actual = std::nullopt );
52-
53- DeviceType expected;
54- std::optional<DeviceType> actual;
55- };
5638} // namespace zest
Original file line number Diff line number Diff line change 33#include " v5_api_patched.h"
44#include " v5_apitypes_patched.h"
55
6+ #include < array>
7+
68namespace zest {
79DeviceType get_device_type (SmartPort port) {
810 // if the port number is greater than 21, return invalid
@@ -48,8 +50,4 @@ DeviceType get_device_type(SmartPort port) {
4850 return DeviceType::Unknown;
4951 }
5052}
51-
52- SmartPortError::SmartPortError (DeviceType expected, std::optional<DeviceType> actual)
53- : expected(expected),
54- actual (actual) {}
5553} // namespace zest
You can’t perform that action at this time.
0 commit comments