Skip to content
This repository was archived by the owner on May 3, 2026. It is now read-only.

Commit e6933b1

Browse files
committed
further SmartPort documentation
1 parent 839a590 commit e6933b1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

include/pros/devices/port.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,32 @@ class SmartPort {
5959
return m_index;
6060
}
6161

62+
/**
63+
* @brief whether the smart port represents a physical or virtual smart port
64+
*
65+
* @return true the smart port is physical
66+
* @return false the smart port is virtual or invalid
67+
*/
6268
constexpr bool is_physical() const {
6369
return m_index <= 20;
6470
}
6571

72+
/**
73+
* @brief whether the smart port represents a physical or virtual smart port
74+
*
75+
* @return true the smart port is virtual
76+
* @return false the smart port is physical or invalid
77+
*/
6678
constexpr bool is_virtual() const {
6779
return m_index >= 21 && m_index <= 31;
6880
}
6981

82+
/**
83+
* @brief whether the smart port is valid or not
84+
*
85+
* @return true the smart port is valid
86+
* @return false the smart port is invalid
87+
*/
7088
constexpr bool is_valid() const {
7189
return m_index <= 31;
7290
}

0 commit comments

Comments
 (0)