Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fb device display support #52

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/vision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ list(APPEND ADD_INCLUDE "include"
)
if(PLATFORM_LINUX)
list(APPEND ADD_PRIVATE_INCLUDE "port/linux")
list(APPEND ADD_PRIVATE_INCLUDE "port/linux_common")
elseif(PLATFORM_MAIXCAM)
list(APPEND ADD_PRIVATE_INCLUDE "port/maixcam")
list(APPEND ADD_PRIVATE_INCLUDE "port/linux_common")
endif()
list(APPEND ADD_PRIVATE_INCLUDE "include_private")
###############################################
Expand All @@ -22,8 +24,10 @@ append_srcs_dir(ADD_SRCS "src") # append source file in src dir to var ADD_S
append_srcs_dir(ADD_SRCS "src/ByteTrack")
if(PLATFORM_LINUX)
append_srcs_dir(ADD_SRCS "port/linux")
append_srcs_dir(ADD_SRCS "port/linux_common")
elseif(PLATFORM_MAIXCAM)
append_srcs_dir(ADD_SRCS "port/maixcam")
append_srcs_dir(ADD_SRCS "port/linux_common")
endif()
# list(REMOVE_ITEM COMPONENT_SRCS "src/test.c")
# set(ADD_ASM_SRCS "src/asm.S")
Expand Down
4 changes: 2 additions & 2 deletions components/vision/include/maix_display.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace maix::display
* @maixpy maix.display.Display.__init__
* @maixcdk maix.display.Display.Display
*/
Display(int width = -1, int height = -1, image::Format format = image::FMT_RGB888, const char *device = nullptr, bool open = true);
Display(int width = -1, int height = -1, image::Format format = image::FMT_RGB888, const std::string &device = "", bool open = true);

/**
* @brief Construct a new Display object.
Expand All @@ -57,7 +57,7 @@ namespace maix::display
* @param open If true, display will automatically call open() after creation. default is true.
* @maixcdk maix.display.Display.Display
*/
Display(const char *device, DisplayBase *base, int width = -1, int height = -1, image::Format format = image::FMT_INVALID, bool open = true);
Display(const std::string &device, DisplayBase *base, int width = -1, int height = -1, image::Format format = image::FMT_INVALID, bool open = true);

~Display();

Expand Down
2 changes: 1 addition & 1 deletion components/vision/port/linux/maix_display_sdl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace maix::display
class SDL_Display final : public DisplayBase
{
public:
SDL_Display(const char *device, int width, int height, image::Format format)
SDL_Display(const std::string &device, int width, int height, image::Format format)
{
this->_width = width;
this->_height = height;
Expand Down
Loading