mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-25 18:43:53 +08:00
* add PubMaster & SubMaster remove 'delete msg' remove headers * use constructor to initial all submster * modify drain sockets * fix typo in ssconscript.remove lines no checkValid in loggerd last modify handle_message:event->&event fix type remove heads event to auto * new interface * api changed * Revert "use constructor to initial all submster" This reverts commit 73be7ea46250a325ce41d3a0445e34395a2ae692. * change to new api * revert loggerd * dd * use new PubSub api * update to new interface don't modify loggerd reset panda reset opendbc remove empty lines * switch to new pubMaster * update to the new inteface change remove error code . to -> merge paramsd.cc update panda fix typo simplify fix typo * Fix build * always conflate Co-authored-by: deanlee <deanlee3@gmail.com>
46 lines
1015 B
C
46 lines
1015 B
C
#ifndef DMONITORING_H
|
|
#define DMONITORING_H
|
|
|
|
#include "common/util.h"
|
|
#include "commonmodel.h"
|
|
#include "runners/run.h"
|
|
|
|
#include "messaging.hpp"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define OUTPUT_SIZE 33
|
|
#define RHD_CHECK_INTERVAL 10
|
|
|
|
typedef struct DMonitoringResult {
|
|
float face_orientation[3];
|
|
float face_orientation_meta[3];
|
|
float face_position[2];
|
|
float face_position_meta[2];
|
|
float face_prob;
|
|
float left_eye_prob;
|
|
float right_eye_prob;
|
|
float left_blink_prob;
|
|
float right_blink_prob;
|
|
} DMonitoringResult;
|
|
|
|
typedef struct DMonitoringModelState {
|
|
RunModel *m;
|
|
bool is_rhd;
|
|
bool is_rhd_checked;
|
|
float output[OUTPUT_SIZE];
|
|
} DMonitoringModelState;
|
|
|
|
void dmonitoring_init(DMonitoringModelState* s);
|
|
DMonitoringResult dmonitoring_eval_frame(DMonitoringModelState* s, void* stream_buf, int width, int height);
|
|
void dmonitoring_publish(PubMaster &pm, uint32_t frame_id, const DMonitoringResult res);
|
|
void dmonitoring_free(DMonitoringModelState* s);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|