第一次提交

This commit is contained in:
2025-11-14 19:58:13 +08:00
parent bb55e6618f
commit edd1dca567
19 changed files with 1611 additions and 1883 deletions

View File

@@ -2,32 +2,22 @@
#include "interface_config.h"
StrRxCanFrame un_motor_input1 ;//电机控制器1 左前侧
StrRxCanFrame un_motor_input2 ;//电机控制器2 右前侧
StrRxCanFrame un_motor_input3 ;//电机控制器1 左后侧
StrRxCanFrame un_motor_input4 ;//电机控制器2 右后侧
UnMotorTempInput un_motor_temp1 ;//电机控制器1 左前侧
UnMotorTempInput un_motor_temp2 ;//电机控制器2 右前侧
UnMotorTempInput un_motor_temp3 ;//电机控制器3 左后侧
UnMotorTempInput un_motor_temp4 ;//电机控制器4 右后侧
UnMotorInput un_motor_input1 ;//电机控制器1 左前侧
UnMotorInput un_motor_input2 ;//电机控制器2 右前侧
UnMotorInput un_motor_input3 ;//电机控制器1 左后侧
UnMotorInput un_motor_input4 ;//电机控制器2 右后侧
UnMotorTempInput un_motor_temp1 ;//电机控制器1 温度
UnMotorTempInput un_motor_temp2 ;//电机控制器2 温度
UnBmsInput un_bms_input ;//BMS接收数据
UnTempModuleInput un_temp_module_input ;//温度采集模块
StrTxCanFrame un_motor_output1 ;//电机输出
StrTxCanFrame un_motor_output2 ;//电机输出
StrTxCanFrame un_motor_output3 ;//电机输出
StrTxCanFrame un_motor_output4 ;//电机输出
StrTxCanFrame un_motor_output5 ;//电机输出
StrTxCanFrame un_motor_output6 ;//电机输出
StrTxCanFrame un_motor_output7 ;//电机输出
StrTxCanFrame un_motor_output8 ;//电机输出
UnMotorOutput un_motor_output1 ;//电机输出
UnMotorOutput un_motor_output2 ;//电机输出
UnMotorOutput un_motor_output3 ;//电机输出
UnMotorOutput un_motor_output4 ;//电机输出
UnInfCanKGFOutput un_inf_can_kgf_output1 ;//kgf输出
UnInfCanKGFOutput un_inf_can_kgf_output2 ;
@@ -37,8 +27,6 @@ UnWheelSpeedOutput un_wheel_wpeed_output ;//轮速输出
UnRemoteControlInput un_remote_control_input ;//遥控器输入
UnHBridgeOutput un_h_bridge_output ;//H桥输出
UnHBridgeOutput un_h_bridge_output1 ;//H桥输出
UnGatherOutput un_gather_output ;//采集模块输出
@@ -46,20 +34,23 @@ UnUltrasonicInput un_ultrasonic_input1 ;//超声波传感
UnUltrasonicOutput un_ultrasonic_output1 ;//超声波传感器输出
//UnHBridgeOutput un_h_bridge_output1 ;//左太阳能板电机
//UnHBridgeOutput un_h_bridge_output2 ;//右太阳能板电机
//
//UnLifterOutput un_lifter_output ;//基站升降杆输出
StrTxCanFrame un_sdo_output1 ;//电机1输出
StrTxCanFrame un_sdo_output2 ;//电机2输出
StrTxCanFrame un_sdo_output3 ;//电机3输出
StrTxCanFrame un_sdo_output4 ;//电机4输出
StrTxCanFrame un_sdo_output5 ;//电机5输出
StrTxCanFrame un_sdo_output4 ;//电机3速度输出
StrTxCanFrame un_sdo_output5 ;//电机使能输出
StrRxCanFrame un_pitch_intput ;//电机输入
StrRxCanFrame un_right_intput ;//电机输入
StrRxCanFrame un_turn_intput ;//电机输入
//IO口
@@ -71,13 +62,13 @@ UnAutoComputerInput un_auto_computer_input ;//自主计算机
UnManualComputerInput un_manual_computer_input ;//自主计算机手动数据
UnRequestFrame un_request_frame ;//请求帧
UnComputerOutput un_computer_output ;//输出给自主计算机
UnComputerTurnableInput un_computer_turnable_Input ;//转台以太网输入
UnEncoderData un_encoder_data_input ;
StrMagneticEncoder str_magnetic_encoder ;//编码器请求
UnComputerOutput un_computer_output ;//输出给自主计算机
//输出给上位机
UnVehicleInfoOutput un_vehicle_Info_output ;// 车辆信息,输出给上位机
@@ -95,5 +86,20 @@ UnCanDebugOutput un_can_debug_output;//调试输出
// 限制值在最小值和最大值之间
float constrain(float value, float min_val, float max_val)
{
if (value < min_val)
{
return min_val;
}
else if (value > max_val)
{
return max_val;
}
else
{
return value;
}
}