fix bug
This commit is contained in:
1
main.cpp
1
main.cpp
@@ -141,7 +141,6 @@ void uartReceive(Serial* uart) {
|
||||
cnt = 0;
|
||||
}
|
||||
}
|
||||
LOGM("%d", cnt);
|
||||
if (cnt == 12) {
|
||||
if (buffer[8] == 'e') {
|
||||
state = ENERGY_STATE;
|
||||
|
||||
@@ -14,21 +14,21 @@ typedef unsigned int UINT;
|
||||
typedef unsigned long long UINT64;
|
||||
typedef int BOOL;
|
||||
typedef unsigned char BYTE;
|
||||
#define DWORD unsigned int
|
||||
typedef unsigned int DWORD;
|
||||
typedef void* PVOID;
|
||||
#define HWND typedef void*
|
||||
#define LPCTSTR char*
|
||||
typedef void* HWND;
|
||||
typedef char* LPCTSTR;
|
||||
typedef unsigned short USHORT;
|
||||
typedef short SHORT;
|
||||
typedef unsigned char* LPBYTE;
|
||||
typedef char CHAR;
|
||||
#define WORD short
|
||||
#define HANDLE INT
|
||||
#define VOID void
|
||||
typedef short WORD;
|
||||
typedef INT HANDLE;
|
||||
typedef void VOID;
|
||||
typedef unsigned long ULONG;
|
||||
#define LPVOID void**
|
||||
typedef void** LPVOID;
|
||||
typedef unsigned char UCHAR;
|
||||
#define HMODULE void*
|
||||
typedef void* HMODULE;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#include <serial/serial.h>
|
||||
#include <options/options.h>
|
||||
#include <log.h>
|
||||
using namespace std;
|
||||
#include <iostream>
|
||||
|
||||
#define LOG_LEVEL LOG_NONE
|
||||
#include <log.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifdef Windows
|
||||
|
||||
Serial::Serial(UINT baud, char parity, UINT databits, UINT stopsbits, DWORD dwCommEvents) :
|
||||
@@ -171,7 +174,7 @@ bool Serial::ReadData(unsigned char *buffer, unsigned int length) {
|
||||
return bResult;
|
||||
}
|
||||
|
||||
#else defined(Linux)
|
||||
#elif defined(Linux)
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user