This commit is contained in:
Robofish 2026-03-17 01:10:54 +08:00
parent eae02e4305
commit 04fd712beb
6 changed files with 10 additions and 6 deletions

View File

@ -83,6 +83,7 @@ target_sources(${CMAKE_PROJECT_NAME} PRIVATE
User/device/vofa.c User/device/vofa.c
User/device/mrobot.c User/device/mrobot.c
User/device/referee.c User/device/referee.c
User/device/supercap.c
# User/module sources # User/module sources
User/module/balance_chassis.c User/module/balance_chassis.c
User/module/config.c User/module/config.c

View File

@ -98,6 +98,8 @@ uint32_t get_chassis_energy_from_supercap(void);
int8_t SuperCap_Init(void); int8_t SuperCap_Init(void);
int8_t SuperCap_Update(void); int8_t SuperCap_Update(void);
int8_t PowerLimit_Output_by_cap(float power_limit, float *motor_out, uint32_t len);
int8_t PowerLimit_Output(float power_limit, float *motor_out, uint32_t len);
/* UI 导出结构(供 referee 系统绘制) */ /* UI 导出结构(供 referee 系统绘制) */
typedef struct { typedef struct {

View File

@ -6,7 +6,7 @@ extern "C" {
#endif #endif
/* Includes ----------------------------------------------------------------- */ /* Includes ----------------------------------------------------------------- */
#include "component\user_math.h" #include "component/user_math.h"
#include "module/gimbal.h" #include "module/gimbal.h"
#include "bsp/fdcan.h" #include "bsp/fdcan.h"
#include <stdint.h> #include <stdint.h>

View File

@ -11,6 +11,7 @@
#include "component/user_math.h" #include "component/user_math.h"
#include "device/motor_lk.h" #include "device/motor_lk.h"
#include "device/motor_lz.h" #include "device/motor_lz.h"
#include "device/supercap.h"
#include <math.h> #include <math.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
@ -1363,4 +1364,4 @@ void Chassis_DumpUI(const Chassis_t *c, Chassis_RefereeUI_t *ui) {
ui->mode = c->mode; ui->mode = c->mode;
// ui->angle = c->feedback.yaw.rotor_abs_angle - c->mech_zero; // ui->angle = c->feedback.yaw.rotor_abs_angle - c->mech_zero;
// #error "右边那个mech_zero应该是跟随云台的那个角,我没找着在哪" // #error "右边那个mech_zero应该是跟随云台的那个角,我没找着在哪"
} }

View File

@ -4,8 +4,8 @@
/* Includes ----------------------------------------------------------------- */ /* Includes ----------------------------------------------------------------- */
#include "cap.h" #include "cap.h"
#include "component\limiter.h" #include "component/limiter.h"
#include "device\referee.h" #include "device/referee.h"
/* Private typedef ---------------------------------------------------------- */ /* Private typedef ---------------------------------------------------------- */
/* Private define ----------------------------------------------------------- */ /* Private define ----------------------------------------------------------- */

View File

@ -9,8 +9,8 @@ extern "C" {
#endif #endif
/* Includes ----------------------------------------------------------------- */ /* Includes ----------------------------------------------------------------- */
#include "device\supercap.h" #include "device/supercap.h"
#include "device\referee.h" #include "device/referee.h"
/* Exported constants ------------------------------------------------------- */ /* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */ /* Exported macro ----------------------------------------------------------- */