Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Arduino/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
Binary file removed Arduino/.pio/build/esp12e/.sconsign311.dblite
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/FrameworkArduino/Esp.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/FrameworkArduino/FS.cpp.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/FrameworkArduino/abi.cpp.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/FrameworkArduino/cont.S.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/firmware.bin
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/firmware.elf
Binary file not shown.
2 changes: 1 addition & 1 deletion Arduino/.pio/build/esp12e/idedata.json

Large diffs are not rendered by default.

285 changes: 0 additions & 285 deletions Arduino/.pio/build/esp12e/ld/local.eagle.app.v6.common.ld

This file was deleted.

Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib049/LittleFS/lfs.c.o
Binary file not shown.
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib049/libLittleFS.a
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib13e/CRC/CRC.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib13e/CRC/CRC12.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib13e/CRC/CRC16.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib13e/CRC/CRC32.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib13e/CRC/CRC64.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib13e/CRC/CRC8.cpp.o
Binary file not shown.
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib13e/CRC/FastCRC32.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib13e/libCRC.a
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib975/Servo/Servo.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/lib975/libServo.a
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/libFrameworkArduino.a
Binary file not shown.
1 change: 0 additions & 1 deletion Arduino/.pio/build/esp12e/libFrameworkArduinoVariant.a

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/src/File.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/src/Motor.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/src/ServoMotor.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/src/dataPacket.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/src/led.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/src/main.cpp.o
Binary file not shown.
Binary file removed Arduino/.pio/build/esp12e/src/processData.cpp.o
Binary file not shown.
2 changes: 1 addition & 1 deletion Arduino/.pio/build/project.checksum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aae944ca046edc15e5015c50ba39c6692d68710b
a97bc1fbd540ec81ca4e78e3eac7ceb13d59e415
10 changes: 10 additions & 0 deletions Arduino/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
7 changes: 5 additions & 2 deletions Arduino/include/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ void WriteByteIntoConfig(const byte *content, uint8_t contentLength);
void ReadContentFromConfig(byte *content, size_t length);

// 写入模式配置文件
void WriteModeConfig(int modeNum);

void WriteModeConfig(uint8_t modeNum);

// 读取模式配置文件
int ReadModeFromConfig();
uint8_t ReadModeFromConfig();
bool formatFS();

8 changes: 5 additions & 3 deletions Arduino/include/Motor.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
class Motor
{
private:
int pin1;
int pin2;
uint8_t pin1;
uint8_t pin2;
bool isStop = true;
String state = "停止";
unsigned long startTime = 0;
unsigned long timeout = 0;
bool banMotor = false;

public:
Motor(int pin1, int pin2);

Motor(uint8_t pin1, uint8_t pin2);

void forward(unsigned long);
void backforward(unsigned long);
void stop();
Expand Down
8 changes: 5 additions & 3 deletions Arduino/include/dataPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
#include "led.h"
#pragma once

class DataPacket {
class DataPacket
{
private:
CRC8 crc8;
CRC16 crc16;

public:
uint8_t index; // 索引
int8_t sequenceNumber; // 序号
Expand All @@ -20,8 +22,8 @@ class DataPacket {
uint8_t totalHighCRC; // 总高检验
uint8_t contentlength = 0; // 内容长度[作索引用]

DataPacket(); // 构造函数声明
DataPacket(); // 构造函数声明
bool headCheck();
bool totalCheck();
void sendPacket(bool ISIO2OUT = false);
void sendPacket(bool ISIO2OUT = false);
};
11 changes: 7 additions & 4 deletions Arduino/include/modeInfo.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@

int getModeStatus();

void setModeStatus(int modeNum);
uint8_t getBackPullTime();

void setBackPullTime(uint8_t modeNum);

// void modeLEDChange(bool status);

void modeDelay(int modeNum);
uint16_t backPullDelay(uint8_t modeNum);

void modeLEDSelect(uint8_t modeNum);
void singleFlashLED();

void modeLEDSelect(int modeNum);
Loading