Browse Source

1.完成了部分合并

kappo 1 month ago
parent
commit
9040bb178b
2 changed files with 8 additions and 8 deletions
  1. 1 1
      ImageTest/ImageTest.h
  2. 7 7
      main.cpp

+ 1 - 1
ImageTest/ImageTest.h

@@ -10,7 +10,7 @@
 #include <thread>
 #include <mutex>
 
-namespace UsbTest namespace UsbTest
+namespace UsbTest
 {
 
     void saveImageFromData(unsigned char *data, int width, int height, const std::string &filename = "./output.png");

+ 7 - 7
main.cpp

@@ -12,8 +12,6 @@
 
 #define DEVICE_NUM 3
 
-
-
 int main(int argc, char **argv)
 {
     // set usbfs memory to 64MB
@@ -22,11 +20,14 @@ int main(int argc, char **argv)
 
     // use json to read config file
     nlohmann::json config;
-    try {
+    try
+    {
         std::ifstream config_file("./configure/config.json");
         config_file >> config;
         config_file.close();
-    } catch (std::exception &e) {
+    }
+    catch (std::exception &e)
+    {
         std::cerr << "Error reading config file: " << e.what() << std::endl;
         return 1;
     }
@@ -36,9 +37,9 @@ int main(int argc, char **argv)
     UsbTest::SimulateTrigger::getInstance().startTrigger();
 
     LogConfiguration LogConfig; // 日志结构体
-	LogConfig.FromFile("./configure/log.json");
+    LogConfig.FromFile("./configure/log.json");
     LOG_INIT("UsbDevice", LogConfig);
-    if (OmniLoger::CLoger::get_instance().log_sink != nullptr) 
+    if (OmniLoger::CLoger::get_instance().log_sink != nullptr)
     {
         std::cout << "Log initialized successfully" << std::endl;
         OmniLoger::CLoger::get_instance().log_sink->error("Error occurred during initialization");
@@ -64,6 +65,5 @@ int main(int argc, char **argv)
     // Stop all streaming
     UVCManager::getInstance().stopAllStreaming();
 
-
     return 0;
 }