36 lines
811 B
C++
36 lines
811 B
C++
//
|
|
// Created by Administrator on 2025/12/24.
|
|
//
|
|
|
|
#ifndef RTTHREAD_HEAD_SERVICE_IMPL_H
|
|
#define RTTHREAD_HEAD_SERVICE_IMPL_H
|
|
|
|
|
|
#include <stdint.h>
|
|
#include "erpc/proto/generated/face_servo_server.hpp"
|
|
#include "servo_manager/include/servo_manager.h"
|
|
|
|
extern "C" {
|
|
#include <rtthread.h>
|
|
}
|
|
|
|
class FaceServoServiceImpl : public erpcShim::FaceServo_interface
|
|
{
|
|
public:
|
|
FaceServoServiceImpl();
|
|
virtual ~FaceServoServiceImpl() = default;
|
|
|
|
|
|
int32_t setAllAngles(const list_float_1_t* angles_deg) override;
|
|
int32_t setAngle(const char* id, float angle_deg) override;
|
|
int32_t setAngles(const list_ServoCmd_1_t* cmds) override;
|
|
private:
|
|
ServoManager _servos;
|
|
rt_err_t _init_err;
|
|
static const std::vector<ServoManager::ServoConfig> kServoCfg;
|
|
|
|
};
|
|
|
|
|
|
#endif //RTTHREAD_HEAD_SERVICE_IMPL_H
|