forked from xiaozhi/xiaozhi-esp32
1.增加robot舵机初始位置校准 2.fix(mcp_sever) 超出范围异常捕获类型 bug (#817)
* otto v1.4.0 MCP 1.使用MCP协议控制机器人 2.gif继承lcdDisplay,避免修改lcdDisplay * otto v1.4.1 gif as components gif as components * electronBot v1.1.0 mcp 1.增加electronBot支持 2.mcp协议 3.gif 作为组件 4.display子类 * 规范代码 1.规范代码 2.修复切换主题死机bug * fix(ota): 修复 ottoRobot和electronBot OTA 升级崩溃问题 bug * 1.增加robot舵机初始位置校准 2.fix(mcp_sever) 超出范围异常捕获类型 bug
This commit is contained in:
@@ -55,6 +55,25 @@ void Otto::DetachServos() {
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//-- OSCILLATORS TRIMS ------------------------------------------//
|
||||
///////////////////////////////////////////////////////////////////
|
||||
void Otto::SetTrims(int right_pitch, int right_roll, int left_pitch, int left_roll, int body,
|
||||
int head) {
|
||||
servo_trim_[RIGHT_PITCH] = right_pitch;
|
||||
servo_trim_[RIGHT_ROLL] = right_roll;
|
||||
servo_trim_[LEFT_PITCH] = left_pitch;
|
||||
servo_trim_[LEFT_ROLL] = left_roll;
|
||||
servo_trim_[BODY] = body;
|
||||
servo_trim_[HEAD] = head;
|
||||
|
||||
for (int i = 0; i < SERVO_COUNT; i++) {
|
||||
if (servo_pins_[i] != -1) {
|
||||
servo_[i].SetTrim(servo_trim_[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//-- BASIC MOTION FUNCTIONS -------------------------------------//
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user