mirror of
https://github.com/okalachev/flix.git
synced 2026-03-31 20:43:40 +00:00
Compare commits
1 Commits
1ac443d6f8
...
motor-conf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c41f65ef9 |
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
@@ -143,8 +143,6 @@ If using brushless motors and ESCs:
|
|||||||
1. Set the appropriate PWM using the parameters: `MOT_PWM_STOP`, `MOT_PWM_MIN`, and `MOT_PWM_MAX` (1000, 1000, and 2000 is typical).
|
1. Set the appropriate PWM using the parameters: `MOT_PWM_STOP`, `MOT_PWM_MIN`, and `MOT_PWM_MAX` (1000, 1000, and 2000 is typical).
|
||||||
2. Decrease the PWM frequency using the `MOT_PWM_FREQ` parameter (400 is typical).
|
2. Decrease the PWM frequency using the `MOT_PWM_FREQ` parameter (400 is typical).
|
||||||
|
|
||||||
Reboot the drone to apply the changes.
|
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> **Remove the props when configuring the motors!** If improperly configured, you may not be able to stop them.
|
> **Remove the props when configuring the motors!** If improperly configured, you may not be able to stop them.
|
||||||
|
|
||||||
|
|||||||
11
docs/user.md
11
docs/user.md
@@ -4,17 +4,6 @@ This page contains user-built drones based on the Flix project. Publish your pro
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Author: **Arkadiy "Arky" Matsekh**, Foucault Dynamics, Gold Coast, Australia.<br>
|
|
||||||
The drone was built for the University of Queensland industry-led Master's capstone project.
|
|
||||||
|
|
||||||
**Flight video:**
|
|
||||||
|
|
||||||
<a href="https://drive.google.com/file/d/1NNYSVXBY-w0JjCo07D8-PgnVq3ca9plj/view?usp=sharing"><img height=300 src="img/user/arkymatsekh/video.jpg"></a>
|
|
||||||
|
|
||||||
<img src="img/user/arkymatsekh/1.jpg" height=150> <img src="img/user/arkymatsekh/2.jpg" height=150> <img src="img/user/arkymatsekh/3.jpg" height=150>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Author: [goldarte](https://t.me/goldarte).<br>
|
Author: [goldarte](https://t.me/goldarte).<br>
|
||||||
|
|
||||||
<img src="img/user/goldarte/1.jpg" height=150> <img src="img/user/goldarte/2.jpg" height=150>
|
<img src="img/user/goldarte/1.jpg" height=150> <img src="img/user/goldarte/2.jpg" height=150>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ void setupMotors() {
|
|||||||
// configure pins
|
// configure pins
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
ledcAttach(motorPins[i], pwmFrequency, pwmResolution);
|
ledcAttach(motorPins[i], pwmFrequency, pwmResolution);
|
||||||
|
pwmFrequency = ledcChangeFrequency(motorPins[i], pwmFrequency, pwmResolution); // if re-initializing
|
||||||
}
|
}
|
||||||
sendMotors();
|
sendMotors();
|
||||||
print("Motors initialized\n");
|
print("Motors initialized\n");
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ void setupParameters() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void afterParameterChange(String name, const float value) {
|
||||||
|
if (name == "MOT_PWM_FREQ" || name == "MOT_PWM_RES") setupMotors();
|
||||||
|
if (name == "MOT_PIN_FL" || name == "MOT_PIN_FR" || name == "MOT_PIN_RL" || name == "MOT_PIN_RR") setupMotors();
|
||||||
|
}
|
||||||
|
|
||||||
int parametersCount() {
|
int parametersCount() {
|
||||||
return sizeof(parameters) / sizeof(parameters[0]);
|
return sizeof(parameters) / sizeof(parameters[0]);
|
||||||
}
|
}
|
||||||
@@ -148,6 +153,7 @@ bool setParameter(const char *name, const float value) {
|
|||||||
if (strcasecmp(parameter.name, name) == 0) {
|
if (strcasecmp(parameter.name, name) == 0) {
|
||||||
if (parameter.integer && !isfinite(value)) return false; // can't set integer to NaN or Inf
|
if (parameter.integer && !isfinite(value)) return false; // can't set integer to NaN or Inf
|
||||||
parameter.setValue(value);
|
parameter.setValue(value);
|
||||||
|
afterParameterChange(name, value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ void delay(uint32_t ms) {
|
|||||||
|
|
||||||
bool ledcAttach(uint8_t pin, uint32_t freq, uint8_t resolution) { return true; }
|
bool ledcAttach(uint8_t pin, uint32_t freq, uint8_t resolution) { return true; }
|
||||||
bool ledcWrite(uint8_t pin, uint32_t duty) { 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; }
|
||||||
|
|
||||||
unsigned long __micros;
|
unsigned long __micros;
|
||||||
unsigned long __resetTime = 0;
|
unsigned long __resetTime = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user