Skip to content

Commit

Permalink
Merge pull request #67 from MK16kawai/dev
Browse files Browse the repository at this point in the history
add mlx90640&opns303x
  • Loading branch information
Neutree authored Dec 18, 2024
2 parents ccafbe2 + c3f2239 commit 8b4f0b8
Show file tree
Hide file tree
Showing 40 changed files with 8,072 additions and 17 deletions.
17 changes: 14 additions & 3 deletions components/ext_dev/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ list(APPEND ADD_INCLUDE "src/qmi8658/ALICHOUCHENE_Qmi8658c")
list(APPEND ADD_INCLUDE "src/tmc2209")
list(APPEND ADD_INCLUDE "src/tmc2209/janelia-arduino_TMC2209")
list(APPEND ADD_INCLUDE "src/axp2101")
list(APPEND ADD_INCLUDE "src/mlx90640/mlx90640_lib")
list(APPEND ADD_INCLUDE "src/cmap")
list(APPEND ADD_INCLUDE "src/opns303x/opns303x_lib")


append_srcs_dir(ADD_SRCS "src")
append_srcs_dir(ADD_SRCS "src/bm8563")
Expand All @@ -17,7 +21,14 @@ append_srcs_dir(ADD_SRCS "src/tmc2209")
append_srcs_dir(ADD_SRCS "src/tmc2209/janelia-arduino_TMC2209")
append_srcs_dir(ADD_SRCS "src/axp2101")
append_srcs_dir(ADD_SRCS "src/fp5510")
list(APPEND ADD_REQUIREMENTS basic peripheral)
append_srcs_dir(ADD_SRCS "src/mlx90640")
append_srcs_dir(ADD_SRCS "src/mlx90640/mlx90640_lib")
append_srcs_dir(ADD_SRCS "src/cmap")
append_srcs_dir(ADD_SRCS "src/opns303x")
append_srcs_dir(ADD_SRCS "src/opns303x/opns303x_lib")


list(APPEND ADD_REQUIREMENTS basic peripheral vision)

# if (PLATFORM_LINUX)
# append_srcs_dir(ADD_SRCS "port/linux")
Expand Down Expand Up @@ -73,8 +84,8 @@ register_component()
###############################################

#### Add compile option for this component ####
#### Just for this component, won't affect other
#### modules, including component that depend
#### Just for this component, won't affect other
#### modules, including component that depend
#### on this component
# list(APPEND ADD_DEFINITIONS_PRIVATE -DAAAAA=1)

Expand Down
44 changes: 44 additions & 0 deletions components/ext_dev/include/maix_cmap.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#ifndef __MAIX_CMAP_HPP__
#define __MAIX_CMAP_HPP__

#include <cstdint>
#include <vector>
#include <array>

namespace maix::ext_dev::cmap {


using RGB = std::array<uint8_t, 3>;
using CmapArray = std::vector<RGB>;

/**
* @brief Cmap
* @maixpy maix.ext_dev.cmap.Cmap
*/
enum class Cmap {
WHITE_HOT = 0,
BLACK_HOT,
IRONBOW,
NIGHT,
RED_HOT,
WHITE_HOT_SD,
BLACK_HOT_SD,
RED_HOT_SD,
JET,
};

/**
* @brief Get cmap ptr
*
* @param cmap @see Cmap
* @return const CmapArray*
*
* @maixcdk maix.ext_dev.cmap.get
*/
const CmapArray* get(Cmap cmap);


}


#endif
Loading

0 comments on commit 8b4f0b8

Please sign in to comment.