Phil Howard
732e59b314
Pico Wireless: Driver Rewrite
...
* Use a single common function prototype for all (but two) commands
* Remove "last param" from every param, in favour of an "end_cmd"
* Rename "send_cmd" to "start_cmd" to better reflect what it does
* Replace hard-coded param counts with macro (sizeof(params) / sizeof(inParam))
* Eliminate common causes of bugs
* Try to document some functions
* Correct some types (wl_enc_type, peek as bool)
* Handle timeouts & sleep states
* Successful command exits sleep
2022-03-30 15:30:11 +01:00
ZodiusInfuser
2e2b2002c3
Fix for CI compiler error
2022-03-30 14:52:53 +01:00
ZodiusInfuser
5f3ac9411b
Minor internal function rename, and var assignment
2022-03-30 14:29:02 +01:00
ZodiusInfuser
5192e8bc87
Tidied up some debug code
2022-03-30 14:29:02 +01:00
ZodiusInfuser
8d0ae57f2a
Changed type to uint8_t
2022-03-30 14:29:02 +01:00
ZodiusInfuser
1efa75a590
Renamed C++ Servo functions to match MP
2022-03-30 14:29:02 +01:00
ZodiusInfuser
c5be5be759
Made calibration C++ better match MP
2022-03-30 14:29:02 +01:00
ZodiusInfuser
f9a1979d8d
Added AnalogMux to C++
2022-03-30 14:29:02 +01:00
ZodiusInfuser
1b79e85be7
Added offset parameter to Analog, and fixed it not switching between ADC pins
2022-03-30 14:29:02 +01:00
ZodiusInfuser
00408d3b2b
Improved servocluster teardown
2022-03-30 14:29:02 +01:00
ZodiusInfuser
44412365b8
Tidying up of calibration
2022-03-30 14:29:02 +01:00
ZodiusInfuser
09e69ff8d9
Improvements to calibration and a calib example
2022-03-30 14:29:02 +01:00
ZodiusInfuser
6f41834082
Various changes to handle class cleanup
2022-03-30 14:29:02 +01:00
ZodiusInfuser
6c16611e88
Much optimisation of PWM generation code
2022-03-30 14:29:02 +01:00
ZodiusInfuser
f83521d3ff
Expanded list/tuple support to more functions
2022-03-30 14:29:02 +01:00
ZodiusInfuser
e1317f432b
Expanded options for enabling and disabling servos, and fixed some off-by-one errors.
2022-03-30 14:29:02 +01:00
ZodiusInfuser
c352a795a8
Fix for servo cluster frequency being inaccurate at the upper end
2022-03-30 14:29:02 +01:00
ZodiusInfuser
65268098c6
Fix for pulse width bug when changing from high to low frequencies if there was an overrun
2022-03-30 14:29:02 +01:00
ZodiusInfuser
d96db62353
Fix for frequency changes enabling servo PWM
2022-03-30 14:29:02 +01:00
ZodiusInfuser
2819fb0020
Exposed servo value loading
2022-03-30 14:29:02 +01:00
ZodiusInfuser
59014f1e86
MP now supports assigning a new calibration to a servo
2022-03-30 14:29:02 +01:00
ZodiusInfuser
176362a49b
Updated MP bindings to support latest servo features
2022-03-30 14:29:02 +01:00
ZodiusInfuser
e07e248d9e
Big refactor of clusters to reduce memory and improve usability
2022-03-30 14:29:02 +01:00
ZodiusInfuser
72516b2ecc
Added support for servo phase adjustment
2022-03-30 14:29:02 +01:00
ZodiusInfuser
7f90d3c529
Fixed a bug in the overrun code when load_pwm() is called multiple times between DMA reads
2022-03-30 14:29:02 +01:00
ZodiusInfuser
0838483d2b
Added support for pulses with large offsets that cross the wrap level
2022-03-30 14:29:02 +01:00
ZodiusInfuser
c4e39fd426
Added solution for PWMCluster not being able to reach 100% with "loading zone"
2022-03-30 14:29:02 +01:00
ZodiusInfuser
35bd03c02b
Improved Servo constructors
2022-03-30 14:29:02 +01:00
ZodiusInfuser
ec1f0a5ddc
ServoCluster states are now only created for the servos actually assigned
2022-03-30 14:29:02 +01:00
ZodiusInfuser
8fc1270404
Added additional PWM/ServoCluster constructors
2022-03-30 14:29:02 +01:00
ZodiusInfuser
d94a7c0718
Added set_frequency support to ServoCluster
2022-03-30 14:29:02 +01:00
ZodiusInfuser
aeb9705d15
Moved common PWM and MultiPWM out of servo driver, and renamed to cluster
2022-03-30 14:29:02 +01:00
ZodiusInfuser
06c272916c
Fix for incorrect ServoCluster duty
2022-03-30 14:28:17 +01:00
ZodiusInfuser
55cbf23f45
Function rename
2022-03-30 14:28:17 +01:00
ZodiusInfuser
565553b3a1
Added an additional case for out-of-bounds values
2022-03-30 14:28:17 +01:00
ZodiusInfuser
5a5282f099
Improved servo limits logic
2022-03-30 14:28:17 +01:00
ZodiusInfuser
d1238e802e
Added frequency limits
2022-03-30 14:28:17 +01:00
ZodiusInfuser
334ff4e9f9
Added frequency adjustment to Servo
2022-03-30 14:28:17 +01:00
ZodiusInfuser
93eafc4694
All current servo functionality now micropython bindings
2022-03-30 14:28:17 +01:00
ZodiusInfuser
196a5c6111
Much code refactoring and tidy up
2022-03-30 14:28:17 +01:00
ZodiusInfuser
413ef891ce
Partial hardware servo support added to MP
2022-03-30 14:28:17 +01:00
ZodiusInfuser
f5836e56df
Raised servo functions to a base class, and added ServoCluster which uses the PIO PWM.
2022-03-30 14:28:17 +01:00
ZodiusInfuser
d4012a271e
Improvements to servo calibration and usage
2022-03-30 14:28:17 +01:00
ZodiusInfuser
2e58841b5e
Started a hardware PWM servo class, with calibration support
2022-03-30 14:28:17 +01:00
ZodiusInfuser
5957304a46
Adding more PWM functionality
2022-03-30 14:28:17 +01:00
ZodiusInfuser
24aefc16bf
Tidied up PIO implementation + commenting
2022-03-30 14:28:17 +01:00
ZodiusInfuser
de3cb52931
More progress on Servo PIO
2022-03-30 14:28:17 +01:00
ZodiusInfuser
aca98ca747
current WIP code for PIO based PWM
2022-03-30 14:28:17 +01:00
Mike Bell
eb95636bca
Better if update_time is an underestimate
2022-03-29 23:16:18 +01:00
Mike Bell
d96a584ddd
Badger2040: Improve performance of some large frame buffer writes
2022-03-29 23:15:43 +01:00