diff --git a/DONATIONS.txt b/DONATIONS.txt index 4d1e0869b9..e5628a9ef7 100644 --- a/DONATIONS.txt +++ b/DONATIONS.txt @@ -363,3 +363,7 @@ Harald Wilczak Michel Baily John Grepps Anthony Burbidge +Sherba Baine +Gordon Evans +Fred Figge + diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 6371a04bce..a76bc92bbd 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -969,7 +969,7 @@ QString MainWindow::FindTaranisPath() QString vName=QString::fromUtf16 ( (const ushort *) szVolumeName) ; if (vName.contains("TARANIS")) { eepromfile=drive.absolutePath(); - eepromfile.append("/TARANIS.BIN"); + eepromfile.append("/EEPROM.BIN"); if (QFile::exists(eepromfile)) { pathcount++; path=eepromfile; @@ -985,7 +985,7 @@ QString MainWindow::FindTaranisPath() drives.append(entry->me_devname); eepromfile=entry->me_mountdir; - eepromfile.append("/TARANIS.BIN"); + eepromfile.append("/EEPROM.BIN"); #if !defined __APPLE__ && !defined WIN32 QString fstype=entry->me_type; qDebug() << fstype; diff --git a/companion/src/translations/companion_pl.ts b/companion/src/translations/companion_pl.ts index ab908115dd..e805e5f977 100644 --- a/companion/src/translations/companion_pl.ts +++ b/companion/src/translations/companion_pl.ts @@ -3,81 +3,104 @@ AileronsPage - - - No - Nie - - Yes, controlled by a single channel - + No + Nie + Yes, controlled by a single channel + Tak, kontrolowane przez 1 kanał + + + Yes, controlled by two channels - + Tak, kontrolowane przez 2 kanały - + <br>First Aileron Channel: - + <br> Pierwszy kanał lotek: - + Second Aileron Channel: - + Drugi kanał lotek: AirbrakesPage - - - No - Nie - - Yes, controlled by a single channel - + No + Nie + Yes, controlled by a single channel + Tak, kontrolowane przez 1 kanał + + + Yes, controlled by two channels - + Tak, kontrolowane przez 2 kanały - + <br>First Airbrake Channel: - + <br> Pierwszy kanał hamulców: - + Second Airbrake Channel: - + Drugi kanał hamulców: + + + + AirbreaksPage + + No + Nie + + + Yes, controlled by a single channel + Tak, kontrolowane przez 1 kanał + + + Yes, controlled by two channels + Tak, kontrolowane przez 2 kanały + + + <br>First Airbreak Channel: + <br> Pierwszy kanał hamulców: + + + Second Airbreak Channel: + Drugi kanał hamulców: BankPage - - - One - - + One + Jeden + + + Two - + Dwa - + <br>First Elevon Channel: - + <br> Pierwszy kanał Elevon: - + Second Elevon Channel: - + Drugi kanał Elevon: @@ -87,6 +110,10 @@ Name Nazwa + + Offset + Wyrównanie + Min @@ -97,35 +124,47 @@ Max Maks + + Invert + Odwróć + Curve Krzywa + + Center + Centrowanie + + + Sym + Sym + Subtrim - + Subtrim Direction - + Kierunek PPM Center - + Środek PPM Linear Subtrim - + Liniowy Subtrim Channel %1 - Kanały %1 + Kanał %1 @@ -141,9 +180,9 @@ ConclusionPage - + OK, I understand. - + OK, Rozumiem. @@ -205,52 +244,52 @@ Curve Creator - + Kreator Krzywych Y at X=0 - Y dla X=0 + Y dla X=0 Y at X=100 - Y dla X=100 + Y dla X=100 Both - Obie + Obie x>0 - x>0 + x>0 x<0 - x<0 + x<0 Apply - + Zatwierdź Side - Strona + Strona Y at X=-100 - Y dla X=-100 + Y dla X=-100 Coefficient - Współczynnik + Współczynnik @@ -258,47 +297,47 @@ Nazwa krzywej - + Curve %1 Krzywa %1 - + %1 points %1 punktowa - + Linear - Liniowa + Liniowa - + Single Expo - Pojedyncze expo (wykładnicza) + Pojedyncze expo (wykładnicza) - + Symmetrical f(x)=-f(-x) - Symetryczna (nieparzysta) f(x)=-f(-x) + Symetryczna (nieparzysta) f(x)=-f(-x) - + Symmetrical f(x)=f(-x) - Symetryczna (parzysta) f(x)=f(-x) + Symetryczna (parzysta) f(x)=f(-x) - + Are you sure you want to reset curve %1 ? Jesteś pewien by zresetować krzywą %1 ? - + Editing curve %1 Edycja krzywej k%1 - + Not enough free points in EEPROM to store the curve. Za mało wolnych punktów w eepromie by zapamiętać krzywą. @@ -346,42 +385,42 @@ Nie mogę odnaleźć pliku dźwiękowego %1! - + &Delete &Wykasuj - + Delete Wykasuj - + &Copy &Kopiuj - + Ctrl+C Ctrl+C - + &Cut &Wytnij - + Ctrl+X Ctrl+X - + &Paste &Wklej - + Ctrl+V Ctrl+V @@ -389,24 +428,24 @@ CyclicPage - + 90 - 90 - - - - 120 - 120 + 90 - 120x - 9X {120x?} + 120 + 120 + 120x + 9X {120x?} + + + 140 - 140 + 140 @@ -612,52 +651,52 @@ p, li { white-space: pre-wrap; } FblPage - + Trottle Channel: - + Kanał gazu: - + Yaw Channel: - + Kanał odchylenia: - + Pitch Channel: - + Kanał kąta: - + Roll Channel: - + Kanał rotacji: FlapsPage - - - No - Nie - - Yes, controlled by a single channel - + No + Nie + Yes, controlled by a single channel + Tak, kontrolowane przez 1 kanał + + + Yes, controlled by two channels - + Tak, kontrolowane przez 2 kanały - + <br>First Flap Channel: - + <br> Pierwszy kanał klap: - + Second Flap Channel: - + Drugi kanał Klap: @@ -759,19 +798,19 @@ p, li { white-space: pre-wrap; } FlybarSelectionPage - + Has Flybar - + Posiada flaybar - + Flybarless - + Bez flybara - + Flybar: - + Faybar: @@ -1040,6 +1079,10 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Kontrast ekranu LCD</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Wartości z zakresu 20-45</span></p></body></html> + + Memory Startup Warning + Ostrzeżenie o małym zapasie pamięci + @@ -1228,6 +1271,10 @@ To ustawienie jest używane przez szablony, określa jakie wyjście przypisane j BackLight Brightness Jasność podświetlenia + + Alarm Warning + Ostrzeżenie alarmowe + BackLight Auto OFF after @@ -1326,7 +1373,7 @@ To ustawienie jest używane przez szablony, określa jakie wyjście przypisane j Vario pitch at max - Ton Wario dla maks + Ton Wario dla Maks @@ -1446,52 +1493,52 @@ To ustawienie jest używane przez szablony, określa jakie wyjście przypisane j "No Sound" Warning - + Ostrzeżenie "Brak Dźwięku" Low Memory Warning - + Ostrzeżenie niski stan Pamięci --- - --- + --- 2s - 9X {2s?} + 2s 3s - 9X {3s?} + 3s 4s - 9X {4s?} + 4s 6s - 9X {6s?} + 6s 8s - 9X {8s?} + 8s 10s - 9X {10s?} + 10s 15s - 9X {15s?} + 15s @@ -1840,19 +1887,19 @@ Jesteś pewien ? GyroPage - + No - Nie - - - - Yes, controled by a switch - + Nie + Yes, controled by a switch + Tak, kontrolowane przez przełącznik + + + Yes, controlled by a pot - + Tak, kontrolowane przez potencjometr @@ -1926,24 +1973,24 @@ Jesteś pewien ? HeliPage - + Trottle Channel: - + Kanał gazu: - + Yaw Channel: - + Kanał odchylenia: - + Pitch Channel: - + Kanał kąta: - + Roll Channel: - + Kanał rotacji: @@ -2090,6 +2137,10 @@ Jesteś pewien ? LogicalSwitchesPanel + + Condition + Warunek + V1 @@ -2100,6 +2151,20 @@ Jesteś pewien ? V2 Wartość 2 + + AND + I (logiczne) + + + + Function + Funkcja + + + + AND Switch + Przełącznik "I" + Duration @@ -2110,16 +2175,6 @@ Jesteś pewien ? Delay Opóźnienie - - - Function - Funkcja - - - - AND Switch - - L%1 @@ -2450,36 +2505,6 @@ Chcesz pobrać teraz? Download firmware and voice files Pobierz firmware i pliki dźwiękowe - - - Edit Radio Splash Image... - - - - - Edit the splash image of your Radio - - - - - Read Firmware from Radio - - - - - Read firmware from Radio - - - - - Write Firmware to Radio - - - - - Write firmware to Radio - - Create a new Radio Setting Profile @@ -2493,17 +2518,17 @@ Chcesz pobrać teraz? Firmware does not longer fit in the radio, due to selected firmware options - + Firmware już nie mieści się w pamięci radia ze względu na wybrane parametry Firmware does not fit in the radio, due to selected firmware options - + Firmware już nie mieści się w pamięci radia ze względu na wybrane parametry Do you want to write the firmware to the radio now ? - + Chcesz wgrać firmware do radia teraz? @@ -2517,12 +2542,12 @@ Chcesz pobrać teraz? Read Models and Settings From Radio - + Wczytaj Modele i Ustawienia z radia Write Radio Backup from %1 to the radio? - + Czy zapisać Backup z %1 do radia ? @@ -2532,63 +2557,63 @@ Chcesz pobrać teraz? Backup Models and Settings From Radio - + Zbakupuj Modele i Ustawienia z radia The radio firmware belongs to another product family, check file and preferences! - + Firmware radia nalezy do innej rodziny produktów, sprawdź plik i preferencje ! The radio firmware is outdated, please upgrade! - + Firmware w radiu jest przestarzały. Proszę zaktualizować! Write Backup To Radio - + Zapisz Backup do radia Write Firmware To Radio - + Zapisz firmware do radia Restore Models and Settings To Radio - + Odtwórz Modele i Ustawienia do radia Could not restore Models and Settings to Radio. The models and settings data file can be found at: %1 - + Nie mogę odtworzyć Modeli i Ustawień do radia. Plik modeli i ustawień mozna znaleźć w: %1 Could not write firmware to radio. The models and settings data file can be found at: %1 - + Nie mogę zapisać Firmware do radia. Plik modeli i ustawień mozna znaleźć w: %1 Cannot backup existing Models and Settings from Radio. Firmware write process aborted - + Nie mogę zbackupować Modeli i Ustawień z radia, Zapis Firmawe przerwany Save Radio Backup to File - + Zapisz Backup radia do pliku Read Radio Backup - + Odczytaj backup radia Read Radio Firmware to File - + Odczytaj Firmware radia do pliku @@ -2819,23 +2844,82 @@ Chcesz pobrać teraz? Dutch - + Holenderski Use Dutch in menus - + Użyj holenderskiego w menu - - - Radio Profile - Profil radia + + Edit Radio Splash Image... + Edytor erkanu startowego radia... - - Show a selection list of radio profiles - + + Edit the splash image of your Radio + Edytuj ekran startowy swojego radia + + + + Read Firmware from Radio + Odczytaj Firmware z radia + + + + Read firmware from Radio + Odczytaj Firmware z radia + + + + Write Firmware to Radio + Zapisz firmware do radia + + + + Write firmware to Radio + Zapisz firmware do radia + + + + Write Models and Settings To Radio + Zapisz Modele i Ustawienia do radia + + + + Write Models and Settings to Radio + Zapisz Modele i Ustawienia do radia + + + + Read Models and Settings from Radio + Wczytaj Modele i Ustawienia z radia + + + + Configure software for communicating with the Radio + Ustaw oprogramowanie komunikacyjne z radiem + + + + Write Backup to Radio + Zapisz Backup do radia + + + + Write Backup from file to to Radio + Zapisz Backup do radia z pliku + + + + Backup Radio to File + Zbackupuj radio do pliku + + + + Save a complete backup file of all settings and model data in the Radio + Zachowaj kompletny plik backup wszytkich ustawień i danych modeli z radia @@ -2852,6 +2936,10 @@ Chcesz pobrać teraz? Check OpenTX and Companion updates Sprawdź aktualizacje OpenTX i Companion + + Edit Tx Splash Image... + Edytor erkanu startowego radia... + Fuses... @@ -2867,6 +2955,10 @@ Chcesz pobrać teraz? Open the OpenTX document page in a web browser Otwórz stronę dokumentacji OpenTX w przeglądarce + + Save Tx Models and Settings to file + Zapisz modele radia i ustawienia do pliku + A tribute to those who have contributed to OpenTX and Companion @@ -2903,12 +2995,24 @@ Chcesz pobrać teraz? A new release of Companion is available please check the OpenTX website! Nowe wydanie Companion jest dostępne, proszę sprawdzić stronę OpenTX! + + Firmware does not longer fit in the Tx, due to selected firmware options + Firmware już nie mieści się w pamięci radia ze względu na wybrane parametry + Compilation server requires registration, please check OpenTX web site Serwer kompilacji wymaga rejestracji, proszę odwiedzić stronę OpenTX + + Firmware does not fit in the Tx, due to selected firmware options + Firmware już nie mieści się w pamięci radia ze względu na wybrane parametry + + + Do you want to write the firmware to the transmitter now ? + Chcesz wgrać firmware do radia teraz? + The selected language will be used the next time you start Companion. @@ -2931,6 +3035,14 @@ Chcesz pobrać teraz? The icon size will be used the next time you start Companion. Wybrana wiekość ikon będzie użyta po ponownym uruchomieniu Comapnion. + + Read Models and Settings From Tx + Wczytaj Modele i Ustawienia z radia + + + Write Models and settings from %1 to the Tx? + Czy zapisać Modele i Ustawienia z %1 do radia ? + The file %1 @@ -2940,21 +3052,65 @@ Write anyway ? nie został rozpoznany jako prawidłowy pli Modeli i Ustawień. Czy mimo wszystko zapisać? + + Backup Models and Settings From Tx + Zbakupuj Modele i Ustawienia z radia + Cannot check Models and Settings compatibility! Continue anyway? Nie mogę potwierdzić kompatybilności Modeli i Ustawień. Kontynuować? + + The transmitter firmware belongs to another product family, check file and preferences! + Firmwqare radia nalezy do innej rodziny produktów, sprawdź plik i preferencje ! + + + The transmitter firmware is outdated, please upgrade! + Firmware radia jest przestarzały, proszę zaktualizować! + + + Write Models and Settings To Tx + Zapisz Modele i Ustawienia do radia + + + Write Firmware To Tx + Zapisz firmware do radia + Cannot convert Models and Settings for use with this firmware, original data will be used Nie mogę skonwertować Modeli i Ustawień na ten rodzaj firmware, zostaną użyte oryginalne dane + + Restore Models and Settings To Tx + Odtwórz Modele i Ustawienia do radia + + + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 + Nie mogę odtworzyć Modeli i Ustawień do radia. Plik modeli i ustawień mozna znaleźć w: %1 + Firmware write failed Zapis firmawe nie powiódł się + + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 + Nie mogę zapisać Firmware do radia. Plik modeli i ustawień mozna znaleźć w: %1 + + + Cannot backup existing Models and Settings from TX. Firmware write process aborted + Nie mogę zbackupować Modeli i Ustawień z radia, Zapis Firmawe przerwany + + + Save transmitter Models and Settings to File + Zapisz Modele i Ustawienia z radia do pliku + + + Read Tx Firmware to File + Odczytaj firmware z radia do pliku + OpenTX Home Page: <a href='%1'>%1</a> @@ -2985,6 +3141,18 @@ Czy mimo wszystko zapisać? Load backup from file Załaduj backup z pliku + + Write Models and Settings to transmitter + Zapisz Modele i Ustawienia do radia + + + Read Models and Settings from transmitter + Wczytaj Modele i Ustawienia z radia + + + Write Firmware + Zapisz firmware + Exit @@ -3050,11 +3218,19 @@ Czy mimo wszystko zapisać? Compare Models... Porównaj modele... + + Edit the splash image of your TX + Edytuj ekran startowy swojego radia + List programmers... Lista programistów... + + Write firmware to transmitter + Zapisz firmware do radia + Add Radio Profile @@ -3065,6 +3241,26 @@ Czy mimo wszystko zapisać? Configure Communications... Ustaw komunikację... + + Configure software for communicating with the transmitter + Ustaw oprogramowanie komunikacyjne z radiem + + + Write Models and Settings from file to Tx + Zapisz Modele i Ustawienia z pliku do radia + + + Write Models and Settings from file to transmitter + Zapisz Modele i Ustawienia z pliku do radia + + + Save the Models and Settings from the transmitter to a file + Zapisz Modele i Ustawienia z radia do pliku + + + Read Firmware + Wczytaj Firmware + Yerico @@ -3075,6 +3271,21 @@ Czy mimo wszystko zapisać? Yellow round honey sweet icon theme Żółty zaokrąglony miodiowy motyw ikon + + Read firmware from transmitter + Wczytaj Firmware z radia + + + + + Radio Profile + Profil radia + + + + Show a selection list of radio profiles + Pokaż listę wyboru profili radia + Write @@ -3126,46 +3337,6 @@ Czy mimo wszystko zapisać? Classical Klasyczny - - - Write Models and Settings To Radio - - - - - Write Models and Settings to Radio - - - - - Read Models and Settings from Radio - - - - - Configure software for communicating with the Radio - - - - - Write Backup to Radio - - - - - Write Backup from file to to Radio - - - - - Backup Radio to File - - - - - Save a complete backup file of all settings and model data in the Radio - - Set Menu Language @@ -3306,22 +3477,22 @@ Czy mimo wszystko zapisać? Błąd zapisu pliku %1: %2. + + + Companion + Companion + Backup EEPROM From Radio - + Backup EEPROM z radia Write EEPROM To Radio - - - - - Companion - Companion + Zapis EEPROM do radia @@ -3353,6 +3524,10 @@ Zapisać? Cannot write temporary file! Nie mogę zapisać pliku tymczasowego! + + Backup EEPROM From Tx + Backup EEPROM z radia + Cannot check eeprom compatibility! Continue anyway? @@ -3374,6 +3549,10 @@ Zapisać? Firmware in flash is outdated, please upgrade! Firmware w radiu jest przestarzały. Proszę zaktualizować! + + Write EEPROM To Tx + Zapis EEPROM do radia + Open backup Models and Settings file @@ -3671,25 +3850,25 @@ p, li { white-space: pre-wrap; } MixesPanel - + Move Up W górę - + Ctrl+Up Ctrl+Up - + Move Down W dół - + Ctrl+Down Ctrl+Down @@ -3699,132 +3878,132 @@ p, li { white-space: pre-wrap; } Wyczyść miksery - + Weight(%1) Waga(%1) - + Switch(%1) Przełącznik(%1) - + No Trim Bez trymera - + No DR/Expo Bez DR/Expo - + Offset(%1) Wyrównanie(%1) - + Delay(u%1:d%2) Opóźnienie(u%1:d%2) - + Slow(u%1:d%2) Spowolnienie(u%1:d%2) - + Warn(%1) Ostrzeżenie(%1) - + Not enough available mixers! Za mało dostępnych mikserów! - + Delete Selected Mixes? Skasować wybrane miksery? - + &Add &Dodaj - + Ctrl+A Ctrl+A - + &Edit &Edycja - + Enter Enter - + &Delete &Wykasuj - + Delete Wykasuj - + &Copy &Kopiuj - + Ctrl+C Ctrl+C - + &Cut &Wytnij - + Ctrl+X Ctrl+X - + &Paste &Wklej - + Ctrl+V Ctrl+V - + Du&plicate &Zduplikuj - + Ctrl+U Ctrl+U - + Clear Mixes? Wyczyść miksery? - + Really clear all the mixes? Czy na pewno wyczyścić wszystkie miksery? @@ -3859,13 +4038,17 @@ p, li { white-space: pre-wrap; } Servos - + Serwa Logical Switches Przełączniki logiczne + + Channels + Kanały + Mixes @@ -3892,12 +4075,12 @@ p, li { white-space: pre-wrap; } Telemetria - + Clear Curves? Wyczyść krzywe? - + Really clear all the curves? Czy na pewno wyczyścić wszystkie krzywe? @@ -3905,29 +4088,29 @@ p, li { white-space: pre-wrap; } ModelSelectionPage - + Plane - - - - - Multirotor - + Samolot + Multirotor + Multikopter + + + Helicopter - Heli + Śmigłowiec - + Model Name: - + Nazwa Modelu: - + Model Type: - + Typ Modelu: @@ -4046,7 +4229,11 @@ p, li { white-space: pre-wrap; } Do you want to overwrite radio general settings? - + Czy chcesz nadpisać główne ustawienia radia? + + + Do you want to overwrite TX general settings? + Chcesz nadpisać generalne ustawienia radia? @@ -4096,6 +4283,10 @@ p, li { white-space: pre-wrap; } Positive Dodatnia + + RX Number + Numer Odbiornika + Master @@ -4175,15 +4366,19 @@ p, li { white-space: pre-wrap; } Receiver No. - + Nr odbiornika. ModulePanel + + Trainer Output + Wyjśćie Trenera + Trainer Port - + Port trenera @@ -4200,376 +4395,376 @@ p, li { white-space: pre-wrap; } Radio System - System Radia + System radia MultirotorPage - + Trottle Channel: - + Kanał gazu: - + Yaw Channel: - + Kanał odchylenia: - + Pitch Channel: - + Kanał kąta: - + Roll Channel: - + Kanał rotacji: QObject - + Rud SK - + Ele SW - + Thr Gaz - + Ail Lotki - + P1 Potencjometr 1 - + P2 Potencjometr 2 - + P3 Potencjometr 3 - + S1 Potencjometr 1 - + S2 Potencjometr 2 - + LS Lewy suwak - + RS Prawy suwak - + TrmR Trymer SK - + TrmE Trymer SW - + TrmT Trymer gazu - + TrmA Trymer lotek - - - + + + REa Pokrętło :a - - - + + + REb Pokrętło :b - + Batt Bateria - + A1 Sygnał telemetrii A1 - + A2 Sygnał telemetrii A2 - + Alt Wysokość - + Rpm Obroty - + Fuel Paliwo - + T1 - + SWR SWR - + T2 - + Speed Prędkość - + Dist Odległość - + GPS Alt Wysokość GPS - + Cell Cela - + Vfas - + Curr Natężenie - + Cnsp - + Powr Moc - + Cells Cele - + AccX - + AccY - + AccZ - + HDG - + VSpd - + A1- - + A2- - + Alt- - + Alt+ - + Rpm+ - + T1+ - + T2+ - + Time - + MAX - + S11 P11 - + S12 P12 - + S13 P13 - + S14 P14 - + S15 P15 - + S16 P16 - + S21 P21 - + S22 P22 - + S23 P23 - + S24 P24 - + S25 P25 - + S26 P26 - + CYC%1 - + CH%1%2 Kan %1%2 - + X%1 - - - + + + ---- @@ -4581,40 +4776,40 @@ p, li { white-space: pre-wrap; } THR - + ON Włącz - - + + OFF Wyłącz - + Diff(%1) Róźnicowość(%1) - + Expo(%1) Expo(%1) - + Function(%1) Funkcja(%1) - + Curve(%1) Krzywa(%1) - + !Curve(%1) !Krzywa(%1) @@ -5138,587 +5333,596 @@ p, li { white-space: pre-wrap; } Pokrętło :E - + No repeat Bez powtórzeń - + %1 sec %1 s - + Safety %1 Bezpieczny %1 - + S3 S3 - + RSSI Tx RSSI Tx - + RSSI Rx RSSI Rx - + Rx Batt Bateria Rx - + A3 A3 - + A4 A4 - ASpd - ASpd + ASpd - + dTE dTE - + + AirSpeed + Prędkość wzgl. Powierza + + + A3- A3- - + A4- A4- - + + AirSpeed+ + Prędkość wzgl. Powierza+ + + + ACC ACC - - + + L1 L1 - - + + L2 L2 - - + + L3 L3 - - + + L4 L4 - - + + L5 L5 - - + + L6 L6 - - + + L7 L7 - - + + L8 L8 - - + + L9 L9 - - + + L10 L10 - - + + L11 L11 - - + + L12 L12 - - + + L13 L13 - - + + L14 L14 - - + + L15 L15 - - + + L16 L16 - - + + L17 L17 - - + + L18 L18 - - + + L19 L19 - - + + L20 L20 - - + + L21 L21 - - + + L22 L22 - - + + L23 L23 - - + + L24 L24 - - + + L25 L25 - - + + L26 L26 - - + + L27 L27 - - + + L28 L28 - - + + L29 L29 - - + + L30 L30 - - + + L31 L31 - - + + L32 L32 - + [I%1] [W%1] - + TR%1 TR%1 - + S31 S31 - + S32 S32 - + S33 S33 - + S34 S34 - + S35 S35 - + S36 S36 - + RudTrim Left SK Trymer lewy - + RudTrim Right SK Trymer prawy - + EleTrim Down SW Trymer w dół - + EleTrim Up SW Trymer w górę - + ThrTrim Down Gaz Trymer w dół - + ThrTrim Up Gaz Trymer w gorę - + AilTrim Left Lotki trymer w lewo - + AilTrim Right Lotki trymer w prawo - + ABS ABS - + THs THs - + TH% TH% - + THt THt - + ??? ??? - + a>x a>x - + a<x a<x - + |a|>x |a|>x - + |a|<x |a|<x - + AND I (logiczne) - + OR Lub (logiczne) - + XOR XOR (Logiczne) - + a=b a=b - + a!=b a!=b - + a>b a>b - + a<b a<b - + a>=b a>=b - + a<=b a<=b - + d>=x d>=x - + |d|>=x |d|>=x - + a=x a=x - + a~x a~x - + Timer Timer - + Sticky Trwałe przełączenie - + Unknown Nieznane - + STAY(%1, [%2:%3]) Utrzymuj(%1, [%2:%3]) - + STICKY(%1, %2) Trwałe przełączenie (%1, %2) - + TIMER(%1, %2) TIMER(%1, %2) - + Trainer Trener - + Trainer RUD Trener - SK - + Trainer ELE Trener - SW - + Trainer THR Trener - Gaz - + Trainer AIL Trener - Lotki - + Instant Trim Natychmiastowe trymowanie - + Play Sound Odtwórz dźwięk - + Play Haptic Wibruj - + Reset Zresetuj - + Set Timer %1 Ustaw Timer %1 - + Vario Wariometr - + Play Both Odtwórz oba - + Play Value Odtwórz wartość - + Start Logs Start logowania - + Volume Głośność - + Backlight Podświetlenie - + Adjust GV%1 Ustaw ZG%1 - - - - - - + + + + + + <font color=red><b>Inconsistent parameter</b></font> Niespójny parametr <font color=red><b>Niespójny parametr</b></font> - + Rotary Encoder Pokrętło @@ -5854,12 +6058,12 @@ p, li { white-space: pre-wrap; } Lotki - + Play Track Odtwórz ścieżkę - + --- @@ -5898,7 +6102,7 @@ p, li { white-space: pre-wrap; } X%1 - X%1 + X%1 @@ -5907,110 +6111,110 @@ p, li { white-space: pre-wrap; } Kan %1 - + Background Music Muzyka tła - + Background Music Pause Muzyka tła - pauza - + Delay %1 sec Opóźnienie %1sec - + Duration %1 sec Czas trwania %1 sec - - - - + + + + Timer1 - - - - + + + + Timer2 - + Speed+ Prędkość+ - + Dist+ Dyst+ - + Cell- Cela- - + Cells- Cele- - + Vfas- Vfat- - + Curr+ Natęż+ - + Powr+ Moc+ - + Edge Brzeg - - - + + + All Wszystkie - - - + + + Telemetry Telemetria - - + + Value Wartość - - + + Decr: Zmniejsz: - - + + Incr: Zwiększ: @@ -6025,22 +6229,22 @@ p, li { white-space: pre-wrap; } - + Value Wartość - + Source Źródło - + GVAR Zmienna - + Increment Zwiększanie @@ -6071,14 +6275,14 @@ p, li { white-space: pre-wrap; } Przyciski i Drążki - + -GV%1 -ZG%1 - - + + GV%1 ZG%1 @@ -6095,26 +6299,26 @@ p, li { white-space: pre-wrap; } Równoległe użycie expo i krzywych nie jest dłużej wspierane - + OpenTX only accepts %1 points in all curves OpenTX zezwala tylko na %1 punktów we wszytkich krzywych - - - - + + + + OpenTX on this board doesn't accept this function OpenTX na tej platformie nie dopuszcza tej funkcji - - + + OpenTX doesn't accept this protocol OpenTX nie obsługuje tego protokołu - + OpenTX doesn't allow this number of channels OpenTX nie obsługuje tej ilości kanałów @@ -6179,20 +6383,20 @@ Zespół OpenTX/Companion. RudderPage - - - No - Nie - - Yes - Tak + No + Nie - + + Yes + Tak + + + <br>Rudder Channel: - + <br> Kanał Steru Kierunku: @@ -6212,11 +6416,19 @@ Zespół OpenTX/Companion. Timer1 Timer 01 + + Throttle Source + Źródło gazu + Center beep Pikanie przy centrowaniu + + Trim Increment + Kroki trymera + OFF @@ -6272,6 +6484,10 @@ Zespół OpenTX/Companion. Display Checklist Wyświetl Czeklistę + + Throttle Trim + Trymer gazu + Throttle Warning @@ -6295,17 +6511,17 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Throttle Trim Idle Only - + Trymer gazu tylko dla wolnych obrotów Timer Source - + Źródło Timera Trim Step - + Krok Trymera @@ -6336,36 +6552,40 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również SimpleTailPage - + Elevator Channel: - + Kanał Steru Wysokości: SimulatorDialog - - + + Warning Ostrzeżenie - + Joystick enabled but not configured correctly Joystick uaktywniony ale nieprawidłowo skonfigurowany - + Cannot open joystick, joystick disabled Nie mogę otworzyć joysticka, dezaktywowany - + Simulating Radio (%1) - + Symulacja Radia (%1) - + Simulating Tx (%1) + Symulacja Tx (%1) + + + Firmware %1 error: %2 Firmware %1 błąd: %2 @@ -6378,124 +6598,124 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Symulator Companion - - - - + + + + Right Double Click to Reset Powójne kliknięcie PPM w celu zresetowania - + THR Gaz - + RUD SK - + ELE SW - + AIL Lotki - - + + Hold X Przytrzymaj X - - + + Fix X Zablokuj X - - + + Fix Y Zablokuj Y - - + + Hold Y Przytrzymaj Y - - - - + + + + TextLabel Etykieta - + TRN TRN - + GEA GEA - + ID0 ID0 - + ID1 DI1 - + ID2 ID2 - + BEEP Dźwięk - + P1 Potencjometr1 - - - + + + 0 % - + P2 Potencjometr2 - + P3 Potencjometr 3 - + 9x Simulator Symulator 9x - + Outputs Wyjścia @@ -6508,125 +6728,125 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Symulator Companion - - + + Hold Y Przytrzymaj Y - - + + Fix Y Zablokuj Y - - + + Fix X Zablokuj X - - + + Hold X Przytrzymaj X - - + + SD SD - - + + SC SC - - - - + + + + Right Double Click to Reset Powójne kliknięcie PPM w celu zresetowania - - + + S2 S2 - - + + SG SG - - + + RS RS - - + + SH SH - - - - + + + + TextLabel Etykieta - - + + S1 S1 - - + + SB SB - - + + SA SA - - + + SE SE - - - + + + SF SF - - + + LS LS - + Taranis Simulator Symulator Taranis - + Outputs Wyjścia @@ -6636,43 +6856,43 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Channel %1 - Kanały %1 + Kanał %1 TailPage - + Rudder Channel: - + Kanał Steru Kierunku: - + Elevator Channel: - + Kanał Steru Wysokości: TailSelectionPage - + Elevator and Rudder - - - - - Only Elevator - + Ster Wysokości i Ster Kierunku - V-tail - + Only Elevator + Tylko Ster Wysokości - + + V-tail + Usterzenie motylkowe + + + Tail Type: - + Typ ogona: @@ -6871,12 +7091,12 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również mAh - + mAh A - + A @@ -6965,7 +7185,11 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Offset - + Offset + + + Min Value + Min. Wartość @@ -7101,20 +7325,20 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również ThrottlePage - - - Yes - Tak - - No - Nie + Yes + Tak - + + No + Nie + + + <br>Throttle Channel: - + <br>Kanał gazu: @@ -7137,7 +7361,11 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Minute Call - + Pikanie minutowe + + + MinuteBeep + Pikanie minutowe @@ -7152,10 +7380,14 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również TimerPanel + + None + Żaden + Silent - + Cisza @@ -7165,33 +7397,37 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Voice - Komuniakty głosowe + Komuniakty głosowe + + + Countdown + Odlicznie VTailPage - + First Tail Channel: - + Pierwszy Kanał Ogona: - + Second Tail Channel: - + Drugi Kanał Ogona: WingtypeSelectionPage - + Standard Wing - + Standardowe Skrzydło - + Flying Wing / Deltawing - + Latające skrzydło / Delta @@ -7199,237 +7435,241 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Model Wizard - + Kreator ustawień modelu Model Type - Typ modelu + Typ modelu Enter model name and model type. - + Wprowadź nazwę modelu i typ. Throttle - Gaz + Gaz Has your model got a motor or an engine? - + Czy Twój model posiada silnik? Wing Type - + Rodzaj Skrzydeł Is your model a flying wing/deltawing or has it a standard wing configuration? - + Czy Twój model jest latającym skrzydłem/deltą czy posiada standardowe skrzydła? Ailerons - + Lotki Has your model got ailerons? - + Czy Twój model posiada lotki? Flaps - + Klapy Has your model got flaps? - + Czy Twój model posiada klapy? Airbrakes - + Hamulce aerodynamiczne Has your model got airbrakes? - + Czy Twój model posiada hamulce aerodynamiczne? Flying-wing / Delta-wing - + Latające skrzydło / Delta Are the elevons controlled by servos connected to separate channels or by a single servo channel? - + Czy sterolotki kontrolowane sa przez serwa podpięte pod oddzielne czy pod jeden kanał? Rudder - SK + Ster Kierunku Does your model have a rudder? - + Czy Twój model posiada ster kierunku? Tail Type - + Typ Ogona Select which type of tail your model is equiped with. - + Wybierz typ ogona Twojego modelu. Tail - Ogon + Ogon Select channels for tail control. - + Wybierz kanały kontrolujące ogon. V-Tail - + Motylkowy Select elevator channel. - + Wybierz kanał Steru Wysokości. Cyclic - + Okresowy Which type of swash control is installed in your helicopter? - + Jaki typ sterowania tarczy ma Twój śmigłowiec? Tail Gyro - + Gyro ogonowe Has your helicopter got an adjustable gyro for the tail? - + Czy Twój śmigłowiec posiada regulowane Gyro ogonowe? Rotor Type - + Typ Wirnika Has your helicopter got a flybar? - + Czy Twój model posiada flybar? Helicopter - Heli + Śmigłowiec Select the controls for your helicopter - + Wybierz sterowanie Twojego śmigłowca Multirotor - + Wielowirnikowiec Select the control channels for your multirotor - + Wybierz sterowanie Twojego wielowirnikowca Save Changes - + Zapisz Zmiany Manually check the direction of each control surface and reverse any channels that make controls move in the wrong direction. Remove the propeller/propellers before you try to control your model for the first time.<br>Please note that continuing removes all old model settings! - + Ręcznie sprawdź kierunki działania płaszczyzn sterowych i zrewersuj kanał którego kontrola działa w nieprawidłowym kierunku. Zdemontuj śmigło(a) przed sprawdzeniem pierwszy rac Twojego modelu.<br> Uwaga: kontynuacja usunie stare ustawienia modelu! Enter a name for your model and select model type. - + Wprowadź nazwę modelu i typ. Select the receiver channel that is connected to your ESC or throttle servo.<br><br>Throttle - Spektrum: CH1, Futaba: CH3 - + Wybierz kanał odbiornika który kontroluje ESC/serwo gazu.<br><br>Gaz - Spektrum: Kn1, Futaba: Kn3 Most aircraft have a main wing and a tail with control surfaces. Flying wings and delta winged aircraft only have a single wing. The main control surface on a standard wing controlls the roll of the aircraft. This surface is called an aileron.<br>The control surface of a delta wing controls both roll and elevation. This surface is called an elevon. - + Większość samolotów posiada powierzchnie sterowe na skrzydłach i ogonie. Latające skrzydło oraz delta posada tylko sterowanie na skrzydłach. Główne powierzchnie sterowe starndardowych skrzydeł powodują obórt samolotu w osi podłużnej. Są to lotki.<br> Powierzchnie sterowe na skrzydle w delcie i latającym skrzydle działają jako lotki i ster wysokości. Są to sterolotki. Models use one or two channels to control the ailerons.<br>A so called Y-cable can be used to connect single receiver channel to two separeate aileron servos. If your servos are connected by a Y-cable you should select the single-servo option.<br><br>Aileron - Spektrum: CH2, Futaba: CH1 - + Większość modelu używa jednego lub 2ch kanałów do sterowania lotkami.<br><br>Przez tzw. Y-kabel mogą być kontrolowane 2 serwa na jednym kanale. Jeśli używasz Y-kabla wybierz opcję z jednym serwem.<br><br> Lotki - Spektrum: Kn2, Futaba: Kn1 This wizard assumes that your flaps are controlled by a switch. If your flaps are controlled by a potentiometer you can change that manually later. - + Kreator uznaje że kontroluje klapy tylko przełącznikiem. Jeśli chcesz kontrolować klapy potencjometrem mozęsz zmienić to ręcznie pózniej. Air brakes are used to reduce the speed of advanced sail planes.<br>They are very uncommon on other types of planes. - + Hamulce aerodynamiczne są uzywane do zmniejszenia prędkości szybowca.<br> Sa bardzo rzadko używane w innych typach samolotów. Models use one or two channels to control the elevons.<br>A so called Y-cable can be used to connect single receiver channel to two separeate elevon servos. If your servos are connected by a Y-cable you should select the single-servo option. - + + Model używa jednego lub dwóch kanałów do kontrolowania sterolotek.<br>Przez tzw. Y-kabel mogą być kontrolowane 2 serwa na jednym kanale. Jeśli używasz Y-kabla wybierz opcję z jednym serwem. + + + Select the receiver channel that is connected to your rudder.<br><br>Rudder - Spektrum: CH4, Futaba: CH4 - + Wybierz kanał odbiornika który kontroluje Ster Kierunku.<br><br>Ster Kierunku - Spektrum: Kn4, Futaba: Kn4 Select the tail type of your plane. - + Wybierz typ ogona Twojego modelu. Select the Rudder and Elevator channels.<br><br>Rudder - Spektrum: CH4, Futaba: CH4<br>Elevator - Spektrum: CH3, Futaba: CH2 - + Wybierz kanały sterów wysokości i kerunku.<br><br>Ster Kierunku - Spektrum: Kn4, Futaba: Kn4<br>Ster Wysokości - Spektrum: Kn3, Futaba: Kn2 Select the Elevator channel.<br><br>Elevator - Spektrum: CH3, Futaba: CH2 - + Wybierz kanał Steru wysokości.<br><br>Ster Wysokiości - Spektrum: Kn3, Futaba: Kn2 @@ -7439,40 +7679,40 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również TBD. - + TBD. Select the control channels for your multirotor.<br><br>Throttle - Spektrum: CH1, Futaba: CH3<br>Yaw - Spektrum: CH4, Futaba: CH4<br>Pitch - Spektrum: CH3, Futaba: CH2<br>Roll - Spektrum: CH2, Futaba: CH1 - + Wybierz kanały kotroli Twojego wielowirnikowca.<br><br>Gaz - Spektrum: Kn1, Futaba: Kn3<br>>Odchylenie - Spektrum: Kn4, Futaba: Kn4<br>Kąt - Spektrum: Kn3, Futaba: Kn2<br>Rotacja - Spektrum: Kn2, Futaba: Kn1 There is no help available for the current page. - + Brak pomocy dla aktualnej strony. Model Wizard Help - + Pomoc kreatora modelu WizardPrinter - - - Model Name: - - - Model Type: - + Model Name: + Nazwa Modelu: - + + Model Type: + Typ Modelu: + + + Channel %1: - + Kanał %1: @@ -7495,6 +7735,11 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Open Folder Otwórz katalog + + + General Settings Label + Główne ustawienia nagłowek + User Splash Screens @@ -7528,7 +7773,7 @@ Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również Use model wizard when creating a new model - + Użyj konfiguratora nowych modeli do stworzenia modelu @@ -7857,11 +8102,6 @@ To ustawienie jest używane przez szablony, określa jakie wyjście przypisane j Joystick Joystick - - - General Settings Label - - Find Executable @@ -8443,6 +8683,10 @@ m2560 dla platformy V4 Cancel Przerwij + + Write firmware to TX + Zapisz firmware do radia + Current profile @@ -8489,11 +8733,23 @@ m2560 dla platformy V4 Błąd otwarcia pliku %1: %2. + + Write Models and Settings to TX + Zapisz Modele i Ustawienia do radia + + + Write Models and Settings in %1 to TX + Zapisz Modele i Ustawienia w %1 do radia + Open Firmware File Otwórz plik Firmware + + Choose file to load Models and Settings from + Wybierz plik Modeli i Ustawien do wczytania + %1 may not be a valid firmware file @@ -8528,6 +8784,10 @@ m2560 dla platformy V4 The profile image %1 does not contain an image. Obraz profilu %1 nie zawiera obrazka. + + Open image file to use as Tx start screen + Otwórz plik obrazka by użyć go jako ekran startowy radia + Image could not be loaded from %1 @@ -8546,27 +8806,27 @@ m2560 dla platformy V4 Write firmware to Radio - + Zapisz firmware do radia Write Backup to Radio - + Zapisz Backup do radia Write Backup from %1 to Radio - + Zapisz Backup z %1 do radia Choose Radio Backup file - + Wybierz plik Backupu radia Open image file to use as radio start screen - + Otwórz plik obrazka by użyć go jako ekran startowy radia @@ -10843,7 +11103,7 @@ Mode 4: Blades - Łopaty śmigła + Łopaty @@ -10895,12 +11155,12 @@ Mode 4: No Taranis Radio Found - Nie znaleziono Radia Taranis + Nie odnaleziono Radia Taranis <html><head/><body><p>No Taranis Radio was found!</p><p>Make sure that you hold the lower trim buttons towards the center while you turn it on.</p><p>Then connect the USB wire.</p></body></html> - <html><head/><body><p>Radio Taranis nie znalezione</p><p>Upewnij się że trzymasz oba dolne trymery wciśnięte w stronę środka gdy włączasz radio.</p><p>Potem podłącz kabel USB.</p></body></html> + <html><head/><body><p>Nie odnalezioeno radia Taranis !</p><p>Upewnij się ze trzymasz oba dolne trymery przełączone w strone środka w ttrakcie uruchamiania radia.</p><p>Następnie podłącz kabel USB.</p></body></html> diff --git a/radio/src/.gitignore b/radio/src/.gitignore index 902bdbbacb..5bf38bf1f5 100644 --- a/radio/src/.gitignore +++ b/radio/src/.gitignore @@ -19,3 +19,4 @@ /BMP /traces /MODELS +/FIRMWARES diff --git a/radio/src/Makefile b/radio/src/Makefile index e21c42da33..056f04db04 100644 --- a/radio/src/Makefile +++ b/radio/src/Makefile @@ -635,7 +635,7 @@ ifeq ($(PCB), TARANIS) EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/hid/inc BOARDSRC = targets/taranis/board_taranis.cpp - EXTRABOARDSRC += targets/taranis/lcd_driver.cpp targets/taranis/aspi.c targets/taranis/i2c.c targets/taranis/delays.c + EXTRABOARDSRC += targets/taranis/lcd_driver.cpp targets/taranis/flash_driver.cpp targets/taranis/aspi.c targets/taranis/i2c.c targets/taranis/delays.c SRC += CoOS/kernel/core.c CoOS/kernel/hook.c CoOS/kernel/task.c CoOS/kernel/event.c CoOS/kernel/time.c CoOS/kernel/timer.c CoOS/kernel/flag.c CoOS/kernel/mutex.c CoOS/kernel/serviceReq.c CoOS/portable/GCC/port.c CoOS/portable/arch.c SRC += targets/taranis/pwr_driver.c targets/taranis/usb_driver.c EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp eeprom_conversions.cpp diff --git a/radio/src/bootloader/Makefile b/radio/src/bootloader/Makefile index 1e98fe3d9e..0e178100f8 100644 --- a/radio/src/bootloader/Makefile +++ b/radio/src/bootloader/Makefile @@ -158,10 +158,11 @@ SRC = ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ ../targets/taranis/aspi.c \ ../targets/taranis/usb_bsp.c \ ../targets/taranis/usb_driver.c \ - ../targets/taranis/pwr_driver.c + ../targets/taranis/pwr_driver.c CPPSRC = ../targets/taranis/lcd_driver.cpp \ ../targets/taranis/keys_driver.cpp \ + ../targets/taranis/flash_driver.cpp \ ../targets/taranis/diskio.cpp \ ../targets/taranis/usbd_usr.cpp \ ../targets/taranis/usbd_storage_msd.cpp \ diff --git a/radio/src/bootloader/boot.cpp b/radio/src/bootloader/boot.cpp index 0b095bb7c9..8d1706905e 100644 --- a/radio/src/bootloader/boot.cpp +++ b/radio/src/bootloader/boot.cpp @@ -53,10 +53,6 @@ #include #include -#if defined(PCBTARANIS) -#include "stm32f2xx_flash.h" -#endif - #include "board_taranis.h" #include "../pwr.h" #include "../lcd.h" @@ -67,7 +63,7 @@ #include "../translations/en.h" #if defined(PCBTARANIS) - #define BOOTLOADER_TITLE " OpenTX Boot Loader v1.0" + #define BOOTLOADER_TITLE " Taranis BootLoader - v1.0" #define BOOT_KEY_UP KEY_PLUS #define BOOT_KEY_DOWN KEY_MINUS #define BOOT_KEY_LEFT KEY_MENU @@ -76,16 +72,13 @@ #define BOOT_KEY_EXIT KEY_EXIT #define DISPLAY_CHAR_WIDTH 35 #elif defined(PCBSKY9X) - #define BOOTLOADER_TITLE "Boot Loader - Sky9x" + #define BOOTLOADER_TITLE "Sky9x Boot Loader - v1.0" #endif -#define BOOTLOADER_SIZE 0x8000 - -#if defined(PCBTARANIS) - #define FIRMWARE_ADDRESS 0x08000000 -#elif defined(PCBSKY9X) - #define FIRMWARE_ADDRESS 0x00400000 -#endif +const uint8_t bootloaderVersion[] __attribute__ ((section(".version"), used)) = +{ + 'B', 'O', 'O', 'T', '1', '0' +}; // states enum BootLoaderStates { @@ -131,7 +124,6 @@ uint32_t Valid; uint32_t FlashSize; -uint32_t FlashBlocked = 1; uint32_t LockBits; uint32_t Block_buffer[1024]; @@ -186,112 +178,6 @@ void delay2ms() } #endif -#if defined(PCBTARANIS) -uint32_t isFirmwareStart(uint32_t *block) -{ - if ((block[0] & 0xFFFC0000) != 0x20000000) { - return 0; - } - if ((block[1] & 0xFFF00000) != 0x08000000) { - return 0; - } - if ((block[2] & 0xFFF00000) != 0x08000000) { - return 0; - } - return 1; -} -#elif defined(PCBSKY9X) -uint32_t isFirmwareStart( uint32_t *block ) -{ - if ((block[0] & 0xFFFE3000) != 0x20000000 ) { - return 0; - } - if ((block[1] & 0xFFF80000) != 0x00400000) { - return 0; - } - if ((block[2] & 0xFFF80000) != 0x00400000) { - return 0; - } - return 1; -} -#endif - -#if defined(PCBSKY9X) - -uint32_t (*IAP_Function)(uint32_t, uint32_t); - -uint32_t program( uint32_t *address, uint32_t *buffer ) // size is 256 bytes -{ - uint32_t FlashSectorNum; - uint32_t flash_cmd = 0; - uint32_t i; -// uint32_t flash_status = 0; - // uint32_t EFCIndex = 0; // 0:EEFC0, 1: EEFC1 - /* Initialize the function pointer (retrieve function address from NMI vector) */ - - if ((uint32_t) address == FIRMWARE_START+BOOTLOADER_SIZE) { - if (isFirmwareStart(buffer)) - FlashBlocked = 0; - else - FlashBlocked = 1; - } - - if (FlashBlocked) { - return 1; - } - - // Always initialise this here, setting a default doesn't seem to work - IAP_Function = (uint32_t (*)(uint32_t, uint32_t)) *(( uint32_t *)0x00800008); - FlashSectorNum = (uint32_t) address; - FlashSectorNum >>= 8;// page size is 256 bytes - FlashSectorNum &= 2047;// max page number - - /* Send data to the sector here */ - for ( i = 0; i < 64; i += 1 ) - { - *address++ = *buffer++; - } - - /* build the command to send to EEFC */ - flash_cmd = (0x5A << 24) | (FlashSectorNum << 8) | 0x03; //AT91C_MC_FCMD_EWP ; - - __disable_irq(); - /* Call the IAP function with appropriate command */ - i = IAP_Function( 0, flash_cmd ); - __enable_irq(); - return i; -} - -uint32_t readLockBits() -{ - // Always initialise this here, setting a default doesn't seem to work - IAP_Function = (uint32_t (*)(uint32_t, uint32_t)) *(( uint32_t *)0x00800008); - - uint32_t flash_cmd = (0x5A << 24) | 0x0A;//AT91C_MC_FCMD_GLB ; - __disable_irq(); - (void) IAP_Function( 0, flash_cmd ); - __enable_irq(); - return EFC->EEFC_FRR; -} - -void clearLockBits() -{ - uint32_t i; - uint32_t flash_cmd = 0; - - // Always initialise this here, setting a default doesn't seem to work - IAP_Function = (uint32_t (*)(uint32_t, uint32_t)) *(( uint32_t *)0x00800008); - for ( i = 0; i < 16; i += 1 ) - { - flash_cmd = (0x5A << 24) | ((128*i) << 8) | 0x09; //AT91C_MC_FCMD_CLB ; - __disable_irq(); - /* Call the IAP function with appropriate command */ - (void) IAP_Function( 0, flash_cmd ); - __enable_irq(); - } -} -#endif - void interrupt10ms(void) { Tenms |= 1; // 10 mS has passed @@ -385,116 +271,6 @@ void hw_delay(uint16_t time) // wait } } - -//After reset, write is not allowed in the Flash control register (FLASH_CR) to protect the -//Flash memory against possible unwanted operations due, for example, to electric -//disturbances. The following sequence is used to unlock this register: -//1. Write KEY1 = 0x45670123 in the Flash key register (FLASH_KEYR) -//2. Write KEY2 = 0xCDEF89AB in the Flash key register (FLASH_KEYR) -//Any wrong sequence will return a bus error and lock up the FLASH_CR register until the -//next reset. -//The FLASH_CR register can be locked again by software by setting the LOCK bit in the -//FLASH_CR register. -void unlockFlash() -{ - FLASH->KEYR = 0x45670123; - FLASH->KEYR = 0xCDEF89AB; -} - -void waitFlashIdle() -{ - while (FLASH->SR & FLASH_FLAG_BSY) { - wdt_reset(); - } -} - -#define SECTOR_MASK ((uint32_t)0xFFFFFF07) - -void eraseSector(uint32_t sector) -{ - waitFlashIdle(); - - FLASH->CR &= CR_PSIZE_MASK; - FLASH->CR |= FLASH_PSIZE_WORD; - FLASH->CR &= SECTOR_MASK; - FLASH->CR |= FLASH_CR_SER | (sector << 3); - FLASH->CR |= FLASH_CR_STRT; - - /* Wait for operation to be completed */ - waitFlashIdle(); - - /* if the erase operation is completed, disable the SER Bit */ - FLASH->CR &= (~FLASH_CR_SER); - FLASH->CR &= SECTOR_MASK; -} - -uint32_t program(uint32_t *address, uint32_t *buffer) // size is 256 bytes -{ - uint32_t i; - - if ((uint32_t) address == 0x08008000) { - if (isFirmwareStart(buffer)) { - FlashBlocked = 0; - } - else { - FlashBlocked = 1; - } - } - - if (FlashBlocked) { - return 1; - } - - if ((uint32_t) address == 0x08008000) { - eraseSector(2); - } - if ((uint32_t) address == 0x0800C000) { - eraseSector(3); - } - if ((uint32_t) address == 0x08010000) { - eraseSector(4); - } - if ((uint32_t) address == 0x08020000) { - eraseSector(5); - } - if ((uint32_t) address == 0x08040000) { - eraseSector(6); - } - if ((uint32_t) address == 0x08060000) { - eraseSector(7); - } - - // Now program the 256 bytes - - for (i = 0; i < 64; i += 1) { - /* Device voltage range supposed to be [2.7V to 3.6V], the operation will - be done by word */ - - // Wait for last operation to be completed - waitFlashIdle(); - - FLASH->CR &= CR_PSIZE_MASK; - FLASH->CR |= FLASH_PSIZE_WORD; - FLASH->CR |= FLASH_CR_PG; - - *address = *buffer; - - /* Wait for operation to be completed */ - waitFlashIdle(); - FLASH->CR &= (~FLASH_CR_PG); - - /* Check the written value */ - if (*address != *buffer) { - /* Flash content doesn't match SRAM content */ - return 2; - } - /* Increment FLASH destination address */ - address += 1; - buffer += 1; - } - return 0; -} - #endif uint8_t *cpystr(uint8_t *dest, uint8_t *source) @@ -590,7 +366,7 @@ int menuFlashFile(uint32_t index, uint8_t event) fr = openFirmwareFile(index); fr = f_close(&FlashFile); Valid = 1; - if (isFirmwareStart(Block_buffer) == 0) { + if (!isFirmwareStart(Block_buffer)) { Valid = 2; } } @@ -772,14 +548,10 @@ int main() } #if defined(PCBSKY9X) usbMassStorage(); - lcd_putc( 0, 6*FH, 'F' ); - lcd_putc( 6, 6*FH, '0' + FlashBlocked ); - lcd_putc( 0, 7*FH, 'E' ); - lcd_putc( 6, 7*FH, '0' + EepromBlocked ); #endif } - if ((state == ST_FLASH_MENU) || (state == ST_RESTORE_MENU)) { + if (state == ST_FLASH_MENU || state == ST_RESTORE_MENU) { sdInit(); state == ST_RESTORE_MENU ? memoryType = MEM_EEPROM : memoryType = MEM_FLASH; state = ST_DIR_CHECK; @@ -817,7 +589,7 @@ int main() // TODO Get RTC date/time, dump EEPROM to EEPROMS_PATH/EEPROM_yy-mm-dd-hh-mm-ss.BIN lcd_putsLeft(2*FH, INDENT "Backup successful!"); - //lcd_putsLeft(3*FH, filename); + // lcd_putsLeft(3*FH, filename); if (event == EVT_KEY_BREAK(BOOT_KEY_EXIT) || event == EVT_KEY_BREAK(BOOT_KEY_MENU)) { vpos = 0; state = ST_START; @@ -918,18 +690,26 @@ int main() if (state == ST_FLASHING) { // Commit to flashing uint32_t blockOffset = 0; - lcd_putsLeft(4*FH, "\032Loading..."); + lcd_putsLeft(4*FH, "\032Writing..."); + + if (firmwareAddress == FIRMWARE_ADDRESS + BOOTLOADER_SIZE) { + if (!isFirmwareStart(Block_buffer)) { + state = ST_FLASH_DONE; + } + } + while (BlockCount) { - program((uint32_t *) firmwareAddress, &Block_buffer[blockOffset]); // size is 256 bytes - blockOffset += 64; // 32-bit words (256 bytes) - firmwareAddress += 256; - if (BlockCount > 256) { - BlockCount -= 256; + writeFlash((uint32_t *)firmwareAddress, &Block_buffer[blockOffset]); + blockOffset += FLASH_PAGESIZE/4; // 32-bit words + firmwareAddress += FLASH_PAGESIZE; + if (BlockCount > FLASH_PAGESIZE) { + BlockCount -= FLASH_PAGESIZE; } else { BlockCount = 0; } } + firmwareWritten += 4; // 4K blocks lcd_rect( 3, 6*FH+4, 204, 7); @@ -947,7 +727,7 @@ int main() } if (state == ST_FLASH_DONE) { - lcd_putsLeft(4*FH, "\024Loading Complete"); + lcd_putsLeft(4*FH, "\024Writing Complete"); if (event == EVT_KEY_FIRST(BOOT_KEY_EXIT) || event == EVT_KEY_BREAK(BOOT_KEY_MENU)) { state = ST_START; vpos = 0; diff --git a/radio/src/eeprom_rlc.cpp b/radio/src/eeprom_rlc.cpp index df445dcacc..09b8be5fd4 100644 --- a/radio/src/eeprom_rlc.cpp +++ b/radio/src/eeprom_rlc.cpp @@ -494,7 +494,7 @@ void RlcFile::nextWriteStep() } if (s_write_err == ERR_FULL) { - s_global_warning = STR_EEPROMOVERFLOW; + POPUP_WARNING(STR_EEPROMOVERFLOW); m_write_step = 0; m_write_len = 0; m_cur_rlc_len = 0; diff --git a/radio/src/gui/menu_general.cpp b/radio/src/gui/menu_general.cpp index d9fbca2f5c..329e598704 100644 --- a/radio/src/gui/menu_general.cpp +++ b/radio/src/gui/menu_general.cpp @@ -685,6 +685,46 @@ inline bool isFilenameLower(bool isfile, const char * fn, const char * line) return (!isfile && line[SD_SCREEN_FILE_LENGTH+1]) || (isfile==(bool)line[SD_SCREEN_FILE_LENGTH+1] && strcasecmp(fn, line) < 0); } +#if defined(PCBTARANIS) +void flashBootloader(const char * filename) +{ + FIL file; + f_open(&file, filename, FA_READ); + uint8_t buffer[1024]; + UINT count; + + lcd_clear(); + lcd_putsLeft(4*FH, STR_WRITING); + lcd_rect(3, 6*FH+4, 204, 7); + + static uint8_t unlocked = 0; + if (!unlocked) { + unlocked = 1; + unlockFlash(); + } + + for (int i=0; i= 212 diff --git a/radio/src/gui/view_main.cpp b/radio/src/gui/view_main.cpp index 4c2f8d323b..721925c1c0 100644 --- a/radio/src/gui/view_main.cpp +++ b/radio/src/gui/view_main.cpp @@ -499,13 +499,8 @@ void menuMainView(uint8_t event) uint8_t view_base = view & 0x0f; #endif - uint8_t _event = event; - if (s_global_warning) { - event = 0; - } + switch(event) { - switch(event) - { case EVT_ENTRY: killEvents(KEY_EXIT); killEvents(KEY_UP); @@ -637,16 +632,13 @@ void menuMainView(uint8_t event) return; case EVT_KEY_FIRST(KEY_EXIT): - if (s_global_warning) { - s_global_warning = NULL; - } #if defined(GVARS) && !defined(PCBSTD) - else if (s_gvar_timer > 0) { + if (s_gvar_timer > 0) { s_gvar_timer = 0; } #endif #if !defined(PCBTARANIS) - else if (view == VIEW_TIMER2) { + if (view == VIEW_TIMER2) { resetTimer(1); } #endif @@ -871,15 +863,8 @@ void menuMainView(uint8_t event) } #endif - if (s_global_warning) { - s_warning = s_global_warning; - displayWarning(_event); - if (!s_warning) s_global_warning = NULL; - s_warning = NULL; - } - #if defined(GVARS) && !defined(PCBSTD) - else if (s_gvar_timer > 0) { + if (s_gvar_timer > 0) { s_gvar_timer--; #if LCD_W >= 212 lcd_filled_rect(BITMAP_X, BITMAP_Y, 64, 32, SOLID, ERASE); diff --git a/radio/src/gui/view_telemetry.cpp b/radio/src/gui/view_telemetry.cpp index ae465b18d0..d59f6c6607 100644 --- a/radio/src/gui/view_telemetry.cpp +++ b/radio/src/gui/view_telemetry.cpp @@ -383,6 +383,21 @@ void menuTelemetryFrsky(uint8_t event) lcd_outdezNAtt(LCD_W, y, TELEMETRY_CELL_VOLTAGE(k), attr, 4); y += 1*FH; } +#if defined(PCBTARANIS) + if (frskyData.hub.cellsCount > 6) { + y = 1*FH; + for (uint8_t k=6; kDACC_TNPR = CONVERT_PTR(nextBuffer->data); + DACC->DACC_TNPR = CONVERT_PTR_UINT(nextBuffer->data); DACC->DACC_TNCR = nextBuffer->size/2; } else { diff --git a/radio/src/targets/sky9x/board_sky9x.h b/radio/src/targets/sky9x/board_sky9x.h index 59ad8f1459..45f45e936d 100644 --- a/radio/src/targets/sky9x/board_sky9x.h +++ b/radio/src/targets/sky9x/board_sky9x.h @@ -43,6 +43,10 @@ extern uint16_t ResetReason; +#define BOOTLOADER_SIZE 0x8000 +#define FIRMWARE_SIZE (256*1024) +#define FIRMWARE_ADDRESS 0x00400000 + #if defined(REVA) #define GPIO_BUTTON_MENU PIOB->PIO_PDSR #define GPIO_BUTTON_EXIT PIOA->PIO_PDSR @@ -153,6 +157,10 @@ extern uint16_t sessionTimer; void setSticksGain(uint8_t gains); +// Write Flash driver +#define FLASH_PAGESIZE 256 +void writeFlash(uint32_t * address, uint32_t * buffer); + // Keys driver extern uint32_t readKeys(); extern uint32_t readTrims(); diff --git a/radio/src/targets/sky9x/flash_driver.cpp b/radio/src/targets/sky9x/flash_driver.cpp new file mode 100644 index 0000000000..5d36063955 --- /dev/null +++ b/radio/src/targets/sky9x/flash_driver.cpp @@ -0,0 +1,71 @@ +#include "../../opentx.h" + +uint32_t (*IAP_Function)(uint32_t, uint32_t); + +void writeFlash(uint32_t *address, uint32_t *buffer) // size is 256 bytes +{ + uint32_t FlashSectorNum; + uint32_t flash_cmd = 0; + + // Always initialise this here, setting a default doesn't seem to work + IAP_Function = (uint32_t (*)(uint32_t, uint32_t)) *(( uint32_t *)0x00800008); + FlashSectorNum = (uint32_t) address; + FlashSectorNum >>= 8;// page size is 256 bytes + FlashSectorNum &= 2047;// max page number + + /* Send data to the sector here */ + for (int i=0; iEEFC_FRR; +} + +void clearLockBits() +{ + uint32_t i; + uint32_t flash_cmd = 0; + + // Always initialise this here, setting a default doesn't seem to work + IAP_Function = (uint32_t (*)(uint32_t, uint32_t)) *(( uint32_t *)0x00800008); + for ( i = 0; i < 16; i += 1 ) + { + flash_cmd = (0x5A << 24) | ((128*i) << 8) | 0x09; //AT91C_MC_FCMD_CLB ; + __disable_irq(); + /* Call the IAP function with appropriate command */ + (void) IAP_Function( 0, flash_cmd ); + __enable_irq(); + } +} + +uint32_t isFirmwareStart(uint32_t *block) +{ + if ((block[0] & 0xFFFE3000) != 0x20000000 ) { + return 0; + } + if ((block[1] & 0xFFF80000) != 0x00400000) { + return 0; + } + if ((block[2] & 0xFFF80000) != 0x00400000) { + return 0; + } + return 1; +} diff --git a/radio/src/targets/sky9x/pulses_driver.cpp b/radio/src/targets/sky9x/pulses_driver.cpp index a5aef743e8..86f93bb90c 100644 --- a/radio/src/targets/sky9x/pulses_driver.cpp +++ b/radio/src/targets/sky9x/pulses_driver.cpp @@ -167,7 +167,7 @@ extern "C" void PWM_IRQHandler(void) else { // Kick off serial output here sscptr = SSC; - sscptr->SSC_TPR = CONVERT_PTR(pxxStream[0]); + sscptr->SSC_TPR = CONVERT_PTR_UINT(pxxStream[0]); sscptr->SSC_TCR = (uint8_t *)pxxStreamPtr[0] - (uint8_t *)pxxStream[0]; sscptr->SSC_PTCR = SSC_PTCR_TXTEN; // Start transfers } @@ -191,7 +191,7 @@ extern "C" void PWM_IRQHandler(void) else { // Kick off serial output here sscptr = SSC; - sscptr->SSC_TPR = CONVERT_PTR(dsm2Stream); + sscptr->SSC_TPR = CONVERT_PTR_UINT(dsm2Stream); sscptr->SSC_TCR = (uint8_t *)dsm2StreamPtr - (uint8_t *)dsm2Stream; sscptr->SSC_PTCR = SSC_PTCR_TXTEN; // Start transfers } diff --git a/radio/src/targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c b/radio/src/targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c index 7f3bfc325c..86680f3525 100644 --- a/radio/src/targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c +++ b/radio/src/targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c @@ -97,6 +97,7 @@ static int8_t SCSI_ReadFormatCapacity(uint8_t lun, uint8_t *params); static int8_t SCSI_ReadCapacity10(uint8_t lun, uint8_t *params); static int8_t SCSI_RequestSense (uint8_t lun, uint8_t *params); static int8_t SCSI_StartStopUnit(uint8_t lun, uint8_t *params); +static int8_t SCSI_AllowRemoval(uint8_t lun, uint8_t *params); static int8_t SCSI_ModeSense6 (uint8_t lun, uint8_t *params); static int8_t SCSI_ModeSense10 (uint8_t lun, uint8_t *params); static int8_t SCSI_Write10(uint8_t lun , uint8_t *params); @@ -146,7 +147,7 @@ int8_t SCSI_ProcessCmd(USB_OTG_CORE_HANDLE *pdev, return SCSI_StartStopUnit(lun, params); case SCSI_ALLOW_MEDIUM_REMOVAL: - return SCSI_StartStopUnit(lun, params); + return SCSI_AllowRemoval( lun, params); case SCSI_MODE_SENSE6: return SCSI_ModeSense6 (lun, params); @@ -453,6 +454,12 @@ static int8_t SCSI_StartStopUnit(uint8_t lun, uint8_t *params) return 0; } +static int8_t SCSI_AllowRemoval(uint8_t lun, uint8_t *params) +{ + MSC_BOT_DataLen = 0; + return 0; +} + /** * @brief SCSI_Read10 * Process Read10 command diff --git a/radio/src/targets/taranis/adc_driver.cpp b/radio/src/targets/taranis/adc_driver.cpp index cabb2565be..28ee559767 100644 --- a/radio/src/targets/taranis/adc_driver.cpp +++ b/radio/src/targets/taranis/adc_driver.cpp @@ -99,8 +99,8 @@ void adcInit() ADC->CCR = 0 ; //ADC_CCR_ADCPRE_0 ; // Clock div 2 DMA2_Stream0->CR = DMA_SxCR_PL | DMA_SxCR_MSIZE_0 | DMA_SxCR_PSIZE_0 | DMA_SxCR_MINC ; - DMA2_Stream0->PAR = CONVERT_PTR(&ADC1->DR); - DMA2_Stream0->M0AR = CONVERT_PTR(Analog_values); + DMA2_Stream0->PAR = CONVERT_PTR_UINT(&ADC1->DR); + DMA2_Stream0->M0AR = CONVERT_PTR_UINT(Analog_values); DMA2_Stream0->FCR = DMA_SxFCR_DMDIS | DMA_SxFCR_FTH_0 ; } @@ -111,7 +111,7 @@ void adcRead() DMA2_Stream0->CR &= ~DMA_SxCR_EN ; // Disable DMA ADC1->SR &= ~(uint32_t) ( ADC_SR_EOC | ADC_SR_STRT | ADC_SR_OVR ) ; DMA2->LIFCR = DMA_LIFCR_CTCIF0 | DMA_LIFCR_CHTIF0 |DMA_LIFCR_CTEIF0 | DMA_LIFCR_CDMEIF0 | DMA_LIFCR_CFEIF0 ; // Write ones to clear bits - DMA2_Stream0->M0AR = CONVERT_PTR(Analog_values); + DMA2_Stream0->M0AR = CONVERT_PTR_UINT(Analog_values); DMA2_Stream0->NDTR = NUMBER_ANALOG ; DMA2_Stream0->CR |= DMA_SxCR_EN ; // Enable DMA ADC1->CR2 |= (uint32_t)ADC_CR2_SWSTART ; diff --git a/radio/src/targets/taranis/audio_driver.cpp b/radio/src/targets/taranis/audio_driver.cpp index 15d6fdd370..9c350b16ac 100644 --- a/radio/src/targets/taranis/audio_driver.cpp +++ b/radio/src/targets/taranis/audio_driver.cpp @@ -78,8 +78,8 @@ void dacInit() DMA1->HIFCR = DMA_HIFCR_CTCIF5 | DMA_HIFCR_CHTIF5 | DMA_HIFCR_CTEIF5 | DMA_HIFCR_CDMEIF5 | DMA_HIFCR_CFEIF5 ; // Write ones to clear bits DMA1_Stream5->CR = DMA_SxCR_CHSEL_0 | DMA_SxCR_CHSEL_1 | DMA_SxCR_CHSEL_2 | DMA_SxCR_PL_0 | DMA_SxCR_MSIZE_0 | DMA_SxCR_PSIZE_0 | DMA_SxCR_MINC | DMA_SxCR_DIR_0 | DMA_SxCR_CIRC ; - DMA1_Stream5->PAR = CONVERT_PTR(&DAC->DHR12R1); - // DMA1_Stream5->M0AR = CONVERT_PTR(Sine_values); + DMA1_Stream5->PAR = CONVERT_PTR_UINT(&DAC->DHR12R1); + // DMA1_Stream5->M0AR = CONVERT_PTR_UINT(Sine_values); DMA1_Stream5->FCR = 0x05 ; //DMA_SxFCR_DMDIS | DMA_SxFCR_FTH_0 ; // DMA1_Stream5->NDTR = 100 ; @@ -99,7 +99,7 @@ bool dacQueue(AudioBuffer *buffer) dacIdle = 0; DMA1_Stream5->CR &= ~DMA_SxCR_EN ; // Disable DMA channel DMA1->HIFCR = DMA_HIFCR_CTCIF5 | DMA_HIFCR_CHTIF5 | DMA_HIFCR_CTEIF5 | DMA_HIFCR_CDMEIF5 | DMA_HIFCR_CFEIF5 ; // Write ones to clear bits - DMA1_Stream5->M0AR = CONVERT_PTR(buffer->data); + DMA1_Stream5->M0AR = CONVERT_PTR_UINT(buffer->data); DMA1_Stream5->NDTR = buffer->size; DMA1_Stream5->CR |= DMA_SxCR_EN | DMA_SxCR_TCIE ; // Enable DMA channel and interrupt DAC->SR = DAC_SR_DMAUDR1 ; // Write 1 to clear flag @@ -156,7 +156,7 @@ extern "C" void DMA1_Stream5_IRQHandler() AudioBuffer *nextBuffer = audioQueue.getNextFilledBuffer(); if (nextBuffer) { - DMA1_Stream5->M0AR = CONVERT_PTR(nextBuffer->data); + DMA1_Stream5->M0AR = CONVERT_PTR_UINT(nextBuffer->data); DMA1_Stream5->NDTR = nextBuffer->size; DMA1->HIFCR = DMA_HIFCR_CTCIF5 | DMA_HIFCR_CHTIF5 | DMA_HIFCR_CTEIF5 | DMA_HIFCR_CDMEIF5 | DMA_HIFCR_CFEIF5 ; // Write ones to clear bits DMA1_Stream5->CR |= DMA_SxCR_EN | DMA_SxCR_TCIE ; // Enable DMA channel diff --git a/radio/src/targets/taranis/board_taranis.h b/radio/src/targets/taranis/board_taranis.h index 73cb2f8129..9c97cc5da2 100644 --- a/radio/src/targets/taranis/board_taranis.h +++ b/radio/src/targets/taranis/board_taranis.h @@ -51,6 +51,7 @@ extern "C" { #include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dma.h" #include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_usart.h" #include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h" + #if !defined(SIMU) #include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_core.h" #include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/hid/inc/usbd_hid_core.h" @@ -72,29 +73,33 @@ extern "C" { #include "audio_driver.h" #endif -#define PERI1_FREQUENCY 30000000 -#define PERI2_FREQUENCY 60000000 -#define TIMER_MULT_APB1 2 -#define TIMER_MULT_APB2 2 +#define FLASHSIZE 0x80000 +#define BOOTLOADER_SIZE 0x8000 +#define FIRMWARE_ADDRESS 0x08000000 + +#define PERI1_FREQUENCY 30000000 +#define PERI2_FREQUENCY 60000000 +#define TIMER_MULT_APB1 2 +#define TIMER_MULT_APB2 2 #define JACK_PPM_OUT() #define JACK_PPM_IN() -#define PIN_MODE_MASK 0x0003 -#define PIN_INPUT 0x0000 -#define PIN_OUTPUT 0x0001 -#define PIN_PERIPHERAL 0x0002 -#define PIN_ANALOG 0x0003 -#define PIN_PULL_MASK 0x000C -#define PIN_PULLUP 0x0004 -#define PIN_NO_PULLUP 0x0000 -#define PIN_PULLDOWN 0x0008 -#define PIN_NO_PULLDOWN 0x0000 -#define PIN_PERI_MASK 0x00F0 -#define PIN_PUSHPULL 0x0000 -#define PIN_ODRAIN 0x8000 -#define PIN_PORT_MASK 0x0700 -#define PIN_SPEED_MASK 0x6000 +#define PIN_MODE_MASK 0x0003 +#define PIN_INPUT 0x0000 +#define PIN_OUTPUT 0x0001 +#define PIN_PERIPHERAL 0x0002 +#define PIN_ANALOG 0x0003 +#define PIN_PULL_MASK 0x000C +#define PIN_PULLUP 0x0004 +#define PIN_NO_PULLUP 0x0000 +#define PIN_PULLDOWN 0x0008 +#define PIN_NO_PULLDOWN 0x0000 +#define PIN_PERI_MASK 0x00F0 +#define PIN_PUSHPULL 0x0000 +#define PIN_ODRAIN 0x8000 +#define PIN_PORT_MASK 0x0700 +#define PIN_SPEED_MASK 0x6000 void configure_pins( uint32_t pins, uint16_t config ); @@ -136,6 +141,13 @@ void delay_01us(uint16_t nb); #define SD_CARD_PRESENT() (~SD_PRESENT_GPIO->IDR & SD_PRESENT_GPIO_Pin) #endif +// Flash Write driver +#define FLASH_PAGESIZE 256 +void unlockFlash(); +void writeFlash(uint32_t * address, uint32_t * buffer); +uint32_t isFirmwareStart(uint32_t *block); +uint32_t isBootloaderStart(uint32_t *block); + // Pulses driver void init_no_pulses(uint32_t port); void disable_no_pulses(uint32_t port); diff --git a/radio/src/targets/taranis/flash_driver.cpp b/radio/src/targets/taranis/flash_driver.cpp new file mode 100644 index 0000000000..7e5be65ba1 --- /dev/null +++ b/radio/src/targets/taranis/flash_driver.cpp @@ -0,0 +1,123 @@ +#include "../../opentx.h" +#include "stm32f2xx_flash.h" + +//After reset, write is not allowed in the Flash control register (FLASH_CR) to protect the +//Flash memory against possible unwanted operations due, for example, to electric +//disturbances. The following sequence is used to unlock this register: +//1. Write KEY1 = 0x45670123 in the Flash key register (FLASH_KEYR) +//2. Write KEY2 = 0xCDEF89AB in the Flash key register (FLASH_KEYR) +//Any wrong sequence will return a bus error and lock up the FLASH_CR register until the +//next reset. +//The FLASH_CR register can be locked again by software by setting the LOCK bit in the +//FLASH_CR register. +void unlockFlash() +{ + FLASH->KEYR = 0x45670123; + FLASH->KEYR = 0xCDEF89AB; +} + +void waitFlashIdle() +{ + while (FLASH->SR & FLASH_FLAG_BSY) { + wdt_reset(); + } +} + +#define SECTOR_MASK ((uint32_t)0xFFFFFF07) + +void eraseSector(uint32_t sector) +{ + waitFlashIdle(); + + FLASH->CR &= CR_PSIZE_MASK; + FLASH->CR |= FLASH_PSIZE_WORD; + FLASH->CR &= SECTOR_MASK; + FLASH->CR |= FLASH_CR_SER | (sector << 3); + FLASH->CR |= FLASH_CR_STRT; + + /* Wait for operation to be completed */ + waitFlashIdle(); + + /* if the erase operation is completed, disable the SER Bit */ + FLASH->CR &= (~FLASH_CR_SER); + FLASH->CR &= SECTOR_MASK; +} + +void writeFlash(uint32_t *address, uint32_t *buffer) // page size is 256 bytes +{ + if ((uint32_t) address == 0x08000000) { + eraseSector(0); + } + else if ((uint32_t) address == 0x08004000) { + eraseSector(1); + } + else if ((uint32_t) address == 0x08008000) { + eraseSector(2); + } + else if ((uint32_t) address == 0x0800C000) { + eraseSector(3); + } + else if ((uint32_t) address == 0x08010000) { + eraseSector(4); + } + else if ((uint32_t) address == 0x08020000) { + eraseSector(5); + } + else if ((uint32_t) address == 0x08040000) { + eraseSector(6); + } + else if ((uint32_t) address == 0x08060000) { + eraseSector(7); + } + + for (uint32_t i=0; iCR &= CR_PSIZE_MASK; + FLASH->CR |= FLASH_PSIZE_WORD; + FLASH->CR |= FLASH_CR_PG; + + *address = *buffer; + + /* Wait for operation to be completed */ + waitFlashIdle(); + FLASH->CR &= (~FLASH_CR_PG); + + /* Check the written value */ + if (*address != *buffer) { + /* Flash content doesn't match SRAM content */ + return; + } + /* Increment FLASH destination address */ + address += 1; + buffer += 1; + } +} + +uint32_t isFirmwareStart(uint32_t *block) +{ + if ((block[0] & 0xFFFC0000) != 0x20000000) { + return 0; + } + if ((block[1] & 0xFFF00000) != 0x08000000) { + return 0; + } + if ((block[2] & 0xFFF00000) != 0x08000000) { + return 0; + } + return 1; +} + +uint32_t isBootloaderStart(uint32_t *block) +{ + for (int i=0; i<256; i++) { + if (block[i] == 0x544F4F42/*BOOT*/) { + return 1; + } + } + return 0; +} diff --git a/radio/src/targets/taranis/pulses_driver.cpp b/radio/src/targets/taranis/pulses_driver.cpp index 03dba6085f..d91da68348 100644 --- a/radio/src/targets/taranis/pulses_driver.cpp +++ b/radio/src/targets/taranis/pulses_driver.cpp @@ -259,8 +259,8 @@ static void init_pa10_pxx() DMA2->HIFCR = DMA_HIFCR_CTCIF6 | DMA_HIFCR_CHTIF6 | DMA_HIFCR_CTEIF6 | DMA_HIFCR_CDMEIF6 | DMA_HIFCR_CFEIF6 ; // Write ones to clear bits DMA2_Stream6->CR = DMA_SxCR_CHSEL_1 | DMA_SxCR_CHSEL_2 | DMA_SxCR_PL_0 | DMA_SxCR_MSIZE_0 | DMA_SxCR_PSIZE_0 | DMA_SxCR_MINC | DMA_SxCR_DIR_0 | DMA_SxCR_PFCTRL ; - DMA2_Stream6->PAR = CONVERT_PTR(&TIM1->DMAR); - DMA2_Stream6->M0AR = CONVERT_PTR(&pxxStream[INTERNAL_MODULE][1]); + DMA2_Stream6->PAR = CONVERT_PTR_UINT(&TIM1->DMAR); + DMA2_Stream6->M0AR = CONVERT_PTR_UINT(&pxxStream[INTERNAL_MODULE][1]); // DMA2_Stream2->FCR = 0x05 ; //DMA_SxFCR_DMDIS | DMA_SxFCR_FTH_0 ; // DMA2_Stream2->NDTR = 100 ; DMA2_Stream6->CR |= DMA_SxCR_EN ; // Enable DMA @@ -344,7 +344,7 @@ extern "C" void TIM1_CC_IRQHandler() if (s_current_protocol[INTERNAL_MODULE] == PROTO_PXX) { DMA2_Stream6->CR &= ~DMA_SxCR_EN ; // Disable DMA DMA2->HIFCR = DMA_HIFCR_CTCIF6 | DMA_HIFCR_CHTIF6 | DMA_HIFCR_CTEIF6 | DMA_HIFCR_CDMEIF6 | DMA_HIFCR_CFEIF6 ; // Write ones to clear bits - DMA2_Stream6->M0AR = CONVERT_PTR(&pxxStream[INTERNAL_MODULE][1]); + DMA2_Stream6->M0AR = CONVERT_PTR_UINT(&pxxStream[INTERNAL_MODULE][1]); DMA2_Stream6->CR |= DMA_SxCR_EN ; // Enable DMA TIM1->CCR3 = pxxStream[INTERNAL_MODULE][0]; TIM1->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt @@ -422,8 +422,8 @@ static void init_pa7_pxx() DMA2->LIFCR = DMA_LIFCR_CTCIF2 | DMA_LIFCR_CHTIF2 | DMA_LIFCR_CTEIF2 | DMA_LIFCR_CDMEIF2 | DMA_LIFCR_CFEIF2 ; // Write ones to clear bits DMA2_Stream2->CR = DMA_SxCR_CHSEL_0 | DMA_SxCR_CHSEL_1 | DMA_SxCR_CHSEL_2 | DMA_SxCR_PL_0 | DMA_SxCR_MSIZE_0 | DMA_SxCR_PSIZE_0 | DMA_SxCR_MINC | DMA_SxCR_DIR_0 | DMA_SxCR_PFCTRL ; - DMA2_Stream2->PAR = CONVERT_PTR(&TIM8->DMAR); - DMA2_Stream2->M0AR = CONVERT_PTR(&pxxStream[EXTERNAL_MODULE][1]); + DMA2_Stream2->PAR = CONVERT_PTR_UINT(&TIM8->DMAR); + DMA2_Stream2->M0AR = CONVERT_PTR_UINT(&pxxStream[EXTERNAL_MODULE][1]); // DMA2_Stream2->FCR = 0x05 ; //DMA_SxFCR_DMDIS | DMA_SxFCR_FTH_0 ; // DMA2_Stream2->NDTR = 100 ; DMA2_Stream2->CR |= DMA_SxCR_EN ; // Enable DMA @@ -496,8 +496,8 @@ static void init_pa7_dsm2() DMA2->LIFCR = DMA_LIFCR_CTCIF2 | DMA_LIFCR_CHTIF2 | DMA_LIFCR_CTEIF2 | DMA_LIFCR_CDMEIF2 | DMA_LIFCR_CFEIF2 ; // Write ones to clear bits DMA2_Stream2->CR = DMA_SxCR_CHSEL_0 | DMA_SxCR_CHSEL_1 | DMA_SxCR_CHSEL_2 | DMA_SxCR_PL_0 | DMA_SxCR_MSIZE_0 | DMA_SxCR_PSIZE_0 | DMA_SxCR_MINC | DMA_SxCR_DIR_0 | DMA_SxCR_PFCTRL ; - DMA2_Stream2->PAR = CONVERT_PTR(&TIM8->DMAR); - DMA2_Stream2->M0AR = CONVERT_PTR(&dsm2Stream[1]); + DMA2_Stream2->PAR = CONVERT_PTR_UINT(&TIM8->DMAR); + DMA2_Stream2->M0AR = CONVERT_PTR_UINT(&dsm2Stream[1]); // DMA2_Stream2->FCR = 0x05 ; //DMA_SxFCR_DMDIS | DMA_SxFCR_FTH_0 ; // DMA2_Stream2->NDTR = 100 ; DMA2_Stream2->CR |= DMA_SxCR_EN ; // Enable DMA @@ -586,7 +586,7 @@ extern "C" void TIM8_CC_IRQHandler() if (s_current_protocol[EXTERNAL_MODULE] == PROTO_PXX) { DMA2_Stream2->CR &= ~DMA_SxCR_EN ; // Disable DMA DMA2->LIFCR = DMA_LIFCR_CTCIF2 | DMA_LIFCR_CHTIF2 | DMA_LIFCR_CTEIF2 | DMA_LIFCR_CDMEIF2 | DMA_LIFCR_CFEIF2 ; // Write ones to clear bits - DMA2_Stream2->M0AR = CONVERT_PTR(&pxxStream[EXTERNAL_MODULE][1]); + DMA2_Stream2->M0AR = CONVERT_PTR_UINT(&pxxStream[EXTERNAL_MODULE][1]); DMA2_Stream2->CR |= DMA_SxCR_EN ; // Enable DMA TIM8->CCR1 = pxxStream[EXTERNAL_MODULE][0]; TIM8->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt @@ -595,7 +595,7 @@ extern "C" void TIM8_CC_IRQHandler() else if (s_current_protocol[EXTERNAL_MODULE] >= PROTO_DSM2_LP45 && s_current_protocol[EXTERNAL_MODULE] <= PROTO_DSM2_DSMX) { DMA2_Stream2->CR &= ~DMA_SxCR_EN ; // Disable DMA DMA2->LIFCR = DMA_LIFCR_CTCIF2 | DMA_LIFCR_CHTIF2 | DMA_LIFCR_CTEIF2 | DMA_LIFCR_CDMEIF2 | DMA_LIFCR_CFEIF2 ; // Write ones to clear bits - DMA2_Stream2->M0AR = CONVERT_PTR(&dsm2Stream[1]); + DMA2_Stream2->M0AR = CONVERT_PTR_UINT(&dsm2Stream[1]); DMA2_Stream2->CR |= DMA_SxCR_EN ; // Enable DMA TIM8->CCR1 = dsm2Stream[0]; TIM8->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt diff --git a/radio/src/targets/taranis/stm32_ramBoot.ld b/radio/src/targets/taranis/stm32_ramBoot.ld index d8a0b2e1f4..c8204c5eca 100644 --- a/radio/src/targets/taranis/stm32_ramBoot.ld +++ b/radio/src/targets/taranis/stm32_ramBoot.ld @@ -42,8 +42,10 @@ SECTIONS /* The program code and other data goes into FLASH */ .text : { - . = ALIGN(4); + . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */ + *(.version) + . = ALIGN(4); /* Align the start of the text part */ *(.text) /* .text sections (code) */ *(.text*) /* .text* sections (code) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ diff --git a/radio/src/targets/taranis/usbd_storage_msd.cpp b/radio/src/targets/taranis/usbd_storage_msd.cpp index db9d2e2f8b..73d7b48878 100644 --- a/radio/src/targets/taranis/usbd_storage_msd.cpp +++ b/radio/src/targets/taranis/usbd_storage_msd.cpp @@ -139,7 +139,7 @@ int8_t STORAGE_GetCapacity (uint8_t lun, uint32_t *block_num, uint32_t *block_si { if (lun == 1) { *block_size = BLOCKSIZE; - *block_num = EESIZE/BLOCKSIZE + 3 ; + *block_num = 3 + EESIZE/BLOCKSIZE + FLASHSIZE/BLOCKSIZE; } else { if (!SD_CARD_PRESENT()) @@ -279,132 +279,133 @@ int8_t STORAGE_GetMaxLun (void) */ const char g_FATboot[BLOCKSIZE] = { - 0xeb, 0x3c, 0x90, // Jump instruction. - 0x39, 0x58, 0x20, 0x54, 0x45, 0x41, 0x4D, 0x00, // OEM Name - 0x00, 0x02, // Bytes per sector - 0x01, // Sectors per FS cluster. - 0x01, 0x00, // Reserved sector count - - 0x01, // Number of FATs - 0x10, 0x00, // Number of root directory entries - (EESIZE/BLOCKSIZE)+3, 0x00, // Total sectors = 131 - 0xf8, // Media descriptor - 0x01, 0x00, // Sectors per FAT table - 0x20, 0x00, // Sectors per track - 0x40, 0x00, // Number of heads - 0x00, 0x00, 0x00, 0x00, // Number of hidden sectors - - 0x00, 0x00, 0x00, 0x00, // Large number of sectors. - 0x00, // Physical drive number - 0x00, // Reserved - 0x29, // Extended boot signature - 0xCE, 0xFA, 0x5C, 0xD1, // Disk ID (serial number) - 0x56, 0x49, 0x52, 0x54, 0x46, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, // Volume label - 0x46, 0x41, 0x54, 0x31, 0x32, 0x20, 0x20, 0x20, // FAT file system type - 0x00, 0x00, // OS boot code - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xaa + 0xeb, 0x3c, 0x90, // Jump instruction. + 0x39, 0x58, 0x20, 0x54, 0x45, 0x41, 0x4D, 0x00, // OEM Name + 0x00, 0x02, // Bytes per sector + 0x08, // Sectors per FS cluster. + 0x01, 0x00, // Reserved sector count + + 0x01, // Number of FATs + 0x10, 0x00, // Number of root directory entries + 3+(EESIZE/BLOCKSIZE), (FLASHSIZE/BLOCKSIZE)>>8, // Total sectors + 0xf8, // Media descriptor + 0x01, 0x00, // Sectors per FAT table + 0x20, 0x00, // Sectors per track + 0x40, 0x00, // Number of heads + 0x00, 0x00, 0x00, 0x00, // Number of hidden sectors + + 0x00, 0x00, 0x00, 0x00, // Large number of sectors. + 0x00, // Physical drive number + 0x00, // Reserved + 0x29, // Extended boot signature + 0xCE, 0xFA, 0x5C, 0xD1, // Disk ID (serial number) + 0x56, 0x49, 0x52, 0x54, 0x46, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, // Volume label + 0x46, 0x41, 0x54, 0x31, 0x32, 0x20, 0x20, 0x20, // FAT file system type + 0x00, 0x00, // OS boot code + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xaa }; #if defined(REV4a) const char g_FAT[BLOCKSIZE] = { - 0xF8, 0xFF, 0xFF, 0x03, 0x40, 0x00, 0x05, 0x60, 0x00, 0x07, 0x80, 0x00, 0x09, 0xA0, 0x00, 0x0B, - 0xC0, 0x00, 0x0D, 0xE0, 0x00, 0x0F, 0x00, 0x01, 0x11, 0x20, 0x01, 0x13, 0x40, 0x01, 0x15, 0x60, - 0x01, 0x17, 0x80, 0x01, 0x19, 0xA0, 0x01, 0x1B, 0xC0, 0x01, 0x1D, 0xE0, 0x01, 0x1F, 0x00, 0x02, - 0x21, 0x20, 0x02, 0x23, 0x40, 0x02, 0x25, 0x60, 0x02, 0x27, 0x80, 0x02, 0x29, 0xA0, 0x02, 0x2B, - 0xC0, 0x02, 0x2D, 0xE0, 0x02, 0x2F, 0x00, 0x03, 0x31, 0x20, 0x03, 0x33, 0x40, 0x03, 0x35, 0x60, - 0x03, 0x37, 0x80, 0x03, 0x39, 0xA0, 0x03, 0x3B, 0xC0, 0x03, 0x3D, 0xE0, 0x03, 0x3F, 0x00, 0x04, - 0x41, 0x20, 0x04, 0x43, 0x40, 0x04, 0x45, 0x60, 0x04, 0x47, 0x80, 0x04, 0x49, 0xA0, 0x04, 0x4B, - 0xC0, 0x04, 0x4D, 0xE0, 0x04, 0x4F, 0x00, 0x05, 0x51, 0x20, 0x05, 0x53, 0x40, 0x05, 0x55, 0x60, - 0x05, 0x57, 0x80, 0x05, 0x59, 0xA0, 0x05, 0x5B, 0xC0, 0x05, 0x5D, 0xE0, 0x05, 0x5F, 0x00, 0x06, - 0x61, 0x20, 0x06, 0x63, 0x40, 0x06, 0x65, 0x60, 0x06, 0x67, 0x80, 0x06, 0x69, 0xA0, 0x06, 0x6B, - 0xC0, 0x06, 0x6D, 0xE0, 0x06, 0x6F, 0x00, 0x07, 0x71, 0x20, 0x07, 0x73, 0x40, 0x07, 0x75, 0x60, - 0x07, 0x77, 0x80, 0x07, 0x79, 0xA0, 0x07, 0x7B, 0xC0, 0x07, 0x7D, 0xE0, 0x07, 0x7F, 0x00, 0x08, - 0x81, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xFF, 0xFF, 0x03, 0x40, 0x00, 0x05, 0x60, 0x00, 0x07, 0x80, 0x00, 0x09, 0xA0, 0x00, 0x0B, + 0xC0, 0x00, 0x0D, 0xE0, 0x00, 0x0F, 0x00, 0x01, 0x11, 0xF0, 0xFF, 0x13, 0x40, 0x01, 0x15, 0x60, + 0x01, 0x17, 0x80, 0x01, 0x19, 0xA0, 0x01, 0x1B, 0xC0, 0x01, 0x1D, 0xE0, 0x01, 0x1F, 0x00, 0x02, + 0x21, 0x20, 0x02, 0x23, 0x40, 0x02, 0x25, 0x60, 0x02, 0x27, 0x80, 0x02, 0x29, 0xA0, 0x02, 0x2B, + 0xC0, 0x02, 0x2D, 0xE0, 0x02, 0x2F, 0x00, 0x03, 0x31, 0x20, 0x03, 0x33, 0x40, 0x03, 0x35, 0x60, + 0x03, 0x37, 0x80, 0x03, 0x39, 0xA0, 0x03, 0x3B, 0xC0, 0x03, 0x3D, 0xE0, 0x03, 0x3F, 0x00, 0x04, + 0x41, 0x20, 0x04, 0x43, 0x40, 0x04, 0x45, 0x60, 0x04, 0x47, 0x80, 0x04, 0x49, 0xA0, 0x04, 0x4B, + 0xC0, 0x04, 0x4D, 0xE0, 0x04, 0x4F, 0x00, 0x05, 0x51, 0x20, 0x05, 0x53, 0x40, 0x05, 0x55, 0x60, + 0x05, 0x57, 0x80, 0x05, 0x59, 0xA0, 0x05, 0x5B, 0xC0, 0x05, 0x5D, 0xE0, 0x05, 0x5F, 0x00, 0x06, + 0x61, 0x20, 0x06, 0x63, 0x40, 0x06, 0x65, 0x60, 0x06, 0x67, 0x80, 0x06, 0x69, 0xA0, 0x06, 0x6B, + 0xC0, 0x06, 0x6D, 0xE0, 0x06, 0x6F, 0x00, 0x07, 0x71, 0x20, 0x07, 0x73, 0x40, 0x07, 0x75, 0x60, + 0x07, 0x77, 0x80, 0x07, 0x79, 0xA0, 0x07, 0x7B, 0xC0, 0x07, 0x7D, 0xE0, 0x07, 0x7F, 0x00, 0x08, + 0x81, 0x20, 0x08, 0x83, 0x40, 0x08, 0x85, 0x60, 0x08, 0x87, 0x80, 0x08, 0x89, 0xA0, 0x08, 0x8B, + 0xC0, 0x08, 0x8D, 0xE0, 0x08, 0x8F, 0x00, 0x09, 0x91, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #else const char g_FAT[BLOCKSIZE] = { - 0xF8, 0xFF, 0xFF, 0x03, 0x40, 0x00, 0x05, 0x60, 0x00, 0x07, 0x80, 0x00, 0x09, 0xA0, 0x00, 0x0B, - 0xC0, 0x00, 0x0D, 0xE0, 0x00, 0x0F, 0x00, 0x01, 0x11, 0x20, 0x01, 0x13, 0x40, 0x01, 0x15, 0x60, - 0x01, 0x17, 0x80, 0x01, 0x19, 0xA0, 0x01, 0x1B, 0xC0, 0x01, 0x1D, 0xE0, 0x01, 0x1F, 0x00, 0x02, - 0x21, 0x20, 0x02, 0x23, 0x40, 0x02, 0x25, 0x60, 0x02, 0x27, 0x80, 0x02, 0x29, 0xA0, 0x02, 0x2B, - 0xC0, 0x02, 0x2D, 0xE0, 0x02, 0x2F, 0x00, 0x03, 0x31, 0x20, 0x03, 0x33, 0x40, 0x03, 0x35, 0x60, - 0x03, 0x37, 0x80, 0x03, 0x39, 0xA0, 0x03, 0x3B, 0xC0, 0x03, 0x3D, 0xE0, 0x03, 0x3F, 0x00, 0x04, - 0x41, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0xF8, 0xFF, 0xFF, 0x03, 0x40, 0x00, 0x05, 0x60, 0x00, 0x07, 0x80, 0x00, 0x09, 0xF0, 0xFF, 0x0B, + 0xC0, 0x00, 0x0D, 0xE0, 0x00, 0x0F, 0x00, 0x01, 0x11, 0x20, 0x01, 0x13, 0x40, 0x01, 0x15, 0x60, + 0x01, 0x17, 0x80, 0x01, 0x19, 0xA0, 0x01, 0x1B, 0xC0, 0x01, 0x1D, 0xE0, 0x01, 0x1F, 0x00, 0x02, + 0x21, 0x20, 0x02, 0x23, 0x40, 0x02, 0x25, 0x60, 0x02, 0x27, 0x80, 0x02, 0x29, 0xA0, 0x02, 0x2B, + 0xC0, 0x02, 0x2D, 0xE0, 0x02, 0x2F, 0x00, 0x03, 0x31, 0x20, 0x03, 0x33, 0x40, 0x03, 0x35, 0x60, + 0x03, 0x37, 0x80, 0x03, 0x39, 0xA0, 0x03, 0x3B, 0xC0, 0x03, 0x3D, 0xE0, 0x03, 0x3F, 0x00, 0x04, + 0x41, 0x20, 0x04, 0x43, 0x40, 0x04, 0x45, 0x60, 0x04, 0x47, 0x80, 0x04, 0x49, 0xA0, 0x04, 0x4B, + 0xC0, 0x04, 0x4D, 0xE0, 0x04, 0x4F, 0x00, 0x05, 0x51, 0x20, 0x05, 0x53, 0x40, 0x05, 0x55, 0x60, + 0x05, 0x57, 0x80, 0x05, 0x59, 0xA0, 0x05, 0x5B, 0xC0, 0x05, 0x5D, 0xE0, 0x05, 0x5F, 0x00, 0x06, + 0x61, 0x20, 0x06, 0x63, 0x40, 0x06, 0x65, 0x60, 0x06, 0x67, 0x80, 0x06, 0x69, 0xA0, 0x06, 0x6B, + 0xC0, 0x06, 0x6D, 0xE0, 0x06, 0x6F, 0x00, 0x07, 0x71, 0x20, 0x07, 0x73, 0x40, 0x07, 0x75, 0x60, + 0x07, 0x77, 0x80, 0x07, 0x79, 0xA0, 0x07, 0x7B, 0xC0, 0x07, 0x7D, 0xE0, 0x07, 0x7F, 0x00, 0x08, + 0x81, 0x20, 0x08, 0x83, 0x40, 0x08, 0x85, 0x60, 0x08, 0x87, 0x80, 0x08, 0x89, 0xF0, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #endif @@ -454,7 +455,7 @@ const FATDirEntry_t g_DIRroot[16] = 0x00000000 }, { - { 'T', 'A', 'R', 'A', 'N', 'I', 'S', ' '}, + { 'E', 'E', 'P', 'R', 'O', 'M', ' ', ' '}, { 'B', 'I', 'N'}, 0x24, // Archive, hidden, system 0x00, @@ -469,19 +470,19 @@ const FATDirEntry_t g_DIRroot[16] = EESIZE }, { - { '\x00', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, - { ' ', ' ', ' '}, - 0x00, - 0x00, + { 'F', 'I', 'R', 'M', 'W', 'A', 'R', 'E'}, + { 'B', 'I', 'N'}, + 0x24, // Archive, hidden, system 0x00, + 0x3E, + 0xA301, + 0x3D55, + 0x3D55, 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x0000, - 0x00000000 + 0xA302, + 0x3D55, + 0x0002 + (EESIZE/BLOCKSIZE)/8, + FLASHSIZE }, { { '\x00', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, @@ -686,53 +687,79 @@ int32_t fat12Read( uint8_t *buffer, uint16_t sector, uint16_t count ) while ( count ) { if (sector == 0) { - memcpy( buffer, g_FATboot, BLOCKSIZE ) ; + memcpy(buffer, g_FATboot, BLOCKSIZE ) ; } else if (sector == 1/*Reserved sector count*/) { // FAT table. - memcpy( buffer, g_FAT, BLOCKSIZE); + memcpy(buffer, g_FAT, BLOCKSIZE); } else if (sector == 2) { - memcpy( buffer, g_DIRroot, BLOCKSIZE ) ; + memcpy(buffer, g_DIRroot, BLOCKSIZE ) ; } - else { + else if (sector < 3 + (EESIZE/BLOCKSIZE)) { eeprom_read_block (buffer, (sector-3)*BLOCKSIZE, BLOCKSIZE); } + else if (sector < 3 + (EESIZE/BLOCKSIZE) + (FLASHSIZE/BLOCKSIZE)) { + uint32_t address; + address = sector - 3 - (EESIZE/BLOCKSIZE); + address *= BLOCKSIZE; + address += FIRMWARE_ADDRESS; + memcpy(buffer, (uint8_t *)address, BLOCKSIZE); + } buffer += BLOCKSIZE ; sector++ ; count-- ; } return 0 ; } -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ int32_t fat12Write(const uint8_t *buffer, uint16_t sector, uint32_t count ) { static int offset = 0; TRACE("FAT12 Write(sector=%d, count=%d)", sector, count); - while (count) { - const EeFs * test = (const EeFs *)buffer; - if (offset == 0 && test->version==EEFS_VERS && test->mySize==sizeof(eeFs) && test->bs==BS) { - TRACE("EEPROM start found in sector %d", sector); - offset = sector; + if (sector < 3) { + // reserved, read-only + } + else if (sector < 3 + (EESIZE/BLOCKSIZE)) { + while (count) { + const EeFs * test = (const EeFs *)buffer; + if (offset == 0 && test->version==EEFS_VERS && test->mySize==sizeof(eeFs) && test->bs==BS) { + TRACE("EEPROM start found in sector %d", sector); + offset = sector; + } + if (offset && sector >= offset && (sector-offset) < EESIZE/BLOCKSIZE) { + eeWriteBlockCmp((uint8_t *)buffer, (sector-offset)*BLOCKSIZE, BLOCKSIZE); + } + buffer += BLOCKSIZE; + sector++; + count--; + if (sector-offset >= EESIZE/BLOCKSIZE) { + TRACE("EEPROM end written at sector %d", sector-1); + offset = 0; + } } - if (offset && sector >= offset && (sector-offset) < EESIZE/BLOCKSIZE) { - eeWriteBlockCmp((uint8_t *)buffer, (sector-offset)*BLOCKSIZE, BLOCKSIZE); - } - buffer += BLOCKSIZE; - sector++; - count--; - if (sector-offset >= EESIZE/BLOCKSIZE) { - TRACE("EEPROM end written at sector %d", sector-1); - offset = 0; + } + else if (sector < 3 + (EESIZE/BLOCKSIZE) + (FLASHSIZE/BLOCKSIZE)) { + // firmware + uint32_t address; + address = sector - 3 - (EESIZE/BLOCKSIZE); + address *= BLOCKSIZE; + address += FIRMWARE_ADDRESS; + + while (count) { + for (uint32_t i=0; i= FIRMWARE_ADDRESS+BOOTLOADER_SIZE/*protect bootloader*/ && address <= FIRMWARE_ADDRESS+FLASHSIZE-FLASH_PAGESIZE) { + writeFlash((uint32_t *)address, (uint32_t *)buffer); + } + address += FLASH_PAGESIZE; + buffer += FLASH_PAGESIZE; + } + count--; } } return 0 ; } - /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ - diff --git a/radio/src/telemetry/frsky.h b/radio/src/telemetry/frsky.h index 7aa05ea0f6..4275ffb774 100644 --- a/radio/src/telemetry/frsky.h +++ b/radio/src/telemetry/frsky.h @@ -248,8 +248,15 @@ void resetTelemetry(); #define TELEMETRY_GPS_SPEED_UNIT (IS_IMPERIAL_ENABLE() ? SPEED_UNIT_IMP : SPEED_UNIT_METR) #define TELEMETRY_GPS_SPEED_FORMAT "%d," #define TELEMETRY_GPS_SPEED_ARGS getConvertedTelemetryValue(frskyData.hub.gpsSpeed_bp, UNIT_KTS), -#define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," -#define TELEMETRY_CELLS_ARGS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, frskyData.hub.cellVolts[0]*2/100, frskyData.hub.cellVolts[0]*2%100, frskyData.hub.cellVolts[1]*2/100, frskyData.hub.cellVolts[1]*2%100, frskyData.hub.cellVolts[2]*2/100, frskyData.hub.cellVolts[2]*2%100, frskyData.hub.cellVolts[3]*2/100, frskyData.hub.cellVolts[3]*2%100, frskyData.hub.cellVolts[4]*2/100, frskyData.hub.cellVolts[4]*2%100, frskyData.hub.cellVolts[5]*2/100, frskyData.hub.cellVolts[5]*2%100, +#if defined(CPUARM) + #define TELEMETRY_CELLS_ARGS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, frskyData.hub.cellVolts[0]*2/100, frskyData.hub.cellVolts[0]*2%100, frskyData.hub.cellVolts[1]*2/100, frskyData.hub.cellVolts[1]*2%100, frskyData.hub.cellVolts[2]*2/100, frskyData.hub.cellVolts[2]*2%100, frskyData.hub.cellVolts[3]*2/100, frskyData.hub.cellVolts[3]*2%100, frskyData.hub.cellVolts[4]*2/100, frskyData.hub.cellVolts[4]*2%100, frskyData.hub.cellVolts[5]*2/100, frskyData.hub.cellVolts[5]*2%100, frskyData.hub.cellVolts[6]*2/100, frskyData.hub.cellVolts[6]*2%100, frskyData.hub.cellVolts[7]*2/100, frskyData.hub.cellVolts[7]*2%100, frskyData.hub.cellVolts[8]*2/100, frskyData.hub.cellVolts[8]*2%100, frskyData.hub.cellVolts[9]*2/100, frskyData.hub.cellVolts[9]*2%100, frskyData.hub.cellVolts[10]*2/100, frskyData.hub.cellVolts[10]*2%100, frskyData.hub.cellVolts[11]*2/100, frskyData.hub.cellVolts[11]*2%100, + #define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," + #define TELEMETRY_CELLS_LABEL "Cell volts,Cell 1,Cell 2,Cell 3,Cell 4,Cell 5,Cell 6,Cell 7,Cell 8,Cell 9,Cell 10,Cell 11,Cell 12," +#else + #define TELEMETRY_CELLS_ARGS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, frskyData.hub.cellVolts[0]*2/100, frskyData.hub.cellVolts[0]*2%100, frskyData.hub.cellVolts[1]*2/100, frskyData.hub.cellVolts[1]*2%100, frskyData.hub.cellVolts[2]*2/100, frskyData.hub.cellVolts[2]*2%100, frskyData.hub.cellVolts[3]*2/100, frskyData.hub.cellVolts[3]*2%100, frskyData.hub.cellVolts[4]*2/100, frskyData.hub.cellVolts[4]*2%100, frskyData.hub.cellVolts[5]*2/100, frskyData.hub.cellVolts[5]*2%100, + #define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," + #define TELEMETRY_CELLS_LABEL "Cell volts,Cell 1,Cell 2,Cell 3,Cell 4,Cell 5,Cell 6," +#endif #define TELEMETRY_CURRENT_FORMAT "%d.%02d," #define TELEMETRY_CURRENT_ARGS frskyData.hub.current / 100, frskyData.hub.current % 100, #define TELEMETRY_VFAS_FORMAT "%d.%d," diff --git a/radio/src/telemetry/frsky_sport.cpp b/radio/src/telemetry/frsky_sport.cpp index 55750d7130..dac35c2f55 100644 --- a/radio/src/telemetry/frsky_sport.cpp +++ b/radio/src/telemetry/frsky_sport.cpp @@ -677,7 +677,7 @@ void telemetryWakeup() if (alarmsCheckStep == 0) { if ((IS_MODULE_XJT(0) || IS_MODULE_XJT(1)) && frskyData.swr.value > 0x33) { AUDIO_SWR_RED(); - s_global_warning = STR_ANTENNAPROBLEM; + POPUP_WARNING(STR_ANTENNAPROBLEM); alarmsCheckTime = get_tmr10ms() + 300; /* next check in 3seconds */ } } diff --git a/radio/src/telemetry/frsky_sport.h b/radio/src/telemetry/frsky_sport.h index b758b3eb4f..ade8934bf6 100644 --- a/radio/src/telemetry/frsky_sport.h +++ b/radio/src/telemetry/frsky_sport.h @@ -182,10 +182,10 @@ bool FRSKY_alarmRaised(uint8_t idx); void resetTelemetry(); #define TELEMETRY_STREAMING() (frskyData.rssi[0].value > 0) - + #define TELEMETRY_CELL_VOLTAGE(k) frskyData.hub.cellVolts[k] #define TELEMETRY_MIN_CELL_VOLTAGE frskyData.hub.minCellVolts - + #define TELEMETRY_BARO_ALT_AVAILABLE() (frskyData.hub.baroAltitudeOffset) #define TELEMETRY_BARO_ALT_UNIT (IS_IMPERIAL_ENABLE() ? LENGTH_UNIT_IMP : LENGTH_UNIT_METR) @@ -207,8 +207,15 @@ void resetTelemetry(); #define TELEMETRY_GPS_SPEED_UNIT (IS_IMPERIAL_ENABLE() ? SPEED_UNIT_IMP : SPEED_UNIT_METR) #define TELEMETRY_GPS_SPEED_FORMAT "%d," #define TELEMETRY_GPS_SPEED_ARGS getConvertedTelemetryValue(frskyData.hub.gpsSpeed_bp, UNIT_KTS), -#define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," -#define TELEMETRY_CELLS_ARGS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, TELEMETRY_CELL_VOLTAGE(0)/100, TELEMETRY_CELL_VOLTAGE(0)%100, TELEMETRY_CELL_VOLTAGE(1)/100, TELEMETRY_CELL_VOLTAGE(1)%100, TELEMETRY_CELL_VOLTAGE(2)/100, TELEMETRY_CELL_VOLTAGE(2)%100, TELEMETRY_CELL_VOLTAGE(3)/100, TELEMETRY_CELL_VOLTAGE(3)%100, TELEMETRY_CELL_VOLTAGE(4)/100, TELEMETRY_CELL_VOLTAGE(4)%100, TELEMETRY_CELL_VOLTAGE(5)/100, TELEMETRY_CELL_VOLTAGE(5)%100, +#if defined(CPUARM) + #define TELEMETRY_CELLS_ARGS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, TELEMETRY_CELL_VOLTAGE(0)/100, TELEMETRY_CELL_VOLTAGE(0)%100, TELEMETRY_CELL_VOLTAGE(1)/100, TELEMETRY_CELL_VOLTAGE(1)%100, TELEMETRY_CELL_VOLTAGE(2)/100, TELEMETRY_CELL_VOLTAGE(2)%100, TELEMETRY_CELL_VOLTAGE(3)/100, TELEMETRY_CELL_VOLTAGE(3)%100, TELEMETRY_CELL_VOLTAGE(4)/100, TELEMETRY_CELL_VOLTAGE(4)%100, TELEMETRY_CELL_VOLTAGE(5)/100, TELEMETRY_CELL_VOLTAGE(5)%100, TELEMETRY_CELL_VOLTAGE(6)/100, TELEMETRY_CELL_VOLTAGE(6)%100, TELEMETRY_CELL_VOLTAGE(7)/100, TELEMETRY_CELL_VOLTAGE(7)%100, TELEMETRY_CELL_VOLTAGE(8)/100, TELEMETRY_CELL_VOLTAGE(8)%100, TELEMETRY_CELL_VOLTAGE(9)/100, TELEMETRY_CELL_VOLTAGE(9)%100, TELEMETRY_CELL_VOLTAGE(10)/100, TELEMETRY_CELL_VOLTAGE(10)%100, TELEMETRY_CELL_VOLTAGE(11)/100, TELEMETRY_CELL_VOLTAGE(11)%100, + #define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," + #define TELEMETRY_CELLS_LABEL "Cell volts,Cell 1,Cell 2,Cell 3,Cell 4,Cell 5,Cell 6,Cell 7,Cell 8,Cell 9,Cell 10,Cell 11,Cell 12," +#else + #define TELEMETRY_CELLS_ARGS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, TELEMETRY_CELL_VOLTAGE(0)/100, TELEMETRY_CELL_VOLTAGE(0)%100, TELEMETRY_CELL_VOLTAGE(1)/100, TELEMETRY_CELL_VOLTAGE(1)%100, TELEMETRY_CELL_VOLTAGE(2)/100, TELEMETRY_CELL_VOLTAGE(2)%100, TELEMETRY_CELL_VOLTAGE(3)/100, TELEMETRY_CELL_VOLTAGE(3)%100, TELEMETRY_CELL_VOLTAGE(4)/100, TELEMETRY_CELL_VOLTAGE(4)%100, TELEMETRY_CELL_VOLTAGE(5)/100, TELEMETRY_CELL_VOLTAGE(5)%100, + #define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," + #define TELEMETRY_CELLS_LABEL "Cell volts,Cell 1,Cell 2,Cell 3,Cell 4,Cell 5,Cell 6," +#endif #define TELEMETRY_CURRENT_FORMAT "%d.%d," #define TELEMETRY_CURRENT_ARGS frskyData.hub.current / 10, frskyData.hub.current % 10, #define TELEMETRY_VFAS_FORMAT "%d.%d," diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 79f053e1d2..fc2e4bd25f 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -465,6 +465,9 @@ const pm_char STR_DATE[] PROGMEM = TR_DATE; const pm_char STR_CHANNELS_MONITOR[] PROGMEM = TR_CHANNELS_MONITOR; const pm_char STR_PATH_TOO_LONG[] PROGMEM = TR_PATH_TOO_LONG; const pm_char STR_VIEW_TEXT[] PROGMEM = TR_VIEW_TEXT; +const pm_char STR_FLASH_BOOTLOADER[] PROGMEM = TR_FLASH_BOOTLOADER; +const pm_char STR_WRITING[] PROGMEM = TR_WRITING; +const pm_char STR_CONFIRM_FORMAT[] PROGMEM = TR_CONFIRM_FORMAT; #if LCD_W >= 212 const pm_char STR_MODELNAME[] PROGMEM = TR_MODELNAME; diff --git a/radio/src/translations.h b/radio/src/translations.h index e6bf969287..a786eefd5e 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -616,6 +616,9 @@ extern const pm_char STR_DATE[]; extern const pm_char STR_CHANNELS_MONITOR[]; extern const pm_char STR_PATH_TOO_LONG[]; extern const pm_char STR_VIEW_TEXT[]; +extern const pm_char STR_FLASH_BOOTLOADER[]; +extern const pm_char STR_WRITING[]; +extern const pm_char STR_CONFIRM_FORMAT[]; #if defined(VOICE) && defined(CPUARM) struct LanguagePack { diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index ef914e1eea..6563d4aead 100644 --- a/radio/src/translations/cz.h.txt +++ b/radio/src/translations/cz.h.txt @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "MONITOR KANÁLU" #define TR_PATH_TOO_LONG "Cesta je moc dlouhá" #define TR_VIEW_TEXT "Zobrazit text" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "Vnitřní RF modul" #define TR_EXTERNALRF "Externí RF modul" #define TR_FAILSAFE "Mód Failsafe" diff --git a/radio/src/translations/de.h.txt b/radio/src/translations/de.h.txt index ef42609ab5..a1cb9cd6b3 100644 --- a/radio/src/translations/de.h.txt +++ b/radio/src/translations/de.h.txt @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "Kanal Monitor" #define TR_PATH_TOO_LONG "Path too long" #define TR_VIEW_TEXT "View text" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "----Internes HF Modul----------" #define TR_EXTERNALRF "----Externes HF Modul----------" #define TR_FAILSAFE "Failsafe Mode" diff --git a/radio/src/translations/en.h.txt b/radio/src/translations/en.h.txt index 8b20c7f711..9e87008d75 100644 --- a/radio/src/translations/en.h.txt +++ b/radio/src/translations/en.h.txt @@ -716,6 +716,9 @@ #define TR_CHANNELS_MONITOR "CHANNEL MONITOR" #define TR_PATH_TOO_LONG "Path too long" #define TR_VIEW_TEXT "View text" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "Internal RF" #define TR_EXTERNALRF "External RF" #define TR_FAILSAFE INDENT "Failsafe mode" diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt index 3d08dd8ce0..f4ee1194be 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "MONITOR CANALES" #define TR_PATH_TOO_LONG "Path too long" #define TR_VIEW_TEXT "View text" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "Interna RF" #define TR_EXTERNALRF "Externa RF" #define TR_FAILSAFE INDENT"Modo sgdad." diff --git a/radio/src/translations/fi.h.txt b/radio/src/translations/fi.h.txt index f6123eb5e7..0b7540155e 100644 --- a/radio/src/translations/fi.h.txt +++ b/radio/src/translations/fi.h.txt @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "CHANNEL MONITOR" #define TR_PATH_TOO_LONG "Path too long" #define TR_VIEW_TEXT "View text" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "Internal RF" #define TR_EXTERNALRF "External RF" #define TR_FAILSAFE INDENT "Failsafe mode" diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt index 0048062711..cd25b391b5 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "MONITEUR CANAUX" #define TR_PATH_TOO_LONG "Chemin trop long" #define TR_VIEW_TEXT "Voir texte" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "HF interne" #define TR_EXTERNALRF "HF externe" #define TR_FAILSAFE INDENT "Type failsafe" diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt index 82368e870e..333606b37d 100644 --- a/radio/src/translations/it.h.txt +++ b/radio/src/translations/it.h.txt @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "CHANNELS MONITOR" #define TR_PATH_TOO_LONG "Path too long" #define TR_VIEW_TEXT "View text" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "Modulo Interno" #define TR_EXTERNALRF "Modulo esterno" #define TR_FAILSAFE "Modo failsafe" diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt index 5bd086ba4f..fe5b93973d 100644 --- a/radio/src/translations/pl.h.txt +++ b/radio/src/translations/pl.h.txt @@ -72,7 +72,7 @@ #define TR_UART3MODES "Wyłącz\0 ""S-Port Mirror\0 ""Debug\0 " #define LEN_POTTYPES "\017" -#define TR_POTTYPES "None\0 ""Potencjometr\0 ""Przeł.Wielopoz." +#define TR_POTTYPES "Brak\0 ""Potencjometr\0 ""Przeł.Wielopoz." #define LEN_DATETIME "\006" #define TR_DATETIME "DATA:\0""CZAS:\0" @@ -99,7 +99,7 @@ #define TR_VBEEPCOUNTDOWN "Cichy\0 ""Pikanie""Dźwięki" #define LEN_CURVE_TYPES "\010" -#define TR_CURVE_TYPES "Standard""Custom\0" +#define TR_CURVE_TYPES "Standard""Własny\0" #define LEN_RETA123 "\001" @@ -246,7 +246,7 @@ #define TR_CFN_TEST #endif -#define TR_CFN_RESERVE "[reserve]\0 " +#define TR_CFN_RESERVE "[rezerwa]\0 " #if defined(CPUARM) #define TR_VFSWFUNC "Bezp.\0 ""Trener \0 ""Inst-Trim ""Reset ""Set \0 " TR_ADJUST_GVAR "Głośność\0 " TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_RESERVE TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Podświetl. " TR_CFN_TEST @@ -650,8 +650,8 @@ #define TR_BACKUP_MODEL "Zbackupuj model" #define TR_DELETE_MODEL "Skasuj model" #define TR_RESTORE_MODEL "Odtwórz model" -#define TR_SDCARD_ERROR "Błąd SD karty" -#define TR_NO_SDCARD "Brak SD karta" +#define TR_SDCARD_ERROR "Błąd karty SD" +#define TR_NO_SDCARD "Brak karty SD" #define TR_INCOMPATIBLE "Niekompatybilne" #define TR_WARNING "UWAGA" #define TR_EEPROMWARN "EEPROM" @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "MONITOR KANAŁÓW" #define TR_PATH_TOO_LONG "Ścieżka za długa" #define TR_VIEW_TEXT "Pokaż tekst" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "Wewnętrzny moduł RF" #define TR_EXTERNALRF "Zewnętrzny moduł RF" #define TR_FAILSAFE "Tryb Failsafe" @@ -723,7 +726,7 @@ #define TR_INSERT_BEFORE "Wstaw przed" #define TR_INSERT_AFTER "Wstaw za" #define TR_COPY "Kopiuj" -#define TR_MOVE "Przemieść" +#define TR_MOVE "Przenieś" #define TR_PASTE "Wklej" #define TR_DELETE "Kasuj" #define TR_INSERT "Wstaw" diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt index 9ed05ad43e..41d2495287 100644 --- a/radio/src/translations/pt.h.txt +++ b/radio/src/translations/pt.h.txt @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "CHANNELS MONITOR" #define TR_PATH_TOO_LONG "Path too long" #define TR_VIEW_TEXT "View text" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "Internal RF" #define TR_EXTERNALRF "External RF" #define TR_FAILSAFE "Failsafe mode" diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt index aea29735f7..5e66482c42 100644 --- a/radio/src/translations/se.h.txt +++ b/radio/src/translations/se.h.txt @@ -712,6 +712,9 @@ #define TR_CHANNELS_MONITOR "Kanalöversikt" #define TR_PATH_TOO_LONG "För lång sökväg" #define TR_VIEW_TEXT "Visa Text" +#define TR_FLASH_BOOTLOADER "Flash BootLoader" +#define TR_WRITING "\032Writing..." +#define TR_CONFIRM_FORMAT "Confirm Format?" #define TR_INTERNALRF "Intern Radio" #define TR_EXTERNALRF "Extern Radiomodul" #define TR_FAILSAFE "Failsafeläge" diff --git a/radio/util/fat12.py b/radio/util/fat12.py new file mode 100755 index 0000000000..13889f3c70 --- /dev/null +++ b/radio/util/fat12.py @@ -0,0 +1,50 @@ +#!/bin/env python + +curr = 0 +idx = 0 +byte = 0 + +def push4bits(val): + global curr, idx, byte + val = val & 0x0f + curr += val << idx + idx += 4 + if idx == 8: + print "0x%02X," % curr, + idx = 0 + curr = 0 + byte += 1 + if byte % 16 == 0: + print + +cluster = 0 + +def pushCluster(val): + global cluster + push4bits(val) + push4bits(val >> 4) + push4bits(val >> 8) + cluster += 1 + +def pushFile(size): + sectors = size / 512 + count = sectors / 8 + for i in range(count-1): + pushCluster(cluster+1) + pushCluster(0xFFF) + +def pushDisk(eeprom, flash): + global curr, idx, byte, cluster + curr = idx = byte = cluster = 0 + print "Disk with %dk EEPROM and %dk FLASH:" % (eeprom, flash) + pushCluster(0xFF8) + pushCluster(0xFFF) + pushFile(eeprom*1024) + pushFile(flash*1024) + while byte < 512: + push4bits(0) + print + +pushDisk(32, 512) +pushDisk(64, 512) +