|
@@ -20,6 +20,11 @@ static char gstr_yaml[256];
|
|
|
static char gstr_modulename[256];
|
|
|
static char gstr_devmode[256];
|
|
|
static char gstr_devtype[256];
|
|
|
+static double gignore_x_max;
|
|
|
+static double gignore_x_min;
|
|
|
+static double gignore_y_max;
|
|
|
+static double gignore_y_min;
|
|
|
+static bool gbuseignore = false;
|
|
|
|
|
|
/**
|
|
|
* @brief print_useage
|
|
@@ -158,6 +163,44 @@ void decodeyaml(const char * stryaml)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if(config["ignore_x_min"])
|
|
|
+ {
|
|
|
+ char strdata[256];
|
|
|
+ strncpy(strdata,config["ignore_x_min"].as<std::string>().data(),255);
|
|
|
+ gignore_x_min = atof(strdata);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(config["ignore_x_max"])
|
|
|
+ {
|
|
|
+ char strdata[256];
|
|
|
+ strncpy(strdata,config["ignore_x_max"].as<std::string>().data(),255);
|
|
|
+ gignore_x_max = atof(strdata);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(config["ignore_y_min"])
|
|
|
+ {
|
|
|
+ char strdata[256];
|
|
|
+ strncpy(strdata,config["ignore_y_min"].as<std::string>().data(),255);
|
|
|
+ gignore_y_min = atof(strdata);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(config["ignore_y_max"])
|
|
|
+ {
|
|
|
+ char strdata[256];
|
|
|
+ strncpy(strdata,config["ignore_y_max"].as<std::string>().data(),255);
|
|
|
+ gignore_y_max = atof(strdata);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(config["useignore"])
|
|
|
+ {
|
|
|
+ char strdata[256];
|
|
|
+ strncpy(strdata,config["useignore"].as<std::string>().data(),255);
|
|
|
+ if(strncmp(strdata,"true",256) == 0)
|
|
|
+ {
|
|
|
+ gbuseignore = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if(config["memname"])
|
|
|
{
|
|
@@ -226,6 +269,8 @@ int main(int argc, char *argv[])
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+// snprintf(gstr_yaml,256,"driver_lidar_leishen_chx.yaml");
|
|
|
+
|
|
|
if(strnlen(gstr_yaml,255)>1)
|
|
|
{
|
|
|
decodeyaml(gstr_yaml);
|
|
@@ -235,7 +280,9 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
leishenchx * pleishenchx = new leishenchx(gstr_memname,atof(gstr_rollang),atof(gstr_inclinationang_xaxis),
|
|
|
atof(gstr_inclinationang_yaxis),atoi(gstr_devmode),static_cast<unsigned short>(atoi(gstr_port)),
|
|
|
- static_cast<unsigned short>(atoi(gstr_devport)),std::string(gstr_devtype));
|
|
|
+ static_cast<unsigned short>(atoi(gstr_devport)),std::string(gstr_devtype),
|
|
|
+ gbuseignore,gignore_x_min,gignore_x_max,
|
|
|
+ gignore_y_min,gignore_y_max);
|
|
|
(void)pleishenchx;
|
|
|
|
|
|
return a.exec();
|