diff --git a/camera-manager/siyi_camera.hpp b/camera-manager/siyi_camera.hpp index 6b0f95b..e11aeca 100644 --- a/camera-manager/siyi_camera.hpp +++ b/camera-manager/siyi_camera.hpp @@ -37,15 +37,13 @@ class Camera { void print_stream_settings() { - std::cout << "---\n" - << "Stream settings: \n" + std::cout << "Stream settings: \n" << _stream_settings; } void print_version() { - std::cout << "---\n" - << _version; + std::cout << _version; } enum class Codec { diff --git a/camera-manager/siyi_cli.cpp b/camera-manager/siyi_cli.cpp index 0069169..e6d1c1f 100644 --- a/camera-manager/siyi_cli.cpp +++ b/camera-manager/siyi_cli.cpp @@ -1,14 +1,35 @@ #include "siyi_camera.hpp" #include +#include -int main(int argc, char* argv[]) +void print_usage(const std::string_view& bin_name) { - if (argc != 2) { - std::cerr << "Invalid argument\n"; - return 1; - } + std::cout << "Usage: " << bin_name << " action [option]\n" + << "Actions:\n\n" + << " help Show this help\n\n" + << " version Show camera and gimbal version\n\n" + << " take_picture Take a picture to SD card\n\n" + << " toggle_recording Toggle start/stop video recording to SD card\n\n" + << " gimbal_forward Set gimbal forward\n\n" + << " get_settings Show all stream settings\n\n" + << " set_resolution