init
This commit is contained in:
Binary file not shown.
BIN
MainCarRunner/.vs/MainCarRunner/v17/.suo
Normal file
BIN
MainCarRunner/.vs/MainCarRunner/v17/.suo
Normal file
Binary file not shown.
BIN
MainCarRunner/.vs/MainCarRunner/v17/Browse.VC.db
Normal file
BIN
MainCarRunner/.vs/MainCarRunner/v17/Browse.VC.db
Normal file
Binary file not shown.
BIN
MainCarRunner/.vs/MainCarRunner/v17/Preview/Browse.VC.db
Normal file
BIN
MainCarRunner/.vs/MainCarRunner/v17/Preview/Browse.VC.db
Normal file
Binary file not shown.
BIN
MainCarRunner/.vs/MainCarRunner/v17/Preview/Browse.VC.db-shm
Normal file
BIN
MainCarRunner/.vs/MainCarRunner/v17/Preview/Browse.VC.db-shm
Normal file
Binary file not shown.
BIN
MainCarRunner/.vs/MainCarRunner/v17/Preview/Browse.VC.opendb
Normal file
BIN
MainCarRunner/.vs/MainCarRunner/v17/Preview/Browse.VC.opendb
Normal file
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.
31
MainCarRunner/MainCarRunner.sln
Normal file
31
MainCarRunner/MainCarRunner.sln
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.3.32804.467
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MainCarRunner", "MainCarRunner\MainCarRunner.vcxproj", "{77AEFD24-DB8B-4FBD-8456-441A897012A5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{77AEFD24-DB8B-4FBD-8456-441A897012A5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{77AEFD24-DB8B-4FBD-8456-441A897012A5}.Debug|x64.Build.0 = Debug|x64
|
||||
{77AEFD24-DB8B-4FBD-8456-441A897012A5}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{77AEFD24-DB8B-4FBD-8456-441A897012A5}.Debug|x86.Build.0 = Debug|Win32
|
||||
{77AEFD24-DB8B-4FBD-8456-441A897012A5}.Release|x64.ActiveCfg = Release|x64
|
||||
{77AEFD24-DB8B-4FBD-8456-441A897012A5}.Release|x64.Build.0 = Release|x64
|
||||
{77AEFD24-DB8B-4FBD-8456-441A897012A5}.Release|x86.ActiveCfg = Release|Win32
|
||||
{77AEFD24-DB8B-4FBD-8456-441A897012A5}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E0EC1F10-AA8D-41A4-AAFB-C713621A26FD}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
373
MainCarRunner/MainCarRunner/MainCarRunner.cpp
Normal file
373
MainCarRunner/MainCarRunner/MainCarRunner.cpp
Normal file
@@ -0,0 +1,373 @@
|
||||
/* MainCarRunner.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
|
||||
BY 王昱博
|
||||
*/
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#pragma warning(disable : 4996)
|
||||
|
||||
/*
|
||||
XY Map
|
||||
x+--------------------------->
|
||||
y
|
||||
+ A1 B1 C1 D1 E1 F1 G1
|
||||
| A2 B2 C2 D2 E2 F2 G2
|
||||
| A3 B3 C3 D3 E3 F3 G3
|
||||
| A4 B4 C4 D4 E4 F4 G4
|
||||
| A5 B5 C5 D5 E5 F5 G5
|
||||
| A6 B6 C6 D6 E6 F6 G6
|
||||
⬇ A7 B7 C7 D7 E7 F7 G7
|
||||
*/
|
||||
|
||||
enum class TurnDirection
|
||||
{
|
||||
Null,
|
||||
Left,
|
||||
Right
|
||||
};
|
||||
|
||||
enum class CarHeadPosition
|
||||
{
|
||||
X_Positive,
|
||||
Y_Positive,
|
||||
X_Negitive,
|
||||
Y_Negitive
|
||||
};
|
||||
|
||||
class MapPoint
|
||||
{
|
||||
private:
|
||||
int x, y;
|
||||
public:
|
||||
MapPoint();
|
||||
MapPoint(int x, int y);
|
||||
public:
|
||||
int GetX();
|
||||
int GetY();
|
||||
void SetX(int x);
|
||||
void SetY(int y);
|
||||
bool NeedTurn(MapPoint next, CarHeadPosition pos);
|
||||
TurnDirection CalcTurnDirection(MapPoint next, CarHeadPosition pos);
|
||||
public:
|
||||
MapPoint operator=(const MapPoint& obj);
|
||||
bool operator==(const MapPoint& obj);
|
||||
};
|
||||
|
||||
std::map<std::string, MapPoint> std_points =
|
||||
{
|
||||
{"A1", MapPoint(0,0)},
|
||||
{"A2", MapPoint(0,1)},
|
||||
{"A3", MapPoint(0,2)},
|
||||
{"A4", MapPoint(0,3)},
|
||||
{"A5", MapPoint(0,4)},
|
||||
{"A6", MapPoint(0,5)},
|
||||
{"A7", MapPoint(0,6)},
|
||||
{"B1", MapPoint(1,0)},
|
||||
{"B2", MapPoint(1,1)},
|
||||
{"B3", MapPoint(1,2)},
|
||||
{"B4", MapPoint(1,3)},
|
||||
{"B5", MapPoint(1,4)},
|
||||
{"B6", MapPoint(1,5)},
|
||||
{"B7", MapPoint(1,6)},
|
||||
{"C1", MapPoint(2,0)},
|
||||
{"C2", MapPoint(2,1)},
|
||||
{"C3", MapPoint(2,2)},
|
||||
{"C4", MapPoint(2,3)},
|
||||
{"C5", MapPoint(2,4)},
|
||||
{"C6", MapPoint(2,5)},
|
||||
{"C7", MapPoint(2,6)},
|
||||
{"D1", MapPoint(3,0)},
|
||||
{"D2", MapPoint(3,1)},
|
||||
{"D3", MapPoint(3,2)},
|
||||
{"D4", MapPoint(3,3)},
|
||||
{"D5", MapPoint(3,4)},
|
||||
{"D6", MapPoint(3,5)},
|
||||
{"D7", MapPoint(3,6)},
|
||||
{"E1", MapPoint(4,0)},
|
||||
{"E2", MapPoint(4,1)},
|
||||
{"E3", MapPoint(4,2)},
|
||||
{"E4", MapPoint(4,3)},
|
||||
{"E5", MapPoint(4,4)},
|
||||
{"E6", MapPoint(4,5)},
|
||||
{"E7", MapPoint(4,6)},
|
||||
{"F1", MapPoint(5,0)},
|
||||
{"F2", MapPoint(5,1)},
|
||||
{"F3", MapPoint(5,2)},
|
||||
{"F4", MapPoint(5,3)},
|
||||
{"F5", MapPoint(5,4)},
|
||||
{"F6", MapPoint(5,5)},
|
||||
{"F7", MapPoint(5,6)},
|
||||
{"G1", MapPoint(6,0)},
|
||||
{"G2", MapPoint(6,1)},
|
||||
{"G3", MapPoint(6,2)},
|
||||
{"G4", MapPoint(6,3)},
|
||||
{"G5", MapPoint(6,4)},
|
||||
{"G6", MapPoint(6,5)},
|
||||
{"G7", MapPoint(6,6)}
|
||||
};
|
||||
|
||||
using PointList = std::vector<MapPoint>;
|
||||
using CommandList = std::vector<std::string>;
|
||||
|
||||
const std::string move_forward = "MasterCar_SmartRunMP(MasterCar_GoSpeed,MasterCar_GoMpValue);";
|
||||
const std::string move_to_black_line = "MasterCar_SmartRun(MasterCar_GoSpeed);";
|
||||
const std::string turn_left = "MasterCar_Left(MasterCar_TrunSpeed,1);";
|
||||
const std::string turn_right = "MasterCar_Right(MasterCar_TrunSpeed,1);";
|
||||
const std::string move_backward = "MasterCar_BackMP(MasterCar_GoSpeed,800);";
|
||||
|
||||
MapPoint::MapPoint()
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
MapPoint::MapPoint(int x, int y)
|
||||
{
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
}
|
||||
|
||||
int MapPoint::GetX()
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
int MapPoint::GetY()
|
||||
{
|
||||
return y;
|
||||
}
|
||||
|
||||
void MapPoint::SetX(int x)
|
||||
{
|
||||
this->x = x;
|
||||
}
|
||||
|
||||
void MapPoint::SetY(int y)
|
||||
{
|
||||
this->y = y;
|
||||
}
|
||||
|
||||
bool MapPoint::NeedTurn(MapPoint next, CarHeadPosition pos)
|
||||
{
|
||||
if ((pos == CarHeadPosition::X_Positive) || (pos == CarHeadPosition::X_Negitive))
|
||||
return (x != next.GetX());
|
||||
else
|
||||
return (y != next.GetY());
|
||||
}
|
||||
|
||||
TurnDirection MapPoint::CalcTurnDirection(MapPoint next, CarHeadPosition pos)
|
||||
{
|
||||
TurnDirection direction;
|
||||
if (x == next.GetX())
|
||||
{
|
||||
if (y < next.GetY())
|
||||
direction = TurnDirection::Right;
|
||||
else if (y > next.GetY())
|
||||
direction = TurnDirection::Left;
|
||||
else
|
||||
direction = TurnDirection::Null;
|
||||
}
|
||||
else if (y == next.GetY())
|
||||
{
|
||||
if (x < next.GetX())
|
||||
direction = TurnDirection::Right;
|
||||
else if (x > next.GetX())
|
||||
direction = TurnDirection::Left;
|
||||
else
|
||||
direction = TurnDirection::Null;
|
||||
}
|
||||
else
|
||||
direction = TurnDirection::Null;
|
||||
if ((pos == CarHeadPosition::X_Negitive) || (pos == CarHeadPosition::Y_Negitive))
|
||||
{
|
||||
if (direction == TurnDirection::Left)
|
||||
direction = TurnDirection::Right;
|
||||
else if (direction == TurnDirection::Right)
|
||||
direction = TurnDirection::Left;
|
||||
}
|
||||
return direction;
|
||||
}
|
||||
|
||||
MapPoint MapPoint::operator=(const MapPoint& obj)
|
||||
{
|
||||
this->x = obj.x;
|
||||
this->y = obj.y;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
bool MapPoint::operator==(const MapPoint& obj)
|
||||
{
|
||||
return ((x == obj.x) && (y == obj.y));
|
||||
}
|
||||
|
||||
std::string ReverseMapping(MapPoint point)
|
||||
{
|
||||
for (auto& [key, value] : std_points)
|
||||
if (value == point)
|
||||
return key;
|
||||
return "";
|
||||
}
|
||||
|
||||
void ChangePositon(CarHeadPosition& pos, TurnDirection turn)
|
||||
{
|
||||
switch (pos)
|
||||
{
|
||||
case CarHeadPosition::X_Positive:
|
||||
if (turn == TurnDirection::Left)
|
||||
pos = CarHeadPosition::Y_Negitive;
|
||||
else if (turn == TurnDirection::Right)
|
||||
pos = CarHeadPosition::Y_Positive;
|
||||
break;
|
||||
case CarHeadPosition::X_Negitive:
|
||||
if (turn == TurnDirection::Left)
|
||||
pos = CarHeadPosition::Y_Positive;
|
||||
else if (turn == TurnDirection::Right)
|
||||
pos = CarHeadPosition::Y_Negitive;
|
||||
break;
|
||||
case CarHeadPosition::Y_Positive:
|
||||
if (turn == TurnDirection::Left)
|
||||
pos = CarHeadPosition::X_Positive;
|
||||
else if (turn == TurnDirection::Right)
|
||||
pos = CarHeadPosition::X_Negitive;
|
||||
break;
|
||||
case CarHeadPosition::Y_Negitive:
|
||||
if (turn == TurnDirection::Left)
|
||||
pos = CarHeadPosition::X_Negitive;
|
||||
else if (turn == TurnDirection::Right)
|
||||
pos = CarHeadPosition::X_Positive;
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
CarHeadPosition Int2Position(int pos)
|
||||
{
|
||||
switch (pos)
|
||||
{
|
||||
case 0:
|
||||
return CarHeadPosition::X_Positive;
|
||||
case 1:
|
||||
return CarHeadPosition::X_Negitive;
|
||||
case 2:
|
||||
return CarHeadPosition::Y_Positive;
|
||||
default:
|
||||
return CarHeadPosition::Y_Negitive;
|
||||
}
|
||||
}
|
||||
|
||||
std::string Int2PositionString(int pos)
|
||||
{
|
||||
switch (pos)
|
||||
{
|
||||
case 0:
|
||||
return "X+";
|
||||
case 1:
|
||||
return "X-";
|
||||
case 2:
|
||||
return "Y+";
|
||||
default:
|
||||
return "Y-";
|
||||
}
|
||||
}
|
||||
|
||||
std::string GenereateComment(MapPoint last, MapPoint now)
|
||||
{
|
||||
return "//" + ReverseMapping(last) + " to " + ReverseMapping(now);
|
||||
}
|
||||
|
||||
PointList DecodeRoute(std::string route)
|
||||
{
|
||||
PointList list;
|
||||
std::string temp;
|
||||
std::vector<std::string> points;
|
||||
for (char ch : route)
|
||||
{
|
||||
if (ch == '-')
|
||||
{
|
||||
points.push_back(temp);
|
||||
temp.clear();
|
||||
}
|
||||
else
|
||||
temp.push_back(ch);
|
||||
}
|
||||
//points.push_back(temp); //这里是最后一个点,但生成的时候不需要用到,因此屏蔽掉
|
||||
for (std::string point : points)
|
||||
{
|
||||
if (std_points.find(point) != std_points.end())
|
||||
list.push_back(std_points.at(point));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
CommandList GetCommandList(PointList points, CarHeadPosition pos)
|
||||
{
|
||||
CommandList cmd_list;
|
||||
MapPoint last_point = points[0];
|
||||
for (int i = 1; i < points.size(); i++)
|
||||
{
|
||||
//printf("Move From (%d,%d) To (%d,%d)\n", last_point.GetX(), last_point.GetY(), points[i].GetX(), points[i].GetY());
|
||||
if ((i != 1) && (cmd_list[cmd_list.size() - 1].find("Trun") == -1))
|
||||
cmd_list.push_back(move_forward);
|
||||
cmd_list.push_back(GenereateComment(last_point, points[i]));
|
||||
if (last_point.NeedTurn(points[i], pos))
|
||||
{
|
||||
switch (last_point.CalcTurnDirection(points[i], pos))
|
||||
{
|
||||
case TurnDirection::Left:
|
||||
cmd_list.push_back(turn_left);
|
||||
ChangePositon(pos, TurnDirection::Left);
|
||||
break;
|
||||
case TurnDirection::Right:
|
||||
cmd_list.push_back(turn_right);
|
||||
ChangePositon(pos, TurnDirection::Right);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
cmd_list.push_back(move_to_black_line);
|
||||
}
|
||||
else
|
||||
cmd_list.push_back(move_to_black_line);
|
||||
//std::cout << cmd_list[cmd_list.size() - 1] << std::endl;
|
||||
last_point = points[i];
|
||||
}
|
||||
return cmd_list;
|
||||
}
|
||||
|
||||
std::string Point2String(MapPoint point)
|
||||
{
|
||||
char str[20] = { 0 };
|
||||
sprintf(str, "(%d,%d)", point.GetX(), point.GetY());
|
||||
return str;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
std::string route;
|
||||
int current_pos = -1;
|
||||
std::cout << "----------主车路径代码生成程序----------" << std::endl;
|
||||
std::cout << "输入说明:车头朝向需要反转输入(如:朝向Y-,则输入X+)" << std::endl;
|
||||
do
|
||||
{
|
||||
std::cout << "输入车头朝向(0: X+,1: X-,2: Y+,3: Y-)> ";
|
||||
std::cin >> current_pos;
|
||||
} while ((current_pos < 0) || (current_pos > 3));
|
||||
std::cout << "输入行进路线(以‘-’分隔)> ";
|
||||
do
|
||||
{
|
||||
std::getline(std::cin, route);
|
||||
} while (route.size() < 10);
|
||||
clock_t start = clock();
|
||||
std::cout << "路径代码生成中 【初始方向:" << Int2PositionString(current_pos) << ",路径:" << route << "】" << std::endl;
|
||||
PointList route_point_list = DecodeRoute(route);
|
||||
CarHeadPosition car_head_pos = Int2Position(current_pos);
|
||||
CommandList cmd_list = GetCommandList(route_point_list, car_head_pos);
|
||||
std::cout << "路径代码:" << std::endl;
|
||||
for (auto& cmd : cmd_list)
|
||||
std::cout << cmd << std::endl;
|
||||
clock_t stop = clock();
|
||||
std::cout << "路径代码生成完毕,共耗时:" << (stop - start) / (double)CLOCKS_PER_SEC << "秒。" << std::endl;
|
||||
return 0;
|
||||
}
|
136
MainCarRunner/MainCarRunner/MainCarRunner.vcxproj
Normal file
136
MainCarRunner/MainCarRunner/MainCarRunner.vcxproj
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{77aefd24-db8b-4fbd-8456-441a897012a5}</ProjectGuid>
|
||||
<RootNamespace>MainCarRunner</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="MainCarRunner.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
22
MainCarRunner/MainCarRunner/MainCarRunner.vcxproj.filters
Normal file
22
MainCarRunner/MainCarRunner/MainCarRunner.vcxproj.filters
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="MainCarRunner.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
4
MainCarRunner/MainCarRunner/MainCarRunner.vcxproj.user
Normal file
4
MainCarRunner/MainCarRunner/MainCarRunner.vcxproj.user
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>D:\嵌入式开发\路径自动生成\MainCarRunner\x64\Release\MainCarRunner.exe</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
BIN
MainCarRunner/MainCarRunner/x64/Release/MainCarRunner.iobj
Normal file
BIN
MainCarRunner/MainCarRunner/x64/Release/MainCarRunner.iobj
Normal file
Binary file not shown.
BIN
MainCarRunner/MainCarRunner/x64/Release/MainCarRunner.ipdb
Normal file
BIN
MainCarRunner/MainCarRunner/x64/Release/MainCarRunner.ipdb
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
MainCarRunner.cpp
|
||||
正在生成代码
|
||||
Previous IPDB and IOBJ mismatch, fall back to full compilation.
|
||||
All 10 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
MainCarRunner.vcxproj -> D:\嵌入式开发\路径自动生成\MainCarRunner\x64\Release\MainCarRunner.exe
|
BIN
MainCarRunner/MainCarRunner/x64/Release/MainCarRunner.obj
Normal file
BIN
MainCarRunner/MainCarRunner/x64/Release/MainCarRunner.obj
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.35.32019:TargetPlatformVersion=10.0.22000.0:
|
||||
Release|x64|D:\嵌入式开发\路径自动生成\MainCarRunner\|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
MainCarRunner/MainCarRunner/x64/Release/vc143.pdb
Normal file
BIN
MainCarRunner/MainCarRunner/x64/Release/vc143.pdb
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
|
BIN
MainCarRunner/x64/Release/MainCarRunner.exe
Normal file
BIN
MainCarRunner/x64/Release/MainCarRunner.exe
Normal file
Binary file not shown.
BIN
MainCarRunner/x64/Release/MainCarRunner.pdb
Normal file
BIN
MainCarRunner/x64/Release/MainCarRunner.pdb
Normal file
Binary file not shown.
7
主-从车路径代码生成程序(MCR)/FunctionConfig.json
Normal file
7
主-从车路径代码生成程序(MCR)/FunctionConfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"MoveBackward" : "MasterCar_BackMP(MasterCar_GoSpeed,800);",
|
||||
"MoveForward" : "MasterCar_SmartRunMP(MasterCar_GoSpeed,MasterCar_GoMpValue);",
|
||||
"MoveToBalckLine" : "MasterCar_SmartRun(MasterCar_GoSpeed);",
|
||||
"TurnLeft" : "MasterCar_Left(MasterCar_TrunSpeed,1);",
|
||||
"TurnRight" : "MasterCar_Right(MasterCar_TrunSpeed,1);"
|
||||
}
|
BIN
主-从车路径代码生成程序(MCR)/MainCarRunnerGUI.exe
Normal file
BIN
主-从车路径代码生成程序(MCR)/MainCarRunnerGUI.exe
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/concrt140.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/concrt140.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/jsoncpp.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/jsoncpp.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140chs.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140chs.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140cht.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140cht.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140deu.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140deu.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140enu.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140enu.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140esn.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140esn.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140fra.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140fra.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140ita.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140ita.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140jpn.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140jpn.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140kor.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140kor.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140rus.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140rus.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfc140u.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfc140u.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfcm140.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfcm140.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/mfcm140u.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/mfcm140u.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/msvcp140.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/msvcp140.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/msvcp140_1.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/msvcp140_1.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/msvcp140_2.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/msvcp140_2.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/msvcp140_atomic_wait.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/msvcp140_atomic_wait.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/msvcp140_codecvt_ids.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/msvcp140_codecvt_ids.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/vcamp140.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/vcamp140.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/vccorlib140.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/vccorlib140.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/vcomp140.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/vcomp140.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/vcruntime140.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/vcruntime140.dll
Normal file
Binary file not shown.
BIN
主-从车路径代码生成程序(MCR)/vcruntime140_1.dll
Normal file
BIN
主-从车路径代码生成程序(MCR)/vcruntime140_1.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user