You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Refaktoryzacja Firmware Drona - Od Arduino Sketch do Modularnej Architektury
1
+
# Drone Firmware Refactoring - From Arduino Sketch to Modular Architecture
2
2
3
-
## 🎯 Cel Projektu
3
+
## 🎯 Project Goal
4
4
5
-
Przekształcenie monolitycznego sketch'a Arduino (437 linii w jednym pliku) w profesjonalną, modularną architekturę oprogramowania dla mikro-quadcopter'a opartego na**XIAO ESP32-S3**.
5
+
Transforming a monolithic Arduino sketch (437 lines in a single file) into professional, modular firmware architecture for a micro-quadcopter based on**XIAO ESP32-S3**.
6
6
7
7
---
8
8
9
-
## 📄 Kod Wyjściowy - Oryginalny Arduino Sketch
9
+
## 📄 Original Source Code - Arduino Sketch
10
10
11
-
### Charakterystyka oryginalnego kodu:
12
-
-**Plik**: `rx_arduino.ino` (437 linii)
13
-
-**Architektura**: Monolityczna - wszystko w jednym pliku
14
-
-**Styl**: Typowy Arduino sketch z globalnymi zmiennymi
15
-
-**Język**: Mieszanka polskiego i angielskiego w komentarzach
11
+
### Original code characteristics:
12
+
-**File**: `rx_arduino.ino` (437 lines)
13
+
-**Architecture**: Monolithic - everything in one file
14
+
-**Style**: Typical Arduino sketch with global variables
15
+
-**Language**: Mix of Polish and English in comments
16
16
17
-
### Funkcjonalności implementowane w oryginalnym kodzie:
17
+
### Functionalities implemented in original code:
18
18
19
-
#### 🛩️ **System Sterowania**
20
-
-**Tryby kontroli**:
21
-
- ANGLE mode dla roll/pitch (kaskadowy PID: kąt → prędkość kątowa)
22
-
- RATE mode dla yaw (bezpośredni PID prędkości kątowej)
|**Extensibility**|Hard to add features | Clean interfaces| 📈 Development |
203
+
|**Safety**|Raw types|Encapsulated structures| 📈 Type Safety |
204
204
205
205
---
206
206
207
-
## 🚀 Korzyści dla Rozwoju
207
+
## 🚀 Development Benefits
208
208
209
-
### 1. **Łatwość Modyfikacji**
210
-
-Zmiany PID → tylko`config.h`
211
-
-Nowy sensor → nowy moduł w`include/` + `src/`
212
-
- Debug → jasne interfejsy modułów
209
+
### 1. **Ease of Modification**
210
+
- PID changes → only`config.h`
211
+
-New sensor → new module in`include/` + `src/`
212
+
- Debug → clear module interfaces
213
213
214
-
### 2. **Współpraca Zespołowa**
215
-
-Różne osoby mogą pracować nad różnymi modułami
216
-
-Jasne API między modułami
217
-
- Git-friendly (małe, logiczne commity)
214
+
### 2. **Team Collaboration**
215
+
-Different people can work on different modules
216
+
-Clear API between modules
217
+
- Git-friendly (small, logical commits)
218
218
219
-
### 3. **Jakość Kodu**
220
-
-Kompilacja z`-std=gnu++17`
221
-
- Type safety i const correctness
219
+
### 3. **Code Quality**
220
+
-Compilation with`-std=gnu++17`
221
+
- Type safety and const correctness
222
222
- Separation of concerns
223
223
224
-
### 4. **Przyszłe Rozszerzenia**
225
-
-**Telemetria**: Gotowe miejsce w architekturze
226
-
-**VBAT monitoring**: Stub już przygotowany
227
-
-**Multiple flight modes**: Łatwe do dodania
224
+
### 4. **Future Extensions**
225
+
-**Telemetry**: Ready place in architecture
226
+
-**VBAT monitoring**: Stub already prepared
227
+
-**Multiple flight modes**: Easy to add
228
228
-**Parameter tuning**: Runtime PID adjustment
229
229
230
230
---
231
231
232
-
## 🎖️ Rezultat
232
+
## 🎖️ Result
233
233
234
-
**Transformacja z hobby Arduino sketch do professional-grade embedded firmware**zachowując 100% funkcjonalności lotu przy dramatycznym zwiększeniu maintainability, testability i extensibility.
234
+
**Transformation from hobby Arduino sketch to professional-grade embedded firmware**while preserving 100% flight functionality with dramatic increase in maintainability, testability, and extensibility.
235
235
236
-
Projekt gotowy do kontynuacji rozwoju, team collaboration i production deployment! 🚁✨
236
+
Project ready for continued development, team collaboration, and production deployment! 🚁✨
0 commit comments