|
|
@ -82,7 +82,7 @@ void Subboard10Hbot::initialize() { |
|
|
|
input[2].initAsInput(ARM_X_LIMIT, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true); |
|
|
|
input[3].initAsInput(ARM_Y_LIMIT, ZGPIO::kMode_nopull, ZGPIO::kIRQ_noIrq, true); |
|
|
|
|
|
|
|
static XYRobotCtrlModule::flash_config_t xy_defaultcfg; |
|
|
|
static XYRobotCtrlModule::config_t xy_defaultcfg; |
|
|
|
XYRobotCtrlModule::create_default_cfg(xy_defaultcfg); |
|
|
|
xy_defaultcfg.configInited = true; |
|
|
|
xy_defaultcfg.robot_type = 1; |
|
|
@ -100,22 +100,15 @@ void Subboard10Hbot::initialize() { |
|
|
|
// limit
|
|
|
|
xy_defaultcfg.acc = 800; |
|
|
|
xy_defaultcfg.dec = 800; |
|
|
|
xy_defaultcfg.breakdec = 1600; |
|
|
|
xy_defaultcfg.maxspeed = 600; |
|
|
|
xy_defaultcfg.min_x = 0; |
|
|
|
xy_defaultcfg.max_x = 0; |
|
|
|
xy_defaultcfg.min_y = 0; |
|
|
|
xy_defaultcfg.max_y = 0; |
|
|
|
|
|
|
|
xy_defaultcfg.run_to_zero_max_d = 10000 * 100; |
|
|
|
xy_defaultcfg.run_to_zero_speed = 80; |
|
|
|
xy_defaultcfg.run_to_zero_dec = 1600; |
|
|
|
xy_defaultcfg.look_zero_edge_max_d = 10000 * 3; |
|
|
|
xy_defaultcfg.look_zero_edge_speed = 10; |
|
|
|
xy_defaultcfg.look_zero_edge_dec = 1600; |
|
|
|
|
|
|
|
xyRobotCtrlModule.initialize(getmoduleId(1), &motora, &motorb, &input[0], 4, xy_defaultcfg, nullptr); |
|
|
|
xyRobotCtrlModule.dumpcfg(); |
|
|
|
xyRobotCtrlModule.initialize(getmoduleId(1), &motora, &motorb, &input[0], 4, xy_defaultcfg); |
|
|
|
|
|
|
|
GService::inst()->registerModule(&xyRobotCtrlModule); |
|
|
|
|
|
|
|