mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Dispatcher: Move several fixed initial values to header.
This commit is contained in:
@@ -31,12 +31,7 @@ void Dispatcher::StartClient(const char* server_name, unsigned int port) {
|
||||
}
|
||||
|
||||
DispatcherBase::DispatcherBase(Storage& storage, Notifier& notifier)
|
||||
: m_storage(storage),
|
||||
m_notifier(notifier),
|
||||
m_server(false),
|
||||
m_do_flush(false),
|
||||
m_reconnect_proto_rev(0x0300),
|
||||
m_do_reconnect(true) {
|
||||
: m_storage(storage), m_notifier(notifier) {
|
||||
m_active = false;
|
||||
m_update_rate = 100;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class DispatcherBase {
|
||||
|
||||
Storage& m_storage;
|
||||
Notifier& m_notifier;
|
||||
bool m_server;
|
||||
bool m_server = false;
|
||||
std::string m_persist_filename;
|
||||
std::thread m_dispatch_thread;
|
||||
std::thread m_clientserver_thread;
|
||||
@@ -93,12 +93,12 @@ class DispatcherBase {
|
||||
std::mutex m_flush_mutex;
|
||||
std::condition_variable m_flush_cv;
|
||||
std::chrono::steady_clock::time_point m_last_flush;
|
||||
bool m_do_flush;
|
||||
bool m_do_flush = false;
|
||||
|
||||
// Condition variable for client reconnect (uses user mutex)
|
||||
std::condition_variable m_reconnect_cv;
|
||||
unsigned int m_reconnect_proto_rev;
|
||||
bool m_do_reconnect;
|
||||
unsigned int m_reconnect_proto_rev = 0x0300;
|
||||
bool m_do_reconnect = true;
|
||||
};
|
||||
|
||||
class Dispatcher : public DispatcherBase {
|
||||
|
||||
Reference in New Issue
Block a user