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

Commit 189f2c1

Browse files
committed
improve SmartPort::get_mutex documentation
1 parent dfe13ff commit 189f2c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/pros/devices/port.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ class SmartPort {
7373
/**
7474
* @brief Get the mutex for the given port
7575
*
76-
* @todo decide whether this should go in a source file
76+
* @note if the port is not valid (index > 31), a reference to a reserved mutex is returned.
7777
*
7878
* @return pros::RecursiveMutex&
7979
*/
8080
pros::RecursiveMutex& get_mutex() const {
8181
if (this->is_valid()) {
8282
return m_mutexes.at(m_index);
8383
} else {
84-
return *m_mutexes.end();
84+
return m_mutexes.at(32);
8585
}
8686
}
8787

0 commit comments

Comments
 (0)