Skip to content
Open
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
18 changes: 18 additions & 0 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
22 changes: 22 additions & 0 deletions components/who_app/who_recognition_app/who_recognition_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,27 @@ bool WhoRecognitionApp::run()
ret &= m_recognition->run(3584, 2, 0);
return ret;
}

void WhoRecognitionApp::new_result_subscription(const std::function<void(char *, dl::image::img_t, dl::image::img_t)> &cb)
{
m_recognition->new_result_subscription(cb);
}


void WhoRecognitionApp::recognize()
{
// simulate a button was pressed
m_recognition->virtual_btn_event_handler(RECOGNIZE);
}
void WhoRecognitionApp::enroll()
{
// simulate a button was pressed
m_recognition->virtual_btn_event_handler(ENROLL);
}
void WhoRecognitionApp::delete_face()
{
// simulate a button was pressed
m_recognition->virtual_btn_event_handler(DELETE);
}
} // namespace app
} // namespace who
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ class WhoRecognitionApp : public WhoTasks {
public:
WhoRecognitionApp();
void set_cam(cam::WhoCam *cam) { m_frame_cap->set_cam(cam); }
void set_lcd(lcd::WhoLCD *lcd) { m_frame_cap->set_lcd(lcd); }
void set_lcd(lcd::WhoLCDiface *lcd) { m_frame_cap->set_lcd(lcd); }
bool run() override;
void new_result_subscription(const std::function<void(char *, dl::image::img_t, dl::image::img_t)> &cb);

void recognize() ;
void enroll() ;
void delete_face() ;

protected:
frame_cap::WhoFrameCapLCD *m_frame_cap;
Expand Down
8 changes: 4 additions & 4 deletions components/who_frame_cap/who_frame_cap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ class WhoFrameCapLCD : public WhoFrameCap {
{
}
WhoFrameCapLCD(who::cam::WhoCam *cam,
who::lcd::WhoLCD *lcd,
who::lcd::WhoLCDiface *lcd,
const std::string &name,
bool display_back_frame = false) :
WhoFrameCap(cam, name), m_lcd(lcd), m_display_back_frame(display_back_frame)
{
}
void set_lcd(who::lcd::WhoLCD *lcd) { m_lcd = lcd; }
who::lcd::WhoLCD *get_lcd() { return m_lcd; }
void set_lcd(who::lcd::WhoLCDiface *lcd) { m_lcd = lcd; }
who::lcd::WhoLCDiface *get_lcd() { return m_lcd; }
bool run(const configSTACK_DEPTH_TYPE uxStackDepth, UBaseType_t uxPriority, const BaseType_t xCoreID) override;

private:
void run_lcd_display_cbs(who::cam::cam_fb_t *fb);
void on_new_frame() override;
who::lcd::WhoLCD *m_lcd;
who::lcd::WhoLCDiface *m_lcd;
bool m_display_back_frame;
};
} // namespace frame_cap
Expand Down
24 changes: 19 additions & 5 deletions components/who_peripherals/who_lcd/who_lcd.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
#pragma once
#include "esp_lcd_types.h"
#include "bsp/esp-bsp.h"


namespace who {
namespace lcd {

class WhoLCDiface {
public:
virtual ~WhoLCDiface() = default;
virtual void init() = 0;
virtual esp_lcd_panel_handle_t get_lcd_panel_handle() = 0;
virtual void draw_full_lcd(const void *data) = 0;
};
}
} // namespace who

#if !BSP_CONFIG_NO_GRAPHIC_LIB
#include "who_lvgl_lcd.hpp"
#else

namespace who {
namespace lcd {
class WhoLCD {
class WhoLCD : public WhoLCDiface {
public:
WhoLCD() { init(); }
void init();
esp_lcd_panel_handle_t get_lcd_panel_handle();
void draw_full_lcd(const void *data);
void init() override;
esp_lcd_panel_handle_t get_lcd_panel_handle() override;
void draw_full_lcd(const void *data) override;

private:
#if CONFIG_IDF_TARGET_ESP32S3
Expand Down
Loading