Files
Motor_v2/Robot_V2/main.h
T
cbb c9934849c5 feat(FOC): 重构FOC控制器实现并修复SVPWM算法支持
- 修复类名拼写错误:FOC_Controlroller -> FOC_Controller
- 移除不必要的角度归一化函数,直接使用fmod优化性能
- 添加完整的SVPWM算法实现,提高电机控制效率
- 重构PID参数配置,使用动态参数调整机制
- 增加电流反馈功能,实时监测电机运行状态
- 优化电压安全限制,提高系统稳定性
- 更新控制模式映射,支持更多控制策略
- 改进CAN通信协议,增加电流反馈传输
2026-02-02 02:12:14 +08:00

44 lines
1.7 KiB
C++

/*!
\file main.h
\brief the header file of main
\version 2025-06-20, V1.5.1, firmware for GD32C10x
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef MAIN_H
#define MAIN_H
#include <cstdint>
void do_task(u32 currentTasks);
u8 hardware_init(void);
#endif /* MAIN_H */