MCPcopy Create free account
hub / github.com/SunOner/sunone_aimbot_2 / timerThreadFunc

Method timerThreadFunc

sunone_aimbot_2/mouse/Arduino.cpp:211–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void Arduino::timerThreadFunc()
212{
213 while (timer_running_)
214 {
215 std::this_thread::sleep_for(std::chrono::milliseconds(100));
216 if (!is_open_)
217 continue;
218
219 bool arduino_enable_keys_local;
220 {
221 arduino_enable_keys_local = config.arduino_enable_keys;
222 }
223
224 if (arduino_enable_keys_local || protocol_ == ArduinoProtocol::Teensy41)
225 {
226 if (!listening_)
227 {
228 startListening();
229 }
230 }
231 else
232 {
233 if (listening_)
234 {
235 listening_ = false;
236 if (listening_thread_.joinable())
237 {
238 listening_thread_.join();
239 }
240 }
241 }
242 }
243}
244
245void Arduino::startListening()
246{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected