- Jun 30, 2023
-
-
Jakub Vaněk authored
-
- Jun 06, 2023
-
-
Jakub Vaněk authored
-
Jakub Vaněk authored
This works around a bug in Pico SDK. A poorly-timed short sleep can disrupt all timers in the default alarm pool. There seems to be a race condition - the ALARM3 register is probably set to a value in the past. This causes the alarm to never fire anymore even though the alarm appears to be armed. This workaround forces the ISR to run in this might have happened. Related to https://github.com/raspberrypi/pico-sdk/issues/737
-
Jakub Vaněk authored
Using malloc in interrupts is a bad idea. This change instead uses a preallocated buffer for all modes. In its current state, most of the typedata is also ignored to not waste memory.
-
Jakub Vaněk authored
This was a *bad* idea and I was lucky that it did not explode.
-
- May 30, 2023
-
-
Jakub Vaněk authored
Adjust RP2040 ADC Vref constant to make battery voltage more accurate See merge request !3
-
- May 29, 2023
-
-
Jakub Vaněk authored
My brick was previously under-reporting the measured voltage. To investigate this, I have probed the PCB and got these results: battery voltage ... 8.25 V voltage at ADC pin ... 2.06 V (OK, voltage is correctly divided by 4) ADC ref. voltage ... 3.2 V ADC measurement ... 42122 (OK, corresponds to cca. 2.06 V)
-
Jakub Vaněk authored
-
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
-