pref: 上电复位到指定位置

This commit is contained in:
bmy
2024-06-10 17:47:25 +08:00
parent 1aa5b84322
commit 29d2285a02
2 changed files with 5 additions and 3 deletions

View File

@@ -30,7 +30,7 @@
"titleBar.activeBackground": "#1A4A07", "titleBar.activeBackground": "#1A4A07",
"titleBar.activeForeground": "#F3FEEF" "titleBar.activeForeground": "#F3FEEF"
}, },
"EIDE.OpenOCD.ExePath": "C:/toolchains/openocd-arterytek/bin/openocd.exe", "EIDE.OpenOCD.ExePath": "D:/Program Files (x86)/at32_OpenOCD_V2.0.2/bin/openocd.exe",
"cortex-debug.variableUseNaturalFormat": true "cortex-debug.variableUseNaturalFormat": true
} }
} }

View File

@@ -2,6 +2,7 @@
#include "at32f415.h" #include "at32f415.h"
#include "lwprintf.h" #include "lwprintf.h"
#include "by_debug.h"
/** /**
* @brief 设置云台摇臂 * @brief 设置云台摇臂
@@ -136,11 +137,12 @@ void by_servo_set_storage(int16_t angle)
void by_servo_init(void) void by_servo_init(void)
{ {
// 后续要不全初始化为空值,由主控按顺序初始化 // 后续要不全初始化为空值,由主控按顺序初始化
by_servo_set_claw_arm(220); // 36-220 by_servo_set_claw(25); // 25-90
by_servo_set_claw(25); // 25-90
by_servo_set_camera(45); by_servo_set_camera(45);
by_servo_set_scoop(0); by_servo_set_scoop(0);
by_servo_set_storage(0); by_servo_set_storage(0);
delay_sec(4);
by_servo_set_claw_arm(220); // 36-220
} }
void by_servo_can_handle(uint16_t stdd_id, const uint8_t *data, uint8_t len) void by_servo_can_handle(uint16_t stdd_id, const uint8_t *data, uint8_t len)