feat: Model templates for color radios (update SD card for bundled templates) (#1569)
* Model templates - select and load after Create Model for color radios * Model templates - save model as template, only for color radios * Small fix to drawTextLines(...) to handle consecutive spaces * Change title of button for empty template folder * I found out why "no trailing slash = important" in path names! * Reworked file and path name string manipulation No longer using chdir, as Lua scripts etc. could be messing with the working dir Use buffers more and std::string less * Adjusting the size of buffers I think that I got it right now. Really hard to figure out the right size constants! Also added storageDirty(EE_MODEL) after reading the template file and renaming the model * Added storage checks * Slight simplification - all template buttons are similar * Added "Blank Model" button * Wizard Lua script If there is a Lua script with the same name as the template file in the folder, then it is run after reading the template.
This commit is contained in:
@@ -780,6 +780,12 @@
|
||||
#define TR_BAUDRATE "蓝牙带宽"
|
||||
#define LEN_BLUETOOTH_MODES "\004"
|
||||
#define TR_BLUETOOTH_MODES "---\0" "回传" "教练"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_SD_INFO_TITLE "存储卡详情"
|
||||
#define TR_SD_TYPE "类型:"
|
||||
|
||||
@@ -812,9 +812,14 @@
|
||||
#define TR_TIME "Čas"
|
||||
#define TR_MAXBAUDRATE "Max baudů"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Hledat"
|
||||
|
||||
@@ -814,9 +814,14 @@
|
||||
#define TR_TIME "Uhrzeit:"
|
||||
#define TR_MAXBAUDRATE "Max Baud"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Discover"
|
||||
|
||||
@@ -818,9 +818,14 @@
|
||||
#define TR_TIME "Time"
|
||||
#define TR_MAXBAUDRATE "Max bauds"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Discover"
|
||||
|
||||
@@ -815,10 +815,15 @@
|
||||
#define TR_TEMP_CALIB "Temp. Calib"
|
||||
#define TR_TIME "Hora"
|
||||
#define TR_MAXBAUDRATE "Máx bauds"
|
||||
|
||||
#define TR_SAMPLE_MODE "Modo de muestra"
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Buscar"
|
||||
|
||||
@@ -830,9 +830,14 @@
|
||||
#define TR_TIME "Time"
|
||||
#define TR_MAXBAUDRATE "Max bauds"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Discover"
|
||||
|
||||
@@ -835,9 +835,14 @@
|
||||
#define TR_TIME "Heure"
|
||||
#define TR_MAXBAUDRATE "Max bauds"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Découvrir"
|
||||
|
||||
@@ -836,9 +836,14 @@
|
||||
#define TR_TIME "Ora"
|
||||
#define TR_MAXBAUDRATE "Max Bauds"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Cerca"
|
||||
|
||||
@@ -822,9 +822,14 @@
|
||||
#define TR_TIME "Tijd:"
|
||||
#define TR_MAXBAUDRATE "Max bauds"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Discover"
|
||||
|
||||
@@ -833,9 +833,14 @@
|
||||
#define TR_TIME "Czas"
|
||||
#define TR_MAXBAUDRATE "Max bauds"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Discover"
|
||||
|
||||
@@ -841,9 +841,14 @@
|
||||
#define TR_TIME "Time"
|
||||
#define TR_MAXBAUDRATE "Max bauds"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Discover"
|
||||
|
||||
@@ -841,9 +841,14 @@
|
||||
#define TR_TIME "Tid "
|
||||
#define TR_MAXBAUDRATE "Max bauds"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "Bluetooth"
|
||||
#define TR_BLUETOOTH_DISC "Discover"
|
||||
|
||||
@@ -768,9 +768,16 @@
|
||||
#define TR_TEMP_CALIB "溫度校準"
|
||||
#define TR_TIME "時間"
|
||||
#define TR_MAXBAUDRATE "最大帶寬"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
#define TR_SAMPLE_MODE "Sample Mode"
|
||||
#define LEN_SAMPLE_MODES "\006"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SAMPLE_MODES "Normal""OneBit"
|
||||
#define TR_SELECT_TEMPLATE_FOLDER "SELECT A TEMPLATE FOLDER:"
|
||||
#define TR_SELECT_TEMPLATE "SELECT A MODEL TEMPLATE:"
|
||||
#define TR_NO_TEMPLATES "No model templates were found in this folder"
|
||||
#define TR_SAVE_TEMPLATE "Save as template"
|
||||
#define TR_FILE_EXISTS "FILE ALREADY EXISTS"
|
||||
#define TR_ASK_OVERWRITE "Do you want to overwrite?"
|
||||
|
||||
#define TR_BLUETOOTH "藍牙"
|
||||
#define TR_BLUETOOTH_DISC "發現"
|
||||
#define TR_BLUETOOTH_INIT "初始化"
|
||||
|
||||
Reference in New Issue
Block a user