Skip to content

Commit 707cf79

Browse files
author
NoahAndrews
committed
Remove unnecessary sleep
1 parent cffa56f commit 707cf79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/canWrapper.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,8 @@ void setSparkMaxHeartbeatData(const Napi::CallbackInfo& info) {
729729
if (deviceIterator == canDeviceMap.end()) return;
730730
}
731731

732+
// Clear the scheduled heartbeat that has outdated data so that the updated one gets sent out immediately
732733
_sendCANMessage(descriptor, SPARK_HEARTBEAT_ID, heartbeat, 8, -1);
733-
std::this_thread::sleep_for(std::chrono::milliseconds(50));
734734

735735
int sum = 0;
736736
for (uint32_t i = 0; i < dataParam.Length(); i++) {

0 commit comments

Comments
 (0)