mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[sim] Add WebSocket extension (client/server) (#2589)
This allows access to HAL-level simulation data via a WebSocket connection. The server additionally serves local files. The following environment variables can be used for configuration: HALSIMWS_USERROOT (server) - local directory to use for file serving for /user/ URIs, defaults to ./sim/user HALSIMWS_SYSROOT (server) - local directory to use for file serving for all other URIs, defaults to ./sim HALSIMWS_URI (client or server) - WebSocket URI, defaults to /wpilibws HALSIMWS_PORT (client or server) - port number, defaults to 8080 HALSIMWS_HOST (client) - host to connect to, defaults to localhost Co-authored-by: Zhiquan Yeo <zyeo8@bloomberg.net> Co-authored-by: Peter Johnson <johnson.peter@gmail.com> Co-authored-by: jpokornyiii <jpokornyiii@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ class SimCallbackRegistryBase {
|
||||
public:
|
||||
void Cancel(int32_t uid) {
|
||||
std::scoped_lock lock(m_mutex);
|
||||
if (m_callbacks) m_callbacks->erase(uid - 1);
|
||||
if (m_callbacks && uid > 0) m_callbacks->erase(uid - 1);
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
|
||||
Reference in New Issue
Block a user