浏览代码

修复雷达没有保存文件的问题.

zx 5 年之前
父节点
当前提交
9b9d6403b5

+ 1 - 2
laser/LivoxLaser.cpp

@@ -87,10 +87,9 @@ Error_manager CLivoxLaser::execute_task(Task_Base* p_laser_task)
 	{
 		m_frame_maxnum=mp_laser_task->get_task_frame_maxnum();
 
-
 		//设置保存文件的路径
 		std::string save_path = mp_laser_task->get_task_save_path();
-		t_error = set_open_save_path(save_path);
+		t_error = set_open_save_path(save_path,m_laser_param.is_save_txt());
 		if ( t_error != Error_code::SUCCESS )
 		{
 			//文件保存文件的路径的设置 允许失败。继续后面的动作

+ 140 - 65
laser/laser_parameter.pb.cc

@@ -109,11 +109,11 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Laser_proto::laser_parameter, sn_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Laser_proto::laser_parameter, frame_num_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Laser_proto::laser_parameter, type_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Laser_proto::laser_parameter, is_save_banary_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Laser_proto::laser_parameter, is_save_txt_),
   0,
   3,
   4,
-  13,
-  14,
   15,
   16,
   17,
@@ -124,6 +124,8 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   22,
   23,
   24,
+  25,
+  26,
   5,
   6,
   7,
@@ -131,10 +133,12 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   9,
   10,
   11,
-  12,
+  13,
   1,
-  25,
+  27,
   2,
+  12,
+  14,
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Laser_proto::Laser_parameter_all, _has_bits_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Laser_proto::Laser_parameter_all, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -144,8 +148,8 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
-  { 0, 31, sizeof(::Laser_proto::laser_parameter)},
-  { 57, 63, sizeof(::Laser_proto::Laser_parameter_all)},
+  { 0, 33, sizeof(::Laser_proto::laser_parameter)},
+  { 61, 67, sizeof(::Laser_proto::Laser_parameter_all)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -175,7 +179,7 @@ void protobuf_RegisterTypes(const ::std::string&) {
 void AddDescriptorsImpl() {
   InitDefaults();
   static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
-      "\n\025laser_parameter.proto\022\013Laser_proto\"\266\004\n"
+      "\n\025laser_parameter.proto\022\013Laser_proto\"\360\004\n"
       "\017laser_parameter\022\020\n\010laser_ip\030\001 \001(\t\022\022\n\nla"
       "ser_port\030\002 \001(\003\022\031\n\021laser_port_remote\030\003 \001("
       "\003\022\022\n\007mat_r00\030\004 \001(\001:\0011\022\022\n\007mat_r01\030\005 \001(\001:\001"
@@ -190,12 +194,13 @@ void AddDescriptorsImpl() {
       "nslation_z\030\025 \001(\001\022\030\n\rinstall_angle\030\026 \001(\001:"
       "\0010\022\034\n\016scan_direction\030\027 \001(\010:\004true\022\n\n\002sn\030\030"
       " \001(\t\022\027\n\tframe_num\030\031 \001(\003:\0043000\022\016\n\004type\030\032 "
-      "\001(\t:\000\"M\n\023Laser_parameter_all\0226\n\020laser_pa"
-      "rameters\030\001 \003(\0132\034.Laser_proto.laser_param"
-      "eter"
+      "\001(\t:\000\022\035\n\016is_save_banary\030\033 \001(\010:\005false\022\031\n\013"
+      "is_save_txt\030\034 \001(\010:\004true\"M\n\023Laser_paramet"
+      "er_all\0226\n\020laser_parameters\030\001 \003(\0132\034.Laser"
+      "_proto.laser_parameter"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 684);
+      descriptor, 742);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "laser_parameter.proto", &protobuf_RegisterTypes);
 }
@@ -244,6 +249,8 @@ const int laser_parameter::kScanDirectionFieldNumber;
 const int laser_parameter::kSnFieldNumber;
 const int laser_parameter::kFrameNumFieldNumber;
 const int laser_parameter::kTypeFieldNumber;
+const int laser_parameter::kIsSaveBanaryFieldNumber;
+const int laser_parameter::kIsSaveTxtFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 laser_parameter::laser_parameter()
@@ -284,9 +291,10 @@ void laser_parameter::SharedCtor() {
   sn_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   ::memset(&laser_port_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&install_angle_) -
-      reinterpret_cast<char*>(&laser_port_)) + sizeof(install_angle_));
+      reinterpret_cast<char*>(&is_save_banary_) -
+      reinterpret_cast<char*>(&laser_port_)) + sizeof(is_save_banary_));
   scan_direction_ = true;
+  is_save_txt_ = true;
   mat_r00_ = 1;
   mat_r01_ = 1;
   mat_r02_ = 1;
@@ -364,24 +372,25 @@ void laser_parameter::Clear() {
   }
   if (cached_has_bits & 65280u) {
     ::memset(&translation_x_, 0, static_cast<size_t>(
-        reinterpret_cast<char*>(&install_angle_) -
-        reinterpret_cast<char*>(&translation_x_)) + sizeof(install_angle_));
+        reinterpret_cast<char*>(&is_save_banary_) -
+        reinterpret_cast<char*>(&translation_x_)) + sizeof(is_save_banary_));
     scan_direction_ = true;
+    is_save_txt_ = true;
     mat_r00_ = 1;
-    mat_r01_ = 1;
-    mat_r02_ = 1;
   }
   if (cached_has_bits & 16711680u) {
+    mat_r01_ = 1;
+    mat_r02_ = 1;
     mat_r03_ = 1;
     mat_r10_ = 1;
     mat_r11_ = 1;
     mat_r12_ = 1;
     mat_r13_ = 1;
     mat_r20_ = 1;
+  }
+  if (cached_has_bits & 251658240u) {
     mat_r21_ = 1;
     mat_r22_ = 1;
-  }
-  if (cached_has_bits & 50331648u) {
     mat_r23_ = 1;
     frame_num_ = GOOGLE_LONGLONG(3000);
   }
@@ -769,6 +778,34 @@ bool laser_parameter::MergePartialFromCodedStream(
         break;
       }
 
+      // optional bool is_save_banary = 27 [default = false];
+      case 27: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(216u /* 216 & 0xFF */)) {
+          set_has_is_save_banary();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+                 input, &is_save_banary_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // optional bool is_save_txt = 28 [default = true];
+      case 28: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(224u /* 224 & 0xFF */)) {
+          set_has_is_save_txt();
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+                 input, &is_save_txt_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -817,62 +854,62 @@ void laser_parameter::SerializeWithCachedSizes(
   }
 
   // optional double mat_r00 = 4 [default = 1];
-  if (cached_has_bits & 0x00002000u) {
+  if (cached_has_bits & 0x00008000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->mat_r00(), output);
   }
 
   // optional double mat_r01 = 5 [default = 1];
-  if (cached_has_bits & 0x00004000u) {
+  if (cached_has_bits & 0x00010000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->mat_r01(), output);
   }
 
   // optional double mat_r02 = 6 [default = 1];
-  if (cached_has_bits & 0x00008000u) {
+  if (cached_has_bits & 0x00020000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->mat_r02(), output);
   }
 
   // optional double mat_r03 = 7 [default = 1];
-  if (cached_has_bits & 0x00010000u) {
+  if (cached_has_bits & 0x00040000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(7, this->mat_r03(), output);
   }
 
   // optional double mat_r10 = 8 [default = 1];
-  if (cached_has_bits & 0x00020000u) {
+  if (cached_has_bits & 0x00080000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(8, this->mat_r10(), output);
   }
 
   // optional double mat_r11 = 9 [default = 1];
-  if (cached_has_bits & 0x00040000u) {
+  if (cached_has_bits & 0x00100000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(9, this->mat_r11(), output);
   }
 
   // optional double mat_r12 = 10 [default = 1];
-  if (cached_has_bits & 0x00080000u) {
+  if (cached_has_bits & 0x00200000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(10, this->mat_r12(), output);
   }
 
   // optional double mat_r13 = 11 [default = 1];
-  if (cached_has_bits & 0x00100000u) {
+  if (cached_has_bits & 0x00400000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(11, this->mat_r13(), output);
   }
 
   // optional double mat_r20 = 12 [default = 1];
-  if (cached_has_bits & 0x00200000u) {
+  if (cached_has_bits & 0x00800000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->mat_r20(), output);
   }
 
   // optional double mat_r21 = 13 [default = 1];
-  if (cached_has_bits & 0x00400000u) {
+  if (cached_has_bits & 0x01000000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(13, this->mat_r21(), output);
   }
 
   // optional double mat_r22 = 14 [default = 1];
-  if (cached_has_bits & 0x00800000u) {
+  if (cached_has_bits & 0x02000000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(14, this->mat_r22(), output);
   }
 
   // optional double mat_r23 = 15 [default = 1];
-  if (cached_has_bits & 0x01000000u) {
+  if (cached_has_bits & 0x04000000u) {
     ::google::protobuf::internal::WireFormatLite::WriteDouble(15, this->mat_r23(), output);
   }
 
@@ -912,7 +949,7 @@ void laser_parameter::SerializeWithCachedSizes(
   }
 
   // optional bool scan_direction = 23 [default = true];
-  if (cached_has_bits & 0x00001000u) {
+  if (cached_has_bits & 0x00002000u) {
     ::google::protobuf::internal::WireFormatLite::WriteBool(23, this->scan_direction(), output);
   }
 
@@ -927,7 +964,7 @@ void laser_parameter::SerializeWithCachedSizes(
   }
 
   // optional int64 frame_num = 25 [default = 3000];
-  if (cached_has_bits & 0x02000000u) {
+  if (cached_has_bits & 0x08000000u) {
     ::google::protobuf::internal::WireFormatLite::WriteInt64(25, this->frame_num(), output);
   }
 
@@ -941,6 +978,16 @@ void laser_parameter::SerializeWithCachedSizes(
       26, this->type(), output);
   }
 
+  // optional bool is_save_banary = 27 [default = false];
+  if (cached_has_bits & 0x00001000u) {
+    ::google::protobuf::internal::WireFormatLite::WriteBool(27, this->is_save_banary(), output);
+  }
+
+  // optional bool is_save_txt = 28 [default = true];
+  if (cached_has_bits & 0x00004000u) {
+    ::google::protobuf::internal::WireFormatLite::WriteBool(28, this->is_save_txt(), output);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         _internal_metadata_.unknown_fields(), output);
@@ -978,62 +1025,62 @@ void laser_parameter::SerializeWithCachedSizes(
   }
 
   // optional double mat_r00 = 4 [default = 1];
-  if (cached_has_bits & 0x00002000u) {
+  if (cached_has_bits & 0x00008000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->mat_r00(), target);
   }
 
   // optional double mat_r01 = 5 [default = 1];
-  if (cached_has_bits & 0x00004000u) {
+  if (cached_has_bits & 0x00010000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->mat_r01(), target);
   }
 
   // optional double mat_r02 = 6 [default = 1];
-  if (cached_has_bits & 0x00008000u) {
+  if (cached_has_bits & 0x00020000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->mat_r02(), target);
   }
 
   // optional double mat_r03 = 7 [default = 1];
-  if (cached_has_bits & 0x00010000u) {
+  if (cached_has_bits & 0x00040000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(7, this->mat_r03(), target);
   }
 
   // optional double mat_r10 = 8 [default = 1];
-  if (cached_has_bits & 0x00020000u) {
+  if (cached_has_bits & 0x00080000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(8, this->mat_r10(), target);
   }
 
   // optional double mat_r11 = 9 [default = 1];
-  if (cached_has_bits & 0x00040000u) {
+  if (cached_has_bits & 0x00100000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(9, this->mat_r11(), target);
   }
 
   // optional double mat_r12 = 10 [default = 1];
-  if (cached_has_bits & 0x00080000u) {
+  if (cached_has_bits & 0x00200000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(10, this->mat_r12(), target);
   }
 
   // optional double mat_r13 = 11 [default = 1];
-  if (cached_has_bits & 0x00100000u) {
+  if (cached_has_bits & 0x00400000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(11, this->mat_r13(), target);
   }
 
   // optional double mat_r20 = 12 [default = 1];
-  if (cached_has_bits & 0x00200000u) {
+  if (cached_has_bits & 0x00800000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(12, this->mat_r20(), target);
   }
 
   // optional double mat_r21 = 13 [default = 1];
-  if (cached_has_bits & 0x00400000u) {
+  if (cached_has_bits & 0x01000000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(13, this->mat_r21(), target);
   }
 
   // optional double mat_r22 = 14 [default = 1];
-  if (cached_has_bits & 0x00800000u) {
+  if (cached_has_bits & 0x02000000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(14, this->mat_r22(), target);
   }
 
   // optional double mat_r23 = 15 [default = 1];
-  if (cached_has_bits & 0x01000000u) {
+  if (cached_has_bits & 0x04000000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(15, this->mat_r23(), target);
   }
 
@@ -1073,7 +1120,7 @@ void laser_parameter::SerializeWithCachedSizes(
   }
 
   // optional bool scan_direction = 23 [default = true];
-  if (cached_has_bits & 0x00001000u) {
+  if (cached_has_bits & 0x00002000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(23, this->scan_direction(), target);
   }
 
@@ -1089,7 +1136,7 @@ void laser_parameter::SerializeWithCachedSizes(
   }
 
   // optional int64 frame_num = 25 [default = 3000];
-  if (cached_has_bits & 0x02000000u) {
+  if (cached_has_bits & 0x08000000u) {
     target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(25, this->frame_num(), target);
   }
 
@@ -1104,6 +1151,16 @@ void laser_parameter::SerializeWithCachedSizes(
         26, this->type(), target);
   }
 
+  // optional bool is_save_banary = 27 [default = false];
+  if (cached_has_bits & 0x00001000u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(27, this->is_save_banary(), target);
+  }
+
+  // optional bool is_save_txt = 28 [default = true];
+  if (cached_has_bits & 0x00004000u) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(28, this->is_save_txt(), target);
+  }
+
   if (_internal_metadata_.have_unknown_fields()) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         _internal_metadata_.unknown_fields(), target);
@@ -1194,16 +1251,28 @@ size_t laser_parameter::ByteSizeLong() const {
       total_size += 2 + 8;
     }
 
+    // optional bool is_save_banary = 27 [default = false];
+    if (has_is_save_banary()) {
+      total_size += 2 + 1;
+    }
+
     // optional bool scan_direction = 23 [default = true];
     if (has_scan_direction()) {
       total_size += 2 + 1;
     }
 
+    // optional bool is_save_txt = 28 [default = true];
+    if (has_is_save_txt()) {
+      total_size += 2 + 1;
+    }
+
     // optional double mat_r00 = 4 [default = 1];
     if (has_mat_r00()) {
       total_size += 1 + 8;
     }
 
+  }
+  if (_has_bits_[16 / 32] & 16711680u) {
     // optional double mat_r01 = 5 [default = 1];
     if (has_mat_r01()) {
       total_size += 1 + 8;
@@ -1214,8 +1283,6 @@ size_t laser_parameter::ByteSizeLong() const {
       total_size += 1 + 8;
     }
 
-  }
-  if (_has_bits_[16 / 32] & 16711680u) {
     // optional double mat_r03 = 7 [default = 1];
     if (has_mat_r03()) {
       total_size += 1 + 8;
@@ -1246,6 +1313,8 @@ size_t laser_parameter::ByteSizeLong() const {
       total_size += 1 + 8;
     }
 
+  }
+  if (_has_bits_[24 / 32] & 251658240u) {
     // optional double mat_r21 = 13 [default = 1];
     if (has_mat_r21()) {
       total_size += 1 + 8;
@@ -1256,8 +1325,6 @@ size_t laser_parameter::ByteSizeLong() const {
       total_size += 1 + 8;
     }
 
-  }
-  if (_has_bits_[24 / 32] & 50331648u) {
     // optional double mat_r23 = 15 [default = 1];
     if (has_mat_r23()) {
       total_size += 1 + 8;
@@ -1345,51 +1412,57 @@ void laser_parameter::MergeFrom(const laser_parameter& from) {
       install_angle_ = from.install_angle_;
     }
     if (cached_has_bits & 0x00001000u) {
-      scan_direction_ = from.scan_direction_;
+      is_save_banary_ = from.is_save_banary_;
     }
     if (cached_has_bits & 0x00002000u) {
-      mat_r00_ = from.mat_r00_;
+      scan_direction_ = from.scan_direction_;
     }
     if (cached_has_bits & 0x00004000u) {
-      mat_r01_ = from.mat_r01_;
+      is_save_txt_ = from.is_save_txt_;
     }
     if (cached_has_bits & 0x00008000u) {
-      mat_r02_ = from.mat_r02_;
+      mat_r00_ = from.mat_r00_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
   if (cached_has_bits & 16711680u) {
     if (cached_has_bits & 0x00010000u) {
-      mat_r03_ = from.mat_r03_;
+      mat_r01_ = from.mat_r01_;
     }
     if (cached_has_bits & 0x00020000u) {
-      mat_r10_ = from.mat_r10_;
+      mat_r02_ = from.mat_r02_;
     }
     if (cached_has_bits & 0x00040000u) {
-      mat_r11_ = from.mat_r11_;
+      mat_r03_ = from.mat_r03_;
     }
     if (cached_has_bits & 0x00080000u) {
-      mat_r12_ = from.mat_r12_;
+      mat_r10_ = from.mat_r10_;
     }
     if (cached_has_bits & 0x00100000u) {
-      mat_r13_ = from.mat_r13_;
+      mat_r11_ = from.mat_r11_;
     }
     if (cached_has_bits & 0x00200000u) {
-      mat_r20_ = from.mat_r20_;
+      mat_r12_ = from.mat_r12_;
     }
     if (cached_has_bits & 0x00400000u) {
-      mat_r21_ = from.mat_r21_;
+      mat_r13_ = from.mat_r13_;
     }
     if (cached_has_bits & 0x00800000u) {
-      mat_r22_ = from.mat_r22_;
+      mat_r20_ = from.mat_r20_;
     }
     _has_bits_[0] |= cached_has_bits;
   }
-  if (cached_has_bits & 50331648u) {
+  if (cached_has_bits & 251658240u) {
     if (cached_has_bits & 0x01000000u) {
-      mat_r23_ = from.mat_r23_;
+      mat_r21_ = from.mat_r21_;
     }
     if (cached_has_bits & 0x02000000u) {
+      mat_r22_ = from.mat_r22_;
+    }
+    if (cached_has_bits & 0x04000000u) {
+      mat_r23_ = from.mat_r23_;
+    }
+    if (cached_has_bits & 0x08000000u) {
       frame_num_ = from.frame_num_;
     }
     _has_bits_[0] |= cached_has_bits;
@@ -1432,7 +1505,9 @@ void laser_parameter::InternalSwap(laser_parameter* other) {
   swap(translation_y_, other->translation_y_);
   swap(translation_z_, other->translation_z_);
   swap(install_angle_, other->install_angle_);
+  swap(is_save_banary_, other->is_save_banary_);
   swap(scan_direction_, other->scan_direction_);
+  swap(is_save_txt_, other->is_save_txt_);
   swap(mat_r00_, other->mat_r00_);
   swap(mat_r01_, other->mat_r01_);
   swap(mat_r02_, other->mat_r02_);

+ 110 - 42
laser/laser_parameter.pb.h

@@ -260,6 +260,13 @@ class laser_parameter : public ::google::protobuf::Message /* @@protoc_insertion
   double install_angle() const;
   void set_install_angle(double value);
 
+  // optional bool is_save_banary = 27 [default = false];
+  bool has_is_save_banary() const;
+  void clear_is_save_banary();
+  static const int kIsSaveBanaryFieldNumber = 27;
+  bool is_save_banary() const;
+  void set_is_save_banary(bool value);
+
   // optional bool scan_direction = 23 [default = true];
   bool has_scan_direction() const;
   void clear_scan_direction();
@@ -267,6 +274,13 @@ class laser_parameter : public ::google::protobuf::Message /* @@protoc_insertion
   bool scan_direction() const;
   void set_scan_direction(bool value);
 
+  // optional bool is_save_txt = 28 [default = true];
+  bool has_is_save_txt() const;
+  void clear_is_save_txt();
+  static const int kIsSaveTxtFieldNumber = 28;
+  bool is_save_txt() const;
+  void set_is_save_txt(bool value);
+
   // optional double mat_r00 = 4 [default = 1];
   bool has_mat_r00() const;
   void clear_mat_r00();
@@ -412,6 +426,10 @@ class laser_parameter : public ::google::protobuf::Message /* @@protoc_insertion
   void clear_has_frame_num();
   void set_has_type();
   void clear_has_type();
+  void set_has_is_save_banary();
+  void clear_has_is_save_banary();
+  void set_has_is_save_txt();
+  void clear_has_is_save_txt();
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::HasBits<1> _has_bits_;
@@ -428,7 +446,9 @@ class laser_parameter : public ::google::protobuf::Message /* @@protoc_insertion
   double translation_y_;
   double translation_z_;
   double install_angle_;
+  bool is_save_banary_;
   bool scan_direction_;
+  bool is_save_txt_;
   double mat_r00_;
   double mat_r01_;
   double mat_r02_;
@@ -682,13 +702,13 @@ inline void laser_parameter::set_laser_port_remote(::google::protobuf::int64 val
 
 // optional double mat_r00 = 4 [default = 1];
 inline bool laser_parameter::has_mat_r00() const {
-  return (_has_bits_[0] & 0x00002000u) != 0;
+  return (_has_bits_[0] & 0x00008000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r00() {
-  _has_bits_[0] |= 0x00002000u;
+  _has_bits_[0] |= 0x00008000u;
 }
 inline void laser_parameter::clear_has_mat_r00() {
-  _has_bits_[0] &= ~0x00002000u;
+  _has_bits_[0] &= ~0x00008000u;
 }
 inline void laser_parameter::clear_mat_r00() {
   mat_r00_ = 1;
@@ -706,13 +726,13 @@ inline void laser_parameter::set_mat_r00(double value) {
 
 // optional double mat_r01 = 5 [default = 1];
 inline bool laser_parameter::has_mat_r01() const {
-  return (_has_bits_[0] & 0x00004000u) != 0;
+  return (_has_bits_[0] & 0x00010000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r01() {
-  _has_bits_[0] |= 0x00004000u;
+  _has_bits_[0] |= 0x00010000u;
 }
 inline void laser_parameter::clear_has_mat_r01() {
-  _has_bits_[0] &= ~0x00004000u;
+  _has_bits_[0] &= ~0x00010000u;
 }
 inline void laser_parameter::clear_mat_r01() {
   mat_r01_ = 1;
@@ -730,13 +750,13 @@ inline void laser_parameter::set_mat_r01(double value) {
 
 // optional double mat_r02 = 6 [default = 1];
 inline bool laser_parameter::has_mat_r02() const {
-  return (_has_bits_[0] & 0x00008000u) != 0;
+  return (_has_bits_[0] & 0x00020000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r02() {
-  _has_bits_[0] |= 0x00008000u;
+  _has_bits_[0] |= 0x00020000u;
 }
 inline void laser_parameter::clear_has_mat_r02() {
-  _has_bits_[0] &= ~0x00008000u;
+  _has_bits_[0] &= ~0x00020000u;
 }
 inline void laser_parameter::clear_mat_r02() {
   mat_r02_ = 1;
@@ -754,13 +774,13 @@ inline void laser_parameter::set_mat_r02(double value) {
 
 // optional double mat_r03 = 7 [default = 1];
 inline bool laser_parameter::has_mat_r03() const {
-  return (_has_bits_[0] & 0x00010000u) != 0;
+  return (_has_bits_[0] & 0x00040000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r03() {
-  _has_bits_[0] |= 0x00010000u;
+  _has_bits_[0] |= 0x00040000u;
 }
 inline void laser_parameter::clear_has_mat_r03() {
-  _has_bits_[0] &= ~0x00010000u;
+  _has_bits_[0] &= ~0x00040000u;
 }
 inline void laser_parameter::clear_mat_r03() {
   mat_r03_ = 1;
@@ -778,13 +798,13 @@ inline void laser_parameter::set_mat_r03(double value) {
 
 // optional double mat_r10 = 8 [default = 1];
 inline bool laser_parameter::has_mat_r10() const {
-  return (_has_bits_[0] & 0x00020000u) != 0;
+  return (_has_bits_[0] & 0x00080000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r10() {
-  _has_bits_[0] |= 0x00020000u;
+  _has_bits_[0] |= 0x00080000u;
 }
 inline void laser_parameter::clear_has_mat_r10() {
-  _has_bits_[0] &= ~0x00020000u;
+  _has_bits_[0] &= ~0x00080000u;
 }
 inline void laser_parameter::clear_mat_r10() {
   mat_r10_ = 1;
@@ -802,13 +822,13 @@ inline void laser_parameter::set_mat_r10(double value) {
 
 // optional double mat_r11 = 9 [default = 1];
 inline bool laser_parameter::has_mat_r11() const {
-  return (_has_bits_[0] & 0x00040000u) != 0;
+  return (_has_bits_[0] & 0x00100000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r11() {
-  _has_bits_[0] |= 0x00040000u;
+  _has_bits_[0] |= 0x00100000u;
 }
 inline void laser_parameter::clear_has_mat_r11() {
-  _has_bits_[0] &= ~0x00040000u;
+  _has_bits_[0] &= ~0x00100000u;
 }
 inline void laser_parameter::clear_mat_r11() {
   mat_r11_ = 1;
@@ -826,13 +846,13 @@ inline void laser_parameter::set_mat_r11(double value) {
 
 // optional double mat_r12 = 10 [default = 1];
 inline bool laser_parameter::has_mat_r12() const {
-  return (_has_bits_[0] & 0x00080000u) != 0;
+  return (_has_bits_[0] & 0x00200000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r12() {
-  _has_bits_[0] |= 0x00080000u;
+  _has_bits_[0] |= 0x00200000u;
 }
 inline void laser_parameter::clear_has_mat_r12() {
-  _has_bits_[0] &= ~0x00080000u;
+  _has_bits_[0] &= ~0x00200000u;
 }
 inline void laser_parameter::clear_mat_r12() {
   mat_r12_ = 1;
@@ -850,13 +870,13 @@ inline void laser_parameter::set_mat_r12(double value) {
 
 // optional double mat_r13 = 11 [default = 1];
 inline bool laser_parameter::has_mat_r13() const {
-  return (_has_bits_[0] & 0x00100000u) != 0;
+  return (_has_bits_[0] & 0x00400000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r13() {
-  _has_bits_[0] |= 0x00100000u;
+  _has_bits_[0] |= 0x00400000u;
 }
 inline void laser_parameter::clear_has_mat_r13() {
-  _has_bits_[0] &= ~0x00100000u;
+  _has_bits_[0] &= ~0x00400000u;
 }
 inline void laser_parameter::clear_mat_r13() {
   mat_r13_ = 1;
@@ -874,13 +894,13 @@ inline void laser_parameter::set_mat_r13(double value) {
 
 // optional double mat_r20 = 12 [default = 1];
 inline bool laser_parameter::has_mat_r20() const {
-  return (_has_bits_[0] & 0x00200000u) != 0;
+  return (_has_bits_[0] & 0x00800000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r20() {
-  _has_bits_[0] |= 0x00200000u;
+  _has_bits_[0] |= 0x00800000u;
 }
 inline void laser_parameter::clear_has_mat_r20() {
-  _has_bits_[0] &= ~0x00200000u;
+  _has_bits_[0] &= ~0x00800000u;
 }
 inline void laser_parameter::clear_mat_r20() {
   mat_r20_ = 1;
@@ -898,13 +918,13 @@ inline void laser_parameter::set_mat_r20(double value) {
 
 // optional double mat_r21 = 13 [default = 1];
 inline bool laser_parameter::has_mat_r21() const {
-  return (_has_bits_[0] & 0x00400000u) != 0;
+  return (_has_bits_[0] & 0x01000000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r21() {
-  _has_bits_[0] |= 0x00400000u;
+  _has_bits_[0] |= 0x01000000u;
 }
 inline void laser_parameter::clear_has_mat_r21() {
-  _has_bits_[0] &= ~0x00400000u;
+  _has_bits_[0] &= ~0x01000000u;
 }
 inline void laser_parameter::clear_mat_r21() {
   mat_r21_ = 1;
@@ -922,13 +942,13 @@ inline void laser_parameter::set_mat_r21(double value) {
 
 // optional double mat_r22 = 14 [default = 1];
 inline bool laser_parameter::has_mat_r22() const {
-  return (_has_bits_[0] & 0x00800000u) != 0;
+  return (_has_bits_[0] & 0x02000000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r22() {
-  _has_bits_[0] |= 0x00800000u;
+  _has_bits_[0] |= 0x02000000u;
 }
 inline void laser_parameter::clear_has_mat_r22() {
-  _has_bits_[0] &= ~0x00800000u;
+  _has_bits_[0] &= ~0x02000000u;
 }
 inline void laser_parameter::clear_mat_r22() {
   mat_r22_ = 1;
@@ -946,13 +966,13 @@ inline void laser_parameter::set_mat_r22(double value) {
 
 // optional double mat_r23 = 15 [default = 1];
 inline bool laser_parameter::has_mat_r23() const {
-  return (_has_bits_[0] & 0x01000000u) != 0;
+  return (_has_bits_[0] & 0x04000000u) != 0;
 }
 inline void laser_parameter::set_has_mat_r23() {
-  _has_bits_[0] |= 0x01000000u;
+  _has_bits_[0] |= 0x04000000u;
 }
 inline void laser_parameter::clear_has_mat_r23() {
-  _has_bits_[0] &= ~0x01000000u;
+  _has_bits_[0] &= ~0x04000000u;
 }
 inline void laser_parameter::clear_mat_r23() {
   mat_r23_ = 1;
@@ -1138,13 +1158,13 @@ inline void laser_parameter::set_install_angle(double value) {
 
 // optional bool scan_direction = 23 [default = true];
 inline bool laser_parameter::has_scan_direction() const {
-  return (_has_bits_[0] & 0x00001000u) != 0;
+  return (_has_bits_[0] & 0x00002000u) != 0;
 }
 inline void laser_parameter::set_has_scan_direction() {
-  _has_bits_[0] |= 0x00001000u;
+  _has_bits_[0] |= 0x00002000u;
 }
 inline void laser_parameter::clear_has_scan_direction() {
-  _has_bits_[0] &= ~0x00001000u;
+  _has_bits_[0] &= ~0x00002000u;
 }
 inline void laser_parameter::clear_scan_direction() {
   scan_direction_ = true;
@@ -1225,13 +1245,13 @@ inline void laser_parameter::set_allocated_sn(::std::string* sn) {
 
 // optional int64 frame_num = 25 [default = 3000];
 inline bool laser_parameter::has_frame_num() const {
-  return (_has_bits_[0] & 0x02000000u) != 0;
+  return (_has_bits_[0] & 0x08000000u) != 0;
 }
 inline void laser_parameter::set_has_frame_num() {
-  _has_bits_[0] |= 0x02000000u;
+  _has_bits_[0] |= 0x08000000u;
 }
 inline void laser_parameter::clear_has_frame_num() {
-  _has_bits_[0] &= ~0x02000000u;
+  _has_bits_[0] &= ~0x08000000u;
 }
 inline void laser_parameter::clear_frame_num() {
   frame_num_ = GOOGLE_LONGLONG(3000);
@@ -1310,6 +1330,54 @@ inline void laser_parameter::set_allocated_type(::std::string* type) {
   // @@protoc_insertion_point(field_set_allocated:Laser_proto.laser_parameter.type)
 }
 
+// optional bool is_save_banary = 27 [default = false];
+inline bool laser_parameter::has_is_save_banary() const {
+  return (_has_bits_[0] & 0x00001000u) != 0;
+}
+inline void laser_parameter::set_has_is_save_banary() {
+  _has_bits_[0] |= 0x00001000u;
+}
+inline void laser_parameter::clear_has_is_save_banary() {
+  _has_bits_[0] &= ~0x00001000u;
+}
+inline void laser_parameter::clear_is_save_banary() {
+  is_save_banary_ = false;
+  clear_has_is_save_banary();
+}
+inline bool laser_parameter::is_save_banary() const {
+  // @@protoc_insertion_point(field_get:Laser_proto.laser_parameter.is_save_banary)
+  return is_save_banary_;
+}
+inline void laser_parameter::set_is_save_banary(bool value) {
+  set_has_is_save_banary();
+  is_save_banary_ = value;
+  // @@protoc_insertion_point(field_set:Laser_proto.laser_parameter.is_save_banary)
+}
+
+// optional bool is_save_txt = 28 [default = true];
+inline bool laser_parameter::has_is_save_txt() const {
+  return (_has_bits_[0] & 0x00004000u) != 0;
+}
+inline void laser_parameter::set_has_is_save_txt() {
+  _has_bits_[0] |= 0x00004000u;
+}
+inline void laser_parameter::clear_has_is_save_txt() {
+  _has_bits_[0] &= ~0x00004000u;
+}
+inline void laser_parameter::clear_is_save_txt() {
+  is_save_txt_ = true;
+  clear_has_is_save_txt();
+}
+inline bool laser_parameter::is_save_txt() const {
+  // @@protoc_insertion_point(field_get:Laser_proto.laser_parameter.is_save_txt)
+  return is_save_txt_;
+}
+inline void laser_parameter::set_is_save_txt(bool value) {
+  set_has_is_save_txt();
+  is_save_txt_ = value;
+  // @@protoc_insertion_point(field_set:Laser_proto.laser_parameter.is_save_txt)
+}
+
 // -------------------------------------------------------------------
 
 // Laser_parameter_all

+ 0 - 12
laser/laser_task_command.cpp

@@ -171,18 +171,6 @@ void Laser_task::set_task_error_manager(Error_manager & error_manager)
     m_task_error_manager = error_manager;
 }
 
-//获取采集的点云保存路径
-std::string Laser_task::get_save_path()
-{
-    return m_save_path;
-}
-//设置采集的点云保存路径
-void Laser_task::set_save_path(std::string save_path)
-{
-    m_save_path=save_path;
-}
-
-
 
 
 

+ 0 - 4
laser/laser_task_command.h

@@ -83,10 +83,6 @@ public:
     //设置 错误码
     void set_task_error_manager(Error_manager & error_manager);
 
-    //获取采集的点云保存路径
-    std::string get_save_path();
-    //设置采集的点云保存路径
-    void set_save_path(std::string save_path);
 
 protected:
     //点云的采集帧数最大值,任务输入

+ 1 - 1
terminor/terminal_command_executor.cpp

@@ -349,7 +349,7 @@ Error_manager Terminor_Command_Executor::scanning_measuring()
                 //
                 laser_task->task_init(TASK_CREATED,scan_cloud,&cloud_lock);
                 laser_task->set_task_frame_maxnum(frame_count);
-                laser_task->set_save_path(project_path);
+                laser_task->set_task_save_path(project_path);
                 laser_task_vector.push_back(laser_task);
                 //发送任务单给雷达
                 code=tp_lasers[i]->execute_task(laser_task);