This commit is contained in:
xinyang
2019-05-15 16:56:39 +08:00
parent 30dbdaac1a
commit 1bb0536545
3 changed files with 14 additions and 12 deletions

View File

@@ -141,7 +141,6 @@ void uartReceive(Serial* uart) {
cnt = 0;
}
}
LOGM("%d", cnt);
if (cnt == 12) {
if (buffer[8] == 'e') {
state = ENERGY_STATE;

View File

@@ -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;

View File

@@ -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>