ESC Docs and Specs: http://www.hobbywing.com/goods.php?id=358
Shopping Cart (although I think I will also ask around campus to see if I can find anything):
Servo Tester: Amazon.com
Logic Analyser: Amazon.com
ESC Programmer: hobbywing LED Program Card For Cars & Trucks, xerun, ezrun, quicrun esc - HOBBYWING North America
For the git diff, which two files should I be comparing? I commited my most recent changes so git diff isn’t really showing anything when I call it:
joystick.cpp
case JSButton::button_function_t::k_custom_1:
{
// this custom function lowers the arm (arm down)
SRV_Channel* chan = SRV_Channels::srv_channel(SERVO_CHAN_1 - 1); // this is just to initialize
int onlyOnce = 0;
while (held) {
if (onlyOnce == 0) {
chan = SRV_Channels::srv_channel(SERVO_CHAN_1 - 1); // 0-indexed
ServoRelayEvents.do_set_servo(SERVO_CHAN_1, chan->get_output_max()); // 1-indexed
chan = SRV_Channels::srv_channel(SERVO_CHAN_2 - 1); // 0-indexed
ServoRelayEvents.do_set_servo(SERVO_CHAN_2, chan->get_output_max()); // 1-indexed
onlyOnce++;
}
}
chan = SRV_Channels::srv_channel(SERVO_CHAN_1 - 1); // 0-indexed
ServoRelayEvents.do_set_servo(SERVO_CHAN_1, 1500); // 1-indexed
chan = SRV_Channels::srv_channel(SERVO_CHAN_2 - 1); // 0-indexed
ServoRelayEvents.do_set_servo(SERVO_CHAN_2, 1500); // 1-indexed
break;
}
case JSButton::button_function_t::k_custom_2:
{
// this custom function raises the arm (arm up)
SRV_Channel* chan = SRV_Channels::srv_channel(SERVO_CHAN_1 - 1); // this is just to initialize
int onlyOnce = 0;
while (held) {
if (onlyOnce == 0) {
chan = SRV_Channels::srv_channel(SERVO_CHAN_1 - 1); // 0-indexed
ServoRelayEvents.do_set_servo(SERVO_CHAN_1, chan->get_output_min()); // 1-indexed
chan = SRV_Channels::srv_channel(SERVO_CHAN_2 - 1); // 0-indexed
ServoRelayEvents.do_set_servo(SERVO_CHAN_2, chan->get_output_min()); // 1-indexed
onlyOnce++;
}
}
chan = SRV_Channels::srv_channel(SERVO_CHAN_1 - 1); // 0-indexed
ServoRelayEvents.do_set_servo(SERVO_CHAN_1, 1500); // 1-indexed
chan = SRV_Channels::srv_channel(SERVO_CHAN_2 - 1); // 0-indexed
ServoRelayEvents.do_set_servo(SERVO_CHAN_2, 1500); // 1-indexed
break;
}
AP_Motors6DOF.cpp
case SUB_FRAME_CUSTOM:
// Put your custom motor setup here
add_motor_raw_6dof(AP_MOTORS_MOT_1, 0, 0, -1.0f, 0, 0, -1.0f, 1);
add_motor_raw_6dof(AP_MOTORS_MOT_2, 0, 0, -1.0f, 0, -1.0f, 0, 2);
add_motor_raw_6dof(AP_MOTORS_MOT_3, 0, 0, -1.0f, 0, 1.0f, 0, 3);
add_motor_raw_6dof(AP_MOTORS_MOT_4, 0, 0, -1.0f, 0, 0, 1.0f, 4);
break;
Motor configuration image: