- May 29, 2023
-
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
This reverts commit 1c180908.
-
Jakub Vaněk authored
This commit creates a concept of a single-instance shared resource. These are intended to correspond to real hardware resources (i.e. there is only one PCF8575 in the Open-Cube). Using this mechanism, it becomes possible to track whether a driver is still used or not. MicroPython GC performs the necessary reachability checks by itself and if it detects that a driver became unused, it will call the appropriate destructor automatically. This allows us to fix some bugs related to MicroPython soft reboot. During such a reboot, only the MPy VM (and some parts of HW/SDK, like pins and PIO) are restarted. Static global variables remain intact. This breaks the current encoder driver - it still thinks it is initialized, but it stops receiving the encoder pin IRQ. This change will allow us declare encoders as a resource used by motors. Motors do get garbage-collected during soft reboot and so they can trigger garbage collection of the encoders object too. This will, in turn, allow us to properly deinitialize the encoder support and then bring it back up after reboot (when needed). This mechanism for doing cleanup before reboot is used also in the RP2 timer module. There the __del__ stops a timer if it goes out of scope.
-
Jakub Vaněk authored
Battery objects can be fully self-contained -- the ADC API that the RP2040 SDK provides can be used from multiple objects at once. This can be contrasted with the encoder implementation -- the interrupt processing there must have some global state (be it the position counters themselves or a list of interrupt-handling objects).
-
Jakub Vaněk authored
-
Jakub Vaněk authored
This should make garbage collection of EV3 sensors/motors slightly more reliable.
-
Jakub Vaněk authored
This prevents a bug where encoders do not work after a soft reboot. This reboot disabled pin IRQs, but it did not tell the encoder module to reenable them on reboot. This change instead relies on Motor's __del__ being called before soft reboot. This way the encoder module can be gracefully deinitilized before the reboot happens. However, as the encoder module is shared between three consumers (jv_motors, opencube_motors, Encoder object), additional refcounting is needed to avoid unwanted interactions between them.
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
This is a sneaky way of disabling speed ramping - infinite acceleration will result in zero rampup/rampdown times.
-
- May 28, 2023
-
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
The previous default led to a slight, but audible motor shaking when a command like run(0) was used. This should also decrease the action signal "noise" - previously the signal looked like a sawtooth as the measured motor position changed only discretely.
-
Jakub Vaněk authored
This will limit the minimum measurable speed to ~50 deg/s, but it should reduce the severity of "ghost measured speed" after quickly stopping the motor.
-
Jakub Vaněk authored
These constants were generated with Matlab pidtune with 'DesignFocus' set to 'disturbance-rejection'. With feedforward in place, feedback can focus on eliminating effects of external disturbances.
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
Jakub Vaněk authored
-
- May 25, 2023
-
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-
Václav Jelínek authored
-