Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.vscode
/build
16 changes: 8 additions & 8 deletions Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ int main(void)
/* USER CODE BEGIN WHILE */
while (1)
{
printf("%d,%f,%f,%f\n", hi91_data.FPS,hi91_data.total_yaw,-hi91_data.roll,hi91_data.pitch);
// printf("%d,%d,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", hi91_data.FPS,elrs_data.FPS,elrs_data.Left_X,elrs_data.Left_Y,elrs_data.Right_X,elrs_data.Right_Y,elrs_data.A,elrs_data.B,
// elrs_data.C,elrs_data.D,elrs_data.E,elrs_data.F,elrs_data.S1,elrs_data.S2,elrs_data.isOnline);
// printf("%f,%f,%f\n", A1_Motor[1].motor_recv.Pos,A1_Motor[0].motor_recv.W,A1_Motor[1].motor_recv.W);
// printf("%d,%f,%d,%d,%d,%f\n", A1_Motor[A1_Motor_left_1].motor_recv.FPS,A1_Motor[A1_Motor_left_2].motor_recv.original_Pos,A1_Motor[A1_Motor_right_1].motor_recv.FPS,A1_Motor[A1_Motor_right_2].motor_recv.FPS,hi91_data.FPS,elrs_data.Left_Y);
// printf("%f,%f,%f,%f\n",A1_Motor[A1_Motor_left_1].motor_recv.original_Pos,A1_Motor[A1_Motor_left_2].motor_recv.original_Pos,A1_Motor[A1_Motor_right_1].motor_recv.original_Pos,A1_Motor[A1_Motor_right_2].motor_recv.original_Pos);
// printf("%f,%f,%f,%f,%f\n",right.L0,chassis_move.leg_set,right.FN,right.F0,A1_Motor[A1_Motor_right_2].motor_send.T);
// printf("%f,%f,%f,%f,%f\n",chassis_move.x_filter,chassis_move.x_set,chassis_move.v_filter,chassis_move.v_set,right.L0);
// printf("%d,%f,%f,%f\n", hi91_data.FPS,hi91_data.total_yaw,-hi91_data.roll,hi91_data.pitch);
// printf("%d,%d,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", hi91_data.FPS,elrs_data.FPS,elrs_data.Left_X,elrs_data.Left_Y,elrs_data.Right_X,elrs_data.Right_Y,elrs_data.A,elrs_data.B,
// elrs_data.C,elrs_data.D,elrs_data.E,elrs_data.F,elrs_data.S1,elrs_data.S2,elrs_data.isOnline);
// printf("%f,%f,%f\n", A1_Motor[1].motor_recv.Pos,A1_Motor[0].motor_recv.W,A1_Motor[1].motor_recv.W);
// printf("%d,%f,%d,%d,%d,%f\n", A1_Motor[A1_Motor_left_1].motor_recv.FPS,A1_Motor[A1_Motor_left_2].motor_recv.original_Pos,A1_Motor[A1_Motor_right_1].motor_recv.FPS,A1_Motor[A1_Motor_right_2].motor_recv.FPS,hi91_data.FPS,elrs_data.Left_Y);
printf("%f,%f,%f,%f\n",A1_Motor[A1_Motor_left_1].motor_recv.original_Pos,A1_Motor[A1_Motor_left_2].motor_recv.original_Pos,A1_Motor[A1_Motor_right_1].motor_recv.original_Pos,A1_Motor[A1_Motor_right_2].motor_recv.original_Pos);
// printf("%f,%f,%f,%f,%f\n",right.L0,chassis_move.leg_set,right.FN,right.F0,A1_Motor[A1_Motor_right_2].motor_send.T);
// printf("%f,%f,%f,%f,%f\n",chassis_move.x_filter,chassis_move.x_set,chassis_move.v_filter,chassis_move.v_set,right.L0);
HAL_Delay(10);
/* USER CODE END WHILE */

Expand Down
2 changes: 1 addition & 1 deletion User/App/Chassis_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "Chassis_L.h"
#include "Chassis_R.h"
#include "VMC_calc.h"
#include "pid.h"
#include "Pid.h"

void ChassisL_init(chassis_t *chassis,vmc_leg_t *vmc);
void ChassisL_task(void);
Expand Down
2 changes: 1 addition & 1 deletion User/App/Chassis_R.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "main.h"
#include "Motor_Dji.h"
#include "main.h"
#include "pid.h"
#include "Pid.h"
#include "VMC_calc.h"

#define Mg 95.0f
Expand Down
2 changes: 1 addition & 1 deletion User/App/Check.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "Check.h"
#include "A1_Motor.h"
#include "CH010_HI91.h"
#include "motor_msg.h"
#include "Motor_msg.h"
#include "Control_logic.h"
#include "ELRS_Drive.h"

Expand Down
4 changes: 2 additions & 2 deletions User/App/Control_logic.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
#include "fdcan.h"
#include "A1_Motor.h"
#include "CH010_HI91.h"
#include "motor_msg.h"
#include "Motor_msg.h"
#include "usart.h"
#include "Check.h"
#include "ELRS_task.h"
#include "Chassis_R.h"
#include "Chassis_L.h"
#include "Facial_expression.h"
#include "VMC_calc.h"
#include "observe.h"
#include "Observe.h"

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
Expand Down
2 changes: 1 addition & 1 deletion User/App/Hardware_Config.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "Chassis_R.h"
#include "Chassis_L.h"
#include "Facial_expression.h"
#include "observe.h"
#include "Observe.h"

Clock task_clk;
void HardwareConfig(void) {
Expand Down
4 changes: 2 additions & 2 deletions User/App/Observe.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*********************************************************************
*/

#include "observe.h"
#include "kalman_filter.h"
#include "Observe.h"
#include "Kalman_filter.h"
#include "CH010_HI91.h"
#include "Chassis_R.h"
#include "VMC_calc.h"
Expand Down
4 changes: 2 additions & 2 deletions User/App/Observe.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#ifndef BALANCE_LEG_V2_OBSERVE_H
#define BALANCE_LEG_V2_OBSERVE_H

#include "observe.h"
#include "Observe.h"
#include "stdint.h"
#include "Chassis_L.h"
#include "main.h"
#include "kalman_filter.h"
#include "Kalman_filter.h"

extern void Observe_task(void);
extern void xvEstimateKF_Init(KalmanFilter_t *EstimateKF);
Expand Down
2 changes: 1 addition & 1 deletion User/App/USART_Callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
if(huart == &huart7)
{
A1_Motor_Init(A1_Motor_right_2);
}0
}
if(huart == &huart8)
{
Facial_expression_init();
Expand Down
2 changes: 1 addition & 1 deletion User/Devices/Motor_A1/A1_Motor.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#include "A1_Motor.h"
#include "motor_msg.h"
#include "Motor_msg.h"
#include <string.h>
#include <stdio.h>
#include "usart.h"
Expand Down
2 changes: 1 addition & 1 deletion User/Devices/Motor_A1/A1_Motor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef BALANCE_LEG_V2_A1_MOTOR_H
#define BALANCE_LEG_V2_A1_MOTOR_H

#include "motor_msg.h"
#include "Motor_msg.h"
#include "usart.h"

#define PI 3.1415926535f
Expand Down
2 changes: 1 addition & 1 deletion User/Devices/Motor_A1/Motor_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define BALANCE_LEG_V2_MOTOR_MSG_H

#include <stdint.h>
#include "motor_msg.h"
#include "Motor_msg.h"

#pragma pack(1)

Expand Down
2 changes: 1 addition & 1 deletion dap_link.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ source [find target/stm32h7x.cfg]

# download speed = 10MHz

adapter speed 10000
adapter speed 10000