Open Jython1415 opened 3 years ago
Update: controller inputs can now be viewed using debug commands thanks for the enhancements from my work with #8. The issue is now narrowed down to be somewhere within the translation of controller values to target motor power. That will be the next thing to test.
Update: I added a testing branch to figure out where the problem is, and it is ready for testing. Next time I can test the controller to target power to motor power connection to locate the error.
Update: More set up for the test. I'm taking parts home so I can continue to test the code.
Update: bruh. I'm still stuck
Chain: ctlr -> set func -> update func -> pragma -> act pwr update -> hardware probably set func for update func
Update: I'm preparing tests to do tomorrow on a textfile.
Update: the following code worked
void usercontrol( void )
{
motors_rotation_reset();
debug_print_initial();
motors_update_brake_type();
while (true)
{
debug_updateVar();
ctlr_updateVars();
motors_update_rotation_vars();
tm.set_target(ctlr_axis2);
tm.actual_power = tm.target_power;
tm.spin(directionType::fwd, tm.actual_power, velocityUnits::pct);
debug_print();
vex::task::sleep(20);
}
}
Update I might've found the solution
Make the motor object an input to the functions used in the iterator-aggregator functions.
Files from the last session:
Update: Moved around a lot but I'm still stuck.
I'm trying to make a list of pointers that reference back to the Motor_v2 object
Not quite sure what the main problem is here. It could be a problem with the motor class modifications, but I need better ways of looking into the controller inputs.