Add feature for setting arbitrary pin to arbitrary pwm over mavlink

Add flix.set_pin method for pyflix.
This commit is contained in:
Oleg Kalachev
2026-08-30 22:25:38 +03:00
parent 509a895ee9
commit 3ffc8ec508
5 changed files with 55 additions and 0 deletions
+3
View File
@@ -23,6 +23,8 @@
#define MALLOC_CAP_SPIRAM (1<<10)
#define MALLOC_CAP_8BIT (1<<2)
#define ESP_NOW_MAX_DATA_LEN_V2 1470
#define digitalPinIsValid(pin) true
#define digitalPinCanOutput(pin) true
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
template<typename T> T max(T a, T b) { return a > b ? a : b; }
@@ -192,6 +194,7 @@ void *heap_caps_calloc(size_t n, size_t size, uint32_t caps) {
}
bool ledcAttach(uint8_t pin, uint32_t freq, uint8_t resolution) { return true; }
bool ledcDetach(uint8_t pin) { return true; }
bool ledcWrite(uint8_t pin, uint32_t duty) { return true; }
uint32_t ledcChangeFrequency(uint8_t pin, uint32_t freq, uint8_t resolution) { return freq; }
int8_t digitalPinToAnalogChannel(uint8_t pin) { return -1; }