mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-28 19:01:07 -04:00
Fix Windows build
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
|
||||
#include "FanBusInterface.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
FanBusInterface::FanBusInterface(const char* portname)
|
||||
{
|
||||
port_name = portname;
|
||||
@@ -24,6 +28,9 @@ FanBusInterface::FanBusInterface(const char* portname)
|
||||
read_buf[0] = 0xFF;
|
||||
|
||||
serialport->serial_write(read_buf, 1);
|
||||
|
||||
std::this_thread::sleep_for(10ms);
|
||||
|
||||
int test = serialport->serial_read(read_buf, 1);
|
||||
|
||||
if(test > 0)
|
||||
@@ -57,7 +64,7 @@ int FanBusInterface::read
|
||||
|
||||
serialport->serial_write((char *)fanbus_msg, 5);
|
||||
|
||||
usleep(1000);
|
||||
std::this_thread::sleep_for(10ms);
|
||||
|
||||
char read_buf[6];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user