mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 04:45:17 +03:00
[Horus] UI continued
This commit is contained in:
parent
22a24d67c9
commit
b7c09d703c
40 changed files with 535 additions and 244 deletions
|
@ -12,6 +12,7 @@ MESSAGE(STATUS "OpenTX Companion ${VERSION}")
|
|||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 )
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
include(Macros)
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
SET(C9X_NAME_SUFFIX ${VERSION_MAJOR}${VERSION_MINOR})
|
||||
|
@ -248,32 +249,6 @@ set(companion_RCS
|
|||
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc
|
||||
)
|
||||
|
||||
MACRO (TODAY RESULT)
|
||||
IF (WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}})
|
||||
ELSEIF(UNIX)
|
||||
EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}})
|
||||
ELSE (WIN32)
|
||||
MESSAGE(SEND_ERROR "date not implemented")
|
||||
SET(${RESULT} 00.00.0000)
|
||||
ENDIF (WIN32)
|
||||
ENDMACRO (TODAY)
|
||||
|
||||
MACRO (NOW RESULT)
|
||||
IF (WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "cmd" " /C time /T" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "(..):(..).*" "\\1:\\2:00" ${RESULT} ${${RESULT}})
|
||||
ELSEIF(UNIX)
|
||||
EXECUTE_PROCESS(COMMAND "date" "+%H:%M:%S" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "(..):(..):(..).*" "\\1:\\2:\\3" ${RESULT} ${${RESULT}})
|
||||
ELSE (WIN32)
|
||||
MESSAGE(SEND_ERROR "time not implemented")
|
||||
SET(${RESULT} 00:00:00)
|
||||
ENDIF (WIN32)
|
||||
ENDMACRO (NOW)
|
||||
|
||||
TODAY(DATE)
|
||||
NOW(TIME)
|
||||
|
||||
|
|
26
companion/src/cmake/Macros.cmake
Normal file
26
companion/src/cmake/Macros.cmake
Normal file
|
@ -0,0 +1,26 @@
|
|||
MACRO (TODAY RESULT)
|
||||
IF (WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}})
|
||||
ELSEIF(UNIX)
|
||||
EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}})
|
||||
ELSE (WIN32)
|
||||
MESSAGE(SEND_ERROR "date not implemented")
|
||||
SET(${RESULT} 00.00.0000)
|
||||
ENDIF (WIN32)
|
||||
ENDMACRO (TODAY)
|
||||
|
||||
MACRO (NOW RESULT)
|
||||
IF (WIN32)
|
||||
EXECUTE_PROCESS(COMMAND "cmd" " /C time /T" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "(..):(..).*" "\\1:\\2:00" ${RESULT} ${${RESULT}})
|
||||
ELSEIF(UNIX)
|
||||
EXECUTE_PROCESS(COMMAND "date" "+%H:%M:%S" OUTPUT_VARIABLE ${RESULT})
|
||||
string(REGEX REPLACE "(..):(..):(..).*" "\\1:\\2:\\3" ${RESULT} ${${RESULT}})
|
||||
ELSE (WIN32)
|
||||
MESSAGE(SEND_ERROR "time not implemented")
|
||||
SET(${RESULT} 00:00:00)
|
||||
ENDIF (WIN32)
|
||||
ENDMACRO (NOW)
|
||||
|
|
@ -3,40 +3,87 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
|||
|
||||
set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src)
|
||||
|
||||
add_custom_target(about_lbm_9x
|
||||
make lbm PCB=9X
|
||||
macro(add_bitmaps_target targetname filter width format)
|
||||
file(GLOB bitmaps ${filter})
|
||||
foreach(bitmap ${bitmaps})
|
||||
get_filename_component(target ${bitmap} NAME_WE)
|
||||
get_filename_component(path ${bitmap} DIRECTORY)
|
||||
set(target ${path}/${target}.lbm)
|
||||
add_custom_command(
|
||||
OUTPUT ${target}
|
||||
COMMAND python ../util/img2lbm.py ${bitmap} ${target} ${width} ${format}
|
||||
DEPENDS ${bitmap}
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
list(APPEND bitmaps_files ${target})
|
||||
endforeach()
|
||||
add_custom_target(${targetname} DEPENDS ${bitmaps_files})
|
||||
endmacro(add_bitmaps_target)
|
||||
|
||||
add_custom_target(about_lbm_taranis
|
||||
make lbm PCB=TARANIS
|
||||
add_bitmaps_target(lbm_xbm_1bit ${RADIO_SRC_DIRECTORY}/bitmaps/*.xbm 128 1bit)
|
||||
add_bitmaps_target(lbm_fonts_1bit ${RADIO_SRC_DIRECTORY}/fonts/std/*.png 128 "")
|
||||
add_bitmaps_target(lbm_9x_bitmaps ${RADIO_SRC_DIRECTORY}/bitmaps/9X/*.png 128 1bit)
|
||||
add_bitmaps_target(lbm_taranis_bitmaps ${RADIO_SRC_DIRECTORY}/bitmaps/Taranis/*.png 212 4bits)
|
||||
|
||||
add_dependencies(lbm_9x_bitmaps lbm_fonts_1bit lbm_xbm_1bit)
|
||||
add_dependencies(lbm_taranis_bitmaps lbm_fonts_1bit lbm_xbm_1bit)
|
||||
|
||||
macro(add_truetype_font_target radio name font size)
|
||||
set(target ${RADIO_SRC_DIRECTORY}/fonts/${radio}/font_${name})
|
||||
add_custom_command(
|
||||
OUTPUT ${target}.png
|
||||
OUTPUT ${target}.specs
|
||||
COMMAND ../util/font2png.py ${font} ${size} False ${target}
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
endmacro(add_truetype_font_target)
|
||||
|
||||
add_custom_target(about_lbm_flamenco
|
||||
make lbm PCB=FLAMENCO
|
||||
add_truetype_font_target(Horus tinsize "DejaVu Sans" 9)
|
||||
add_truetype_font_target(Horus smlsize "DejaVu Sans" 13)
|
||||
add_truetype_font_target(Horus stdsize "DejaVu Sans" 16)
|
||||
add_truetype_font_target(Horus midsize "DejaVu Sans" 24)
|
||||
add_truetype_font_target(Horus dblsize "DejaVu Sans" 32)
|
||||
add_truetype_font_target(Horus xxlsize "DejaVu Sans" 48)
|
||||
|
||||
add_bitmaps_target(lbm_horus_bitmaps "${RADIO_SRC_DIRECTORY}/bitmaps/Horus/????[^_]*.png" 480 5/6/5/8)
|
||||
add_bitmaps_target(lbm_horus_masks ${RADIO_SRC_DIRECTORY}/bitmaps/Horus/mask_*.png 480 8bits)
|
||||
add_bitmaps_target(lbm_horus_fonts ${RADIO_SRC_DIRECTORY}/fonts/Horus/*.png 480 8bits)
|
||||
add_dependencies(lbm_horus_bitmaps lbm_horus_masks lbm_horus_fonts)
|
||||
|
||||
file(GLOB translations ${RADIO_SRC_DIRECTORY}/translations/*.h.txt)
|
||||
foreach(translation ${translations})
|
||||
get_filename_component(language ${translation} NAME_WE)
|
||||
get_filename_component(path ${translation} DIRECTORY)
|
||||
set(target ${path}/${language}.h)
|
||||
add_custom_command(
|
||||
OUTPUT ${target}
|
||||
COMMAND python ../util/translate.py ${translation} ${target} ${language}
|
||||
DEPENDS ${translation}
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
list(APPEND translations_files ${target})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(about_lbm_horus
|
||||
make lbm PCB=HORUS
|
||||
add_custom_target(firmware_translations DEPENDS ${translations_files})
|
||||
|
||||
TODAY(DATE)
|
||||
NOW(TIME)
|
||||
|
||||
configure_file(${RADIO_SRC_DIRECTORY}/stamp.h.in ${RADIO_SRC_DIRECTORY}/stamp.h @ONLY)
|
||||
|
||||
macro(add_lua_export_target target)
|
||||
string(TOUPPER ${target} pcbdefine)
|
||||
add_custom_command(
|
||||
OUTPUT ${RADIO_SRC_DIRECTORY}/lua/lua_exports_${target}.inc
|
||||
COMMAND ${CMAKE_C_COMPILER} -E -DPCB${pcbdefine} -DCPUARM -DCPUSTM32 -DLUA -DEXPORT myeeprom.h | grep LEXP > lua/lua_exports_${target}.txt
|
||||
COMMAND python ../util/luaexport.py ${VERSION} lua/lua_exports_${target}.txt lua/lua_exports_${target}.inc lua/lua_fields_${target}.txt
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
add_custom_target(lua_export_${target} DEPENDS ${RADIO_SRC_DIRECTORY}/lua/lua_exports_${target}.inc)
|
||||
endmacro(add_lua_export_target)
|
||||
|
||||
add_custom_target(commondeps
|
||||
make stamp_header tra
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${RADIO_SRC_DIRECTORY}/stamp-opentx.h)
|
||||
|
||||
add_custom_target(lua_exports
|
||||
COMMAND make PCB=TARANIS lua/lua_exports_taranis.inc
|
||||
COMMAND make PCB=FLAMENCO lua/lua_exports_flamenco.inc
|
||||
COMMAND make PCB=HORUS lua/lua_exports_horus.inc
|
||||
DEPENDS ${RADIO_SRC_DIRECTORY}/myeeprom.h
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
add_lua_export_target(taranis)
|
||||
add_lua_export_target(horus)
|
||||
|
||||
set(OPENTX_SRC_FILES
|
||||
opentxsimulator.cpp
|
||||
|
@ -99,19 +146,22 @@ add_library(opentx-taranisplus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
|||
add_library(opentx-taranisx9e${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
||||
add_library(opentx-horus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
||||
|
||||
add_dependencies(opentx-9x${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-9xr${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-9x128${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-9xr128${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-gruvin9x${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-mega2560${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-sky9x${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-9xrpro${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-ar9x${SUFFIX}-simulator about_lbm_9x commondeps)
|
||||
add_dependencies(opentx-taranis${SUFFIX}-simulator about_lbm_taranis commondeps lua_exports)
|
||||
add_dependencies(opentx-taranisplus${SUFFIX}-simulator about_lbm_taranis commondeps lua_exports)
|
||||
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator about_lbm_taranis commondeps lua_exports)
|
||||
add_dependencies(opentx-horus${SUFFIX}-simulator about_lbm_horus commondeps lua_exports)
|
||||
set(dependencies_9x lbm_9x_bitmaps firmware_translations)
|
||||
add_dependencies(opentx-9x${SUFFIX}-simulator ${dependencies_9x})
|
||||
add_dependencies(opentx-9xr${SUFFIX}-simulator ${dependencies_9x})
|
||||
add_dependencies(opentx-9x128${SUFFIX}-simulator ${dependencies_9x})
|
||||
add_dependencies(opentx-9xr128${SUFFIX}-simulator ${dependencies_9x})
|
||||
add_dependencies(opentx-gruvin9x${SUFFIX}-simulator ${dependencies_9x})
|
||||
add_dependencies(opentx-mega2560${SUFFIX}-simulator ${dependencies_9x})
|
||||
add_dependencies(opentx-sky9x${SUFFIX}-simulator ${dependencies_9x})
|
||||
add_dependencies(opentx-9xrpro${SUFFIX}-simulator ${dependencies_9x})
|
||||
add_dependencies(opentx-ar9x${SUFFIX}-simulator ${dependencies_9x})
|
||||
set(dependencies_taranis lbm_taranis_bitmaps lua_export_taranis firmware_translations)
|
||||
add_dependencies(opentx-taranis${SUFFIX}-simulator ${dependencies_taranis})
|
||||
add_dependencies(opentx-taranisplus${SUFFIX}-simulator ${dependencies_taranis})
|
||||
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator ${dependencies_taranis})
|
||||
|
||||
add_dependencies(opentx-horus${SUFFIX}-simulator lbm_horus_bitmaps lbm_horus_fonts firmware_translations lua_export_horus)
|
||||
|
||||
set(OPENTX_LIBRARIES
|
||||
opentx-9x${SUFFIX}-simulator
|
||||
|
|
|
@ -135,6 +135,7 @@ namespace NAMESPACE {
|
|||
#if defined(PCBHORUS)
|
||||
#include "radio/src/bmp.cpp"
|
||||
#include "radio/src/gui/Horus/bitmaps.cpp"
|
||||
#include "radio/src/gui/Horus/curves.cpp"
|
||||
#include "radio/src/gui/Horus/fonts.cpp"
|
||||
#include "radio/src/gui/Horus/widgets.cpp"
|
||||
#include "radio/src/gui/Horus/navigation.cpp"
|
||||
|
|
2
radio/src/.gitignore
vendored
2
radio/src/.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
/stamp-opentx.h
|
||||
/stamp.h
|
||||
/opentx.elf
|
||||
/simu
|
||||
/opentx.map
|
||||
|
|
|
@ -1234,7 +1234,7 @@ ifeq ($(PCB), HORUS)
|
|||
PULSESSRC = pulses/pulses_arm.cpp pulses/ppm_arm.cpp pulses/pxx_arm.cpp
|
||||
CPPSRC += tasks_arm.cpp audio_arm.cpp sbus.cpp telemetry/telemetry.cpp
|
||||
CPPSRC += targets/Horus/pulses_driver.cpp targets/Horus/keys_driver.cpp targets/Horus/adc_driver.cpp targets/Horus/trainer_driver.cpp targets/Horus/audio_driver.cpp targets/Horus/serial2_driver.cpp targets/Horus/telemetry_driver.cpp
|
||||
CPPSRC += bmp.cpp gui/$(GUIDIRECTORY)/bitmaps.cpp gui/$(GUIDIRECTORY)/view_channels.cpp gui/$(GUIDIRECTORY)/view_about.cpp gui/$(GUIDIRECTORY)/view_text.cpp debug.cpp
|
||||
CPPSRC += bmp.cpp gui/$(GUIDIRECTORY)/curves.cpp gui/$(GUIDIRECTORY)/bitmaps.cpp gui/$(GUIDIRECTORY)/view_channels.cpp gui/$(GUIDIRECTORY)/view_about.cpp gui/$(GUIDIRECTORY)/view_text.cpp debug.cpp
|
||||
SRC += targets/Horus/system_stm32f4xx.c
|
||||
CPPSRC += storage/storage_common.cpp storage/sdcard_raw.cpp
|
||||
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/misc.c
|
||||
|
@ -1784,11 +1784,10 @@ lss: $(TARGET).lss
|
|||
sym: $(TARGET).sym
|
||||
|
||||
# Build stamp-file
|
||||
stamp_header:
|
||||
@echo "// Automatically generated file (Makefile) - do not edit" > stamp-opentx.h
|
||||
@echo "#define DATE_STR \"`date +%Y-%m-%d | tr -d '\r\n'`\"" >> stamp-opentx.h
|
||||
@echo "#define TIME_STR \"`date +%H:%M:%S | tr -d '\r\n'`\"" >> stamp-opentx.h
|
||||
@echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx.h
|
||||
stamp.h:
|
||||
@echo "#define DATE \"`date +%Y-%m-%d | tr -d '\r\n'`\"" > stamp.h
|
||||
@echo "#define TIME \"`date +%H:%M:%S | tr -d '\r\n'`\"" >> stamp.h
|
||||
@echo "#define VERSION \"$(VERSION)\"" >> stamp.h
|
||||
|
||||
opentx-stamp:
|
||||
@echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx.txt
|
||||
|
@ -2005,7 +2004,7 @@ ifeq ($(SIMU_DISKIO), YES)
|
|||
SIMUDEFS += -DSIMU_DISKIO
|
||||
endif
|
||||
|
||||
simu: $(LUADEP) stamp_header allsimusrc.cpp Makefile simu.cpp targets/simu/simpgmspace.cpp *.h tra lbm eeprom.bin
|
||||
simu: $(LUADEP) stamp.h allsimusrc.cpp Makefile simu.cpp targets/simu/simpgmspace.cpp *.h tra lbm eeprom.bin
|
||||
g++ $(CPPFLAGS) $(SIMUCPPFLAGS) $(INCFLAGS) simu.cpp allsimusrc.cpp $(LUASRC) targets/simu/simpgmspace.cpp -MD $(SIMUDEFS) -O0 -o simu $(FOXINC) $(FOXLIB) $(AUDIOINC) $(AUDIOLIB) -pthread -fexceptions
|
||||
|
||||
eeprom.bin:
|
||||
|
@ -2105,7 +2104,7 @@ clean_list :
|
|||
$(REMOVE) *.lst
|
||||
$(REMOVE) allsrc.cpp
|
||||
$(REMOVE) allsimusrc.cpp
|
||||
$(REMOVE) stamp-opentx.h
|
||||
$(REMOVE) stamp.h
|
||||
$(REMOVE) bitmaps/*.lbm
|
||||
$(REMOVE) bitmaps/*/*.lbm
|
||||
$(REMOVE) fonts/*/*.lbm
|
||||
|
|
BIN
radio/src/bitmaps/Horus/mask_coord_shadow.png
Normal file
BIN
radio/src/bitmaps/Horus/mask_coord_shadow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 251 B |
|
@ -65,7 +65,7 @@ point_t getPoint(uint8_t i)
|
|||
|
||||
void DrawCurve(uint8_t offset=0)
|
||||
{
|
||||
DrawFunction(curveFn, offset);
|
||||
drawFunction(curveFn, offset);
|
||||
|
||||
uint8_t i = 0;
|
||||
do {
|
||||
|
|
|
@ -82,7 +82,7 @@ int16_t expoFn(int16_t x)
|
|||
return anas[ed->chn];
|
||||
}
|
||||
|
||||
void DrawFunction(FnFuncP fn, uint8_t offset)
|
||||
void drawFunction(FnFuncP fn, uint8_t offset)
|
||||
{
|
||||
lcdDrawVerticalLine(X0-offset, 0, LCD_H, 0xee);
|
||||
lcdDrawHorizontalLine(X0-WCHART-offset, Y0, WCHART*2, 0xee);
|
||||
|
@ -368,7 +368,7 @@ void menuModelExpoOne(uint8_t event)
|
|||
y += FH;
|
||||
}
|
||||
|
||||
DrawFunction(expoFn);
|
||||
drawFunction(expoFn);
|
||||
|
||||
int16_t x512 = calibratedStick[ed->chn];
|
||||
lcd_outdezAtt(LCD_W-8, 6*FH, calcRESXto100(x512), 0);
|
||||
|
|
|
@ -460,6 +460,6 @@ void displayWarning(uint8_t event);
|
|||
#define EDIT_MODE_INIT -1
|
||||
|
||||
typedef int16_t (*FnFuncP) (int16_t x);
|
||||
void DrawFunction(FnFuncP fn, uint8_t offset=0);
|
||||
void drawFunction(FnFuncP fn, uint8_t offset=0);
|
||||
|
||||
#endif // _MENUS_H_
|
||||
|
|
|
@ -263,3 +263,7 @@ const uint8_t LBM_CURVE_POINT[] = {
|
|||
const uint8_t LBM_CURVE_POINT_CENTER[] = {
|
||||
#include "../../bitmaps/Horus/mask_cvpoint_center.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_CURVE_COORD_SHADOW[] = {
|
||||
#include "../../bitmaps/Horus/mask_coord_shadow.lbm"
|
||||
};
|
||||
|
|
111
radio/src/gui/Horus/curves.cpp
Normal file
111
radio/src/gui/Horus/curves.cpp
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Authors (alphabetical order)
|
||||
* - Andre Bernet <bernet.andre@gmail.com>
|
||||
* - Andreas Weitl
|
||||
* - Bertrand Songis <bsongis@gmail.com>
|
||||
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
|
||||
* - Cameron Weeks <th9xer@gmail.com>
|
||||
* - Erez Raviv
|
||||
* - Gabriel Birkus
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny
|
||||
* - Michael Blandford
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
* - Thomas Husterer
|
||||
*
|
||||
* opentx is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
* and the original (and ongoing) project by
|
||||
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
coord_t getCurveYCoord(FnFuncP fn, coord_t x)
|
||||
{
|
||||
return limit(0, CURVE_CENTER_Y - divRoundClosest(fn(divRoundClosest(x * RESX, CURVE_SIDE_WIDTH)) * CURVE_SIDE_WIDTH, RESX), LCD_H-1);
|
||||
}
|
||||
|
||||
void drawFunction(FnFuncP fn, int offset)
|
||||
{
|
||||
int left = CURVE_CENTER_X-offset-CURVE_SIDE_WIDTH;
|
||||
int right = CURVE_CENTER_X-offset+CURVE_SIDE_WIDTH;
|
||||
int center = CURVE_CENTER_X-offset;
|
||||
|
||||
// Axis
|
||||
lcdDrawSolidHorizontalLine(left, CURVE_CENTER_Y, CURVE_SIDE_WIDTH*2+1, CURVE_AXIS_COLOR);
|
||||
lcdDrawSolidVerticalLine(center, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, CURVE_AXIS_COLOR);
|
||||
|
||||
// Extra lines
|
||||
lcdDrawVerticalLine(left+CURVE_SIDE_WIDTH/2, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, STASHED, CURVE_AXIS_COLOR);
|
||||
lcdDrawVerticalLine(right-CURVE_SIDE_WIDTH/2, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, STASHED, CURVE_AXIS_COLOR);
|
||||
lcdDrawHorizontalLine(left, CURVE_CENTER_Y-CURVE_SIDE_WIDTH/2, CURVE_SIDE_WIDTH*2+1, STASHED, CURVE_AXIS_COLOR);
|
||||
lcdDrawHorizontalLine(left, CURVE_CENTER_Y+CURVE_SIDE_WIDTH/2, CURVE_SIDE_WIDTH*2+1, STASHED, CURVE_AXIS_COLOR);
|
||||
|
||||
// Outside border
|
||||
lcdDrawSolidVerticalLine(left, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, TEXT_COLOR);
|
||||
lcdDrawSolidVerticalLine(right, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, TEXT_COLOR);
|
||||
lcdDrawSolidHorizontalLine(left, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2+1, TEXT_COLOR);
|
||||
lcdDrawSolidHorizontalLine(left, CURVE_CENTER_Y+CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2+1, TEXT_COLOR);
|
||||
|
||||
coord_t prev_yv = (coord_t)-1;
|
||||
|
||||
for (int xv=-CURVE_SIDE_WIDTH; xv<=CURVE_SIDE_WIDTH; xv+=1) {
|
||||
coord_t yv = getCurveYCoord(fn, xv);
|
||||
if (prev_yv != (coord_t)-1) {
|
||||
if (prev_yv < yv) {
|
||||
for (int y=prev_yv; y<=yv; y+=1) {
|
||||
lcdDrawBitmapPattern(CURVE_CENTER_X+xv-offset-2, y-2, LBM_POINT, TEXT_COLOR);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int y=yv; y<=prev_yv; y+=1) {
|
||||
lcdDrawBitmapPattern(CURVE_CENTER_X+xv-offset-2, y-2, LBM_POINT, TEXT_COLOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
prev_yv = yv;
|
||||
}
|
||||
}
|
||||
|
||||
void drawCurveVerticalScale(int x)
|
||||
{
|
||||
for (int i=0; i<=20; i++) {
|
||||
lcdDrawSolidHorizontalLine(x, CURVE_CENTER_Y-CURVE_SIDE_WIDTH+i*CURVE_SIDE_WIDTH/10, 10, TEXT_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
void drawCurveHorizontalScale()
|
||||
{
|
||||
for (int i=0; i<=20; i++) {
|
||||
lcdDrawSolidVerticalLine(CURVE_CENTER_X-CURVE_SIDE_WIDTH+i*CURVE_SIDE_WIDTH/10, CURVE_CENTER_Y+CURVE_SIDE_WIDTH+5, 10, TEXT_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
void drawCurveCoord(int x, int y, const char * text, bool active)
|
||||
{
|
||||
lcdDrawSolidFilledRect(x, y, CURVE_COORD_WIDTH, CURVE_COORD_HEIGHT, CURVE_CURSOR_COLOR);
|
||||
lcdDrawText(x+3+(CURVE_COORD_WIDTH-1-getTextWidth(text, SMLSIZE))/2, y+1, text, LEFT|SMLSIZE|TEXT_BGCOLOR);
|
||||
if (active) {
|
||||
lcdDrawBitmapPattern(x, y, LBM_CURVE_COORD_SHADOW, TEXT_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
void drawCurvePoint(int x, int y, LcdFlags color)
|
||||
{
|
||||
lcdDrawBitmapPattern(x, y, LBM_CURVE_POINT, color);
|
||||
lcdDrawBitmapPattern(x, y, LBM_CURVE_POINT_CENTER, TEXT_BGCOLOR);
|
||||
}
|
|
@ -62,6 +62,8 @@
|
|||
#define CURVE_SIDE_WIDTH 100
|
||||
#define CURVE_CENTER_X (LCD_W-CURVE_SIDE_WIDTH-7)
|
||||
#define CURVE_CENTER_Y 151
|
||||
#define CURVE_COORD_WIDTH 36
|
||||
#define CURVE_COORD_HEIGHT 17
|
||||
|
||||
#define MENU_TITLE_NEXT_POS (lcdNextPos + 10)
|
||||
#define MENU_INIT_VPOS -1
|
||||
|
@ -76,6 +78,13 @@ void drawProgressBar(const char *label);
|
|||
void updateProgressBar(int num, int den);
|
||||
void drawTopmenuDatetime();
|
||||
|
||||
// Curve functions
|
||||
coord_t getCurveYCoord(FnFuncP fn, coord_t x);
|
||||
void drawFunction(FnFuncP fn, int offset);
|
||||
void drawCurveVerticalScale(int x);
|
||||
void drawCurveHorizontalScale();
|
||||
void drawCurveCoord(int x, int y, const char * text, bool active=false);
|
||||
void drawCurvePoint(int x, int y, LcdFlags color);
|
||||
|
||||
// Header bitmaps
|
||||
extern const uint8_t LBM_TOPMENU_POLYGON[];
|
||||
|
@ -114,3 +123,4 @@ extern const uint8_t LBM_ASTERISK[];
|
|||
extern const uint8_t LBM_POINT[];
|
||||
extern const uint8_t LBM_CURVE_POINT[];
|
||||
extern const uint8_t LBM_CURVE_POINT_CENTER[];
|
||||
extern const uint8_t LBM_CURVE_COORD_SHADOW[];
|
||||
|
|
|
@ -114,21 +114,25 @@ static int8_t s_copyTgtOfs;
|
|||
|
||||
static uint8_t editNameCursorPos = 0;
|
||||
|
||||
void editName(coord_t x, coord_t y, char * name, uint8_t size, evt_t event, uint8_t active)
|
||||
void editName(coord_t x, coord_t y, char * name, uint8_t size, evt_t event, uint8_t active, LcdFlags flags)
|
||||
{
|
||||
uint8_t flags = 0;
|
||||
if (active && s_editMode <= 0) {
|
||||
flags = INVERS;
|
||||
flags |= INVERS;
|
||||
}
|
||||
|
||||
if (!active || s_editMode <= 0) {
|
||||
if (flags & ZCHAR) {
|
||||
uint8_t len = zlen(name, size);
|
||||
if (len == 0) {
|
||||
char tmp[] = "---";
|
||||
lcdDrawTextWithLen(x, y, tmp, size, flags);
|
||||
lcdDrawTextWithLen(x, y, tmp, size, flags-ZCHAR);
|
||||
}
|
||||
else {
|
||||
lcdDrawTextWithLen(x, y, name, len, ZCHAR | flags);
|
||||
lcdDrawTextWithLen(x, y, name, len, flags);
|
||||
}
|
||||
}
|
||||
else {
|
||||
lcdDrawText(x, y, name, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,9 +142,14 @@ void editName(coord_t x, coord_t y, char * name, uint8_t size, evt_t event, uint
|
|||
int8_t v = c;
|
||||
|
||||
if (event==EVT_ROTARY_RIGHT || event==EVT_ROTARY_LEFT) {
|
||||
if (flags & ZCHAR) {
|
||||
v = checkIncDec(event, abs(v), 0, ZCHAR_MAX, 0);
|
||||
if (c <= 0) v = -v;
|
||||
}
|
||||
else {
|
||||
v = checkIncDec(event, abs(v), '0', 'z', 0);
|
||||
}
|
||||
}
|
||||
|
||||
switch (event) {
|
||||
case EVT_KEY_BREAK(KEY_LEFT):
|
||||
|
@ -163,7 +172,7 @@ void editName(coord_t x, coord_t y, char * name, uint8_t size, evt_t event, uint
|
|||
break;
|
||||
|
||||
case EVT_KEY_LONG(KEY_ENTER):
|
||||
if (v==0) {
|
||||
if (v == ((flags & ZCHAR) ? 0 : ' ')) {
|
||||
s_editMode = 0;
|
||||
killEvents(event);
|
||||
break;
|
||||
|
@ -172,11 +181,21 @@ void editName(coord_t x, coord_t y, char * name, uint8_t size, evt_t event, uint
|
|||
|
||||
case EVT_KEY_LONG(KEY_LEFT):
|
||||
case EVT_KEY_LONG(KEY_RIGHT):
|
||||
if (flags & ZCHAR) {
|
||||
if (v>=-26 && v<=26) {
|
||||
v = -v; // toggle case
|
||||
if (event==EVT_KEY_LONG(KEY_LEFT))
|
||||
killEvents(KEY_LEFT);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (v>='A' && v<='Z') {
|
||||
v = 'a'+v-'A'; // toggle case
|
||||
}
|
||||
else if (v>='a' && v<='z') {
|
||||
v = 'A'+v-'a'; // toggle case
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -185,10 +204,10 @@ void editName(coord_t x, coord_t y, char * name, uint8_t size, evt_t event, uint
|
|||
storageDirty(g_menuPos[0] == 0 ? EE_MODEL : EE_GENERAL);
|
||||
}
|
||||
|
||||
lcdDrawTextWithLen(x, y, name, size, ZCHAR | flags);
|
||||
coord_t w = (editNameCursorPos == 0 ? 0 : getTextWidth(name, editNameCursorPos, ZCHAR));
|
||||
char s[] = { idx2char(name[editNameCursorPos]), '\0' };
|
||||
lcdDrawSolidFilledRect(x+w-1, y-INVERT_VERT_MARGIN, getTextWidth(s, 1)+1, INVERT_LINE_HEIGHT, TEXT_INVERTED_BGCOLOR);
|
||||
lcdDrawTextWithLen(x, y, name, size, flags);
|
||||
coord_t w = (editNameCursorPos == 0 ? 0 : getTextWidth(name, editNameCursorPos, flags));
|
||||
char s[] = { (flags & ZCHAR) ? idx2char(name[editNameCursorPos]) : name[editNameCursorPos], '\0' };
|
||||
lcdDrawSolidFilledRect(x+w-1, y-INVERT_VERT_MARGIN, getTextWidth(s, 1, flags)+1, INVERT_LINE_HEIGHT, TEXT_INVERTED_BGCOLOR);
|
||||
lcdDrawText(x+w, y, s, TEXT_INVERTED_COLOR);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -65,14 +65,14 @@ point_t getPoint(uint8_t i)
|
|||
|
||||
void DrawCurve(int offset=0)
|
||||
{
|
||||
DrawFunction(curveFn, offset);
|
||||
drawFunction(curveFn, offset);
|
||||
|
||||
int i = 0;
|
||||
/*int i = 0;
|
||||
do {
|
||||
point_t point = getPoint(i++);
|
||||
if (point.x == 0) break;
|
||||
lcdDrawSolidFilledRect(point.x-offset, point.y-1, 3, 3, TEXT_COLOR); // do markup square
|
||||
} while(1);
|
||||
} while(1);*/
|
||||
}
|
||||
|
||||
extern int8_t * curveEnd[MAX_CURVES];
|
||||
|
@ -143,11 +143,13 @@ bool menuModelCurveOne(evt_t event)
|
|||
|
||||
SIMPLE_SUBMENU(STR_MENUCURVE, 4 + 5+crv.points + (crv.type==CURVE_TYPE_CUSTOM ? 5+crv.points-2 : 0), 0);
|
||||
|
||||
lcdDrawNumber(MENU_TITLE_NEXT_POS, MENU_TITLE_TOP+2, s_curveChan+1, LEFT|HEADER_COLOR);
|
||||
lcdDrawNumber(MENU_TITLE_NEXT_POS, MENU_TITLE_TOP+1, s_curveChan+1, LEFT|TEXT_COLOR);
|
||||
|
||||
// Curve name
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP, STR_NAME);
|
||||
editName(MENUS_MARGIN_LEFT+INDENT_WIDTH, MENU_CONTENT_TOP + FH, g_model.curveNames[s_curveChan], sizeof(g_model.curveNames[s_curveChan]), event, m_posVert==0);
|
||||
|
||||
// Curve type
|
||||
LcdFlags attr = (m_posVert==1 ? (s_editMode>0 ? INVERS|BLINK : INVERS) : 0);
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 2*FH, "Type");
|
||||
lcdDrawTextAtIndex(MENUS_MARGIN_LEFT+INDENT_WIDTH, MENU_CONTENT_TOP + 3*FH, STR_CURVE_TYPES, crv.type, attr);
|
||||
|
@ -165,6 +167,7 @@ bool menuModelCurveOne(evt_t event)
|
|||
}
|
||||
}
|
||||
|
||||
// Curve points count
|
||||
attr = (m_posVert==2 ? (s_editMode>0 ? INVERS|BLINK : INVERS) : 0);
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 4*FH, STR_COUNT);
|
||||
lcdDrawNumber(MENUS_MARGIN_LEFT+INDENT_WIDTH, MENU_CONTENT_TOP + 5*FH, 5+crv.points, LEFT|attr, 0, NULL, STR_PTS);
|
||||
|
@ -186,6 +189,7 @@ bool menuModelCurveOne(evt_t event)
|
|||
}
|
||||
}
|
||||
|
||||
// Curve smooth
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 6*FH, STR_SMOOTH);
|
||||
drawCheckBox(lcdNextPos + 10, MENU_CONTENT_TOP + 6*FH, crv.smooth, m_posVert==3 ? INVERS : 0);
|
||||
if (m_posVert==3) crv.smooth = checkIncDecModel(event, crv.smooth, 0, 1);
|
||||
|
@ -209,12 +213,11 @@ bool menuModelCurveOne(evt_t event)
|
|||
}
|
||||
|
||||
if (m_posVert >= 0) {
|
||||
DrawCurve(6);
|
||||
DrawCurve();
|
||||
drawCurveHorizontalScale();
|
||||
if (m_posVert < 4) drawCurveVerticalScale(CURVE_CENTER_X-CURVE_SIDE_WIDTH-15);
|
||||
}
|
||||
|
||||
// lcdDrawText(115, MENU_FOOTER_TOP, "X", HEADER_COLOR);
|
||||
// lcdDrawText(145, MENU_FOOTER_TOP, "Y", HEADER_COLOR);
|
||||
|
||||
coord_t posY = MENU_CONTENT_TOP;
|
||||
attr = (s_editMode > 0 ? INVERS|BLINK : INVERS);
|
||||
for (int i=0; i<5+crv.points; i++) {
|
||||
|
@ -230,9 +233,10 @@ bool menuModelCurveOne(evt_t event)
|
|||
selectionMode = 2;
|
||||
}
|
||||
|
||||
if (i>=pointsOfs && i<pointsOfs+NUM_BODY_LINES) {
|
||||
int8_t x = -100 + 200*i/(5+crv.points-1);
|
||||
if (crv.type==CURVE_TYPE_CUSTOM && i>0 && i<5+crv.points-1) x = points[5+crv.points+i-1];
|
||||
|
||||
if (i>=pointsOfs && i<pointsOfs+NUM_BODY_LINES) {
|
||||
lcdDrawNumber(120, posY, i+1, LEFT|TEXT_DISABLE_COLOR);
|
||||
lcdDrawNumber(150, posY, x, LEFT|(selectionMode==1 ? attr : 0));
|
||||
lcdDrawNumber(200, posY, points[i], LEFT|(selectionMode==2 ? attr : 0));
|
||||
|
@ -240,8 +244,35 @@ bool menuModelCurveOne(evt_t event)
|
|||
}
|
||||
|
||||
if (selectionMode > 0) {
|
||||
// do selection square
|
||||
lcdDrawSolidFilledRect(point.x-7, point.y-2, 5, 5, TEXT_INVERTED_BGCOLOR);
|
||||
lcdDrawSolidFilledRect(point.x, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, 2, 2*CURVE_SIDE_WIDTH+2, CURVE_CURSOR_COLOR);
|
||||
|
||||
char text[5];
|
||||
sprintf(text, "%d", points[i]);
|
||||
|
||||
if (point.x >= CURVE_CENTER_X) {
|
||||
drawCurveVerticalScale(point.x-15);
|
||||
if (points[i-1] > points[i]) {
|
||||
drawCurveCoord(point.x+1-CURVE_COORD_WIDTH, point.y, text, selectionMode==2);
|
||||
}
|
||||
else {
|
||||
drawCurveCoord(point.x+1-CURVE_COORD_WIDTH, point.y-CURVE_COORD_HEIGHT-1, text, selectionMode==2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
drawCurveVerticalScale(point.x+7);
|
||||
if (points[i+1] > points[i]) {
|
||||
drawCurveCoord(point.x+1, point.y, text, selectionMode==2);
|
||||
}
|
||||
else {
|
||||
drawCurveCoord(point.x+1, point.y-CURVE_COORD_HEIGHT-1, text, selectionMode==2);
|
||||
}
|
||||
}
|
||||
|
||||
drawCurvePoint(point.x-3, point.y-4, CURVE_CURSOR_COLOR);
|
||||
|
||||
sprintf(text, "%d", x);
|
||||
drawCurveCoord(limit(CURVE_CENTER_X-CURVE_SIDE_WIDTH-1, point.x-CURVE_COORD_WIDTH/2, CURVE_CENTER_X+CURVE_SIDE_WIDTH-CURVE_COORD_WIDTH+1), CURVE_CENTER_Y+CURVE_SIDE_WIDTH+2, text, selectionMode==1);
|
||||
|
||||
if (s_editMode > 0) {
|
||||
if (selectionMode == 1)
|
||||
CHECK_INCDEC_MODELVAR(event, points[5+crv.points+i-1], i==1 ? -100 : points[5+crv.points+i-2], i==5+crv.points-2 ? 100 : points[5+crv.points+i]); // edit X
|
||||
|
@ -253,9 +284,12 @@ bool menuModelCurveOne(evt_t event)
|
|||
else if (i > pointsOfs+NUM_BODY_LINES-1)
|
||||
pointsOfs = i-NUM_BODY_LINES+1;
|
||||
}
|
||||
else {
|
||||
drawCurvePoint(point.x-3, point.y-4, TEXT_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
drawScrollbar(250, DEFAULT_SCROLLBAR_Y, DEFAULT_SCROLLBAR_H, pointsOfs, 5+crv.points, NUM_BODY_LINES);
|
||||
drawScrollbar(240, DEFAULT_SCROLLBAR_Y, DEFAULT_SCROLLBAR_H+MENU_FOOTER_HEIGHT, pointsOfs, 5+crv.points, NUM_BODY_LINES+1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -79,67 +79,6 @@ int expoFn(int x)
|
|||
return anas[ed->chn];
|
||||
}
|
||||
|
||||
int divRound(int num, int den)
|
||||
{
|
||||
if (num < 0)
|
||||
return (num - den/2) / den;
|
||||
else
|
||||
return (num + den/2) / den;
|
||||
}
|
||||
|
||||
coord_t getYCoord(FnFuncP fn, coord_t x)
|
||||
{
|
||||
return limit(0, CURVE_CENTER_Y - divRound(fn(divRound(x * RESX, CURVE_SIDE_WIDTH)) * CURVE_SIDE_WIDTH, RESX), LCD_H-1);
|
||||
}
|
||||
|
||||
void DrawFunction(FnFuncP fn, int offset)
|
||||
{
|
||||
int left = CURVE_CENTER_X-offset-CURVE_SIDE_WIDTH;
|
||||
int right = CURVE_CENTER_X-offset+CURVE_SIDE_WIDTH;
|
||||
int center = CURVE_CENTER_X-offset;
|
||||
|
||||
// Axis
|
||||
lcdDrawSolidHorizontalLine(left, CURVE_CENTER_Y, CURVE_SIDE_WIDTH*2+1, CURVE_AXIS_COLOR);
|
||||
lcdDrawSolidVerticalLine(center, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, CURVE_AXIS_COLOR);
|
||||
|
||||
// Extra lines
|
||||
lcdDrawVerticalLine(left+CURVE_SIDE_WIDTH/2, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, STASHED, CURVE_AXIS_COLOR);
|
||||
lcdDrawVerticalLine(right-CURVE_SIDE_WIDTH/2, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, STASHED, CURVE_AXIS_COLOR);
|
||||
lcdDrawHorizontalLine(left, CURVE_CENTER_Y-CURVE_SIDE_WIDTH/2, CURVE_SIDE_WIDTH*2+1, STASHED, CURVE_AXIS_COLOR);
|
||||
lcdDrawHorizontalLine(left, CURVE_CENTER_Y+CURVE_SIDE_WIDTH/2, CURVE_SIDE_WIDTH*2+1, STASHED, CURVE_AXIS_COLOR);
|
||||
|
||||
// Outside border
|
||||
lcdDrawSolidVerticalLine(left, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, TEXT_COLOR);
|
||||
lcdDrawSolidVerticalLine(right, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2, TEXT_COLOR);
|
||||
lcdDrawSolidHorizontalLine(left, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2+1, TEXT_COLOR);
|
||||
lcdDrawSolidHorizontalLine(left, CURVE_CENTER_Y+CURVE_SIDE_WIDTH, CURVE_SIDE_WIDTH*2+1, TEXT_COLOR);
|
||||
|
||||
// Horizontal / Vertical scale
|
||||
for (int i=0; i<=20; i++) {
|
||||
lcdDrawSolidHorizontalLine(left-15, CURVE_CENTER_Y-CURVE_SIDE_WIDTH+i*CURVE_SIDE_WIDTH/10, 10, TEXT_COLOR);
|
||||
lcdDrawSolidVerticalLine(left+i*CURVE_SIDE_WIDTH/10, CURVE_CENTER_Y+CURVE_SIDE_WIDTH+5, 10, TEXT_COLOR);
|
||||
}
|
||||
|
||||
coord_t prev_yv = (coord_t)-1;
|
||||
|
||||
for (int xv=-CURVE_SIDE_WIDTH; xv<=CURVE_SIDE_WIDTH; xv+=1) {
|
||||
coord_t yv = getYCoord(fn, xv);
|
||||
if (prev_yv != (coord_t)-1) {
|
||||
if (prev_yv < yv) {
|
||||
for (int y=prev_yv; y<=yv; y+=1) {
|
||||
lcdDrawBitmapPattern(CURVE_CENTER_X+xv-offset-2, y-2, LBM_POINT, TEXT_COLOR);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int y=yv; y<=prev_yv; y+=1) {
|
||||
lcdDrawBitmapPattern(CURVE_CENTER_X+xv-offset-2, y-2, LBM_POINT, TEXT_COLOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
prev_yv = yv;
|
||||
}
|
||||
}
|
||||
|
||||
int getLinesCount(uint8_t expo)
|
||||
{
|
||||
int lastch = -1;
|
||||
|
@ -371,7 +310,10 @@ bool menuModelExpoOne(evt_t event)
|
|||
|
||||
coord_t y = MENU_CONTENT_TOP;
|
||||
|
||||
DrawFunction(expoFn);
|
||||
drawFunction(expoFn);
|
||||
|
||||
drawCurveHorizontalScale();
|
||||
drawCurveVerticalScale(CURVE_CENTER_X-CURVE_SIDE_WIDTH-15);
|
||||
|
||||
{
|
||||
char textx[5];
|
||||
|
@ -390,20 +332,18 @@ bool menuModelExpoOne(evt_t event)
|
|||
int y = limit<int>(-1024, expoFn(x), 1024);
|
||||
sprintf(texty, "%d", calcRESXto100(y));
|
||||
|
||||
x = divRound(x*CURVE_SIDE_WIDTH, RESX);
|
||||
y = getYCoord(expoFn, x);
|
||||
x = divRoundClosest(x*CURVE_SIDE_WIDTH, RESX);
|
||||
y = getCurveYCoord(expoFn, x);
|
||||
|
||||
lcdDrawSolidFilledRect(CURVE_CENTER_X+x, CURVE_CENTER_Y-CURVE_SIDE_WIDTH, 2, 2*CURVE_SIDE_WIDTH+2, CURVE_CURSOR_COLOR);
|
||||
lcdDrawSolidFilledRect(CURVE_CENTER_X-CURVE_SIDE_WIDTH-2, y-1, 2*CURVE_SIDE_WIDTH+2, 2, CURVE_CURSOR_COLOR);
|
||||
lcdDrawBitmapPattern(CURVE_CENTER_X+x-4, y-4, LBM_CURVE_POINT, CURVE_CURSOR_COLOR);
|
||||
lcdDrawBitmapPattern(CURVE_CENTER_X+x-4, y-4, LBM_CURVE_POINT_CENTER, TEXT_BGCOLOR);
|
||||
|
||||
int left = (x < -30 ? CURVE_CENTER_X+x : (x > 30 ? CURVE_CENTER_X+x-34 : CURVE_CENTER_X-17+x/2));
|
||||
lcdDrawSolidFilledRect(left, CURVE_CENTER_Y+CURVE_SIDE_WIDTH+2, 36, 17, CURVE_CURSOR_COLOR);
|
||||
lcdDrawText(left+3+(35-getTextWidth(textx, SMLSIZE))/2, CURVE_CENTER_Y+CURVE_SIDE_WIDTH+3, textx, LEFT|SMLSIZE|TEXT_BGCOLOR);
|
||||
int top = (y < CURVE_CENTER_Y-8 ? y-1 : (y > CURVE_CENTER_Y+8 ? y-16 : CURVE_CENTER_Y-8+(y-CURVE_CENTER_Y)/2));
|
||||
lcdDrawSolidFilledRect(CURVE_CENTER_X-CURVE_SIDE_WIDTH-37, top, 36, 17, CURVE_CURSOR_COLOR);
|
||||
lcdDrawText(CURVE_CENTER_X-CURVE_SIDE_WIDTH-34+(35-getTextWidth(texty, SMLSIZE))/2, top+1, texty, LEFT|SMLSIZE|TEXT_BGCOLOR);
|
||||
int left = limit(CURVE_CENTER_X-CURVE_SIDE_WIDTH, CURVE_CENTER_X-CURVE_COORD_WIDTH/2+x, CURVE_CENTER_X+CURVE_SIDE_WIDTH-CURVE_COORD_WIDTH+2);
|
||||
drawCurveCoord(left, CURVE_CENTER_Y+CURVE_SIDE_WIDTH+2, textx);
|
||||
int top = limit(CURVE_CENTER_Y-CURVE_SIDE_WIDTH-1, -CURVE_COORD_HEIGHT/2+y, CURVE_CENTER_Y+CURVE_SIDE_WIDTH-CURVE_COORD_HEIGHT+1);
|
||||
drawCurveCoord(CURVE_CENTER_X-CURVE_SIDE_WIDTH-37, top, texty);
|
||||
}
|
||||
|
||||
for (int i=0; i<NUM_BODY_LINES+1; i++) {
|
||||
|
|
|
@ -43,11 +43,13 @@
|
|||
enum ModelSelectMode {
|
||||
MODE_SELECT_CATEGORY,
|
||||
MODE_SELECT_MODEL,
|
||||
MODE_RENAME_CATEGORY,
|
||||
};
|
||||
|
||||
uint8_t selectMode;
|
||||
uint8_t currentCategory;
|
||||
char selectedFilename[LEN_MODEL_FILENAME+1];
|
||||
char selectedCategory[LEN_MODEL_FILENAME+1];
|
||||
|
||||
void drawCategory(coord_t y, const char * name, bool selected)
|
||||
{
|
||||
|
@ -85,6 +87,19 @@ void drawModel(coord_t x, coord_t y, const char * name, bool selected)
|
|||
}
|
||||
}
|
||||
|
||||
void onCategorySelectMenu(const char * result)
|
||||
{
|
||||
if (result == STR_CREATE_CATEGORY) {
|
||||
storageAppendCategory("Category");
|
||||
}
|
||||
else if (result == STR_RENAME_CATEGORY) {
|
||||
selectMode = MODE_RENAME_CATEGORY;
|
||||
}
|
||||
else if (result == STR_DELETE_CATEGORY) {
|
||||
storageRemoveCategory(currentCategory--);
|
||||
}
|
||||
}
|
||||
|
||||
void onModelSelectMenu(const char * result)
|
||||
{
|
||||
if (result == STR_SELECT_MODEL) {
|
||||
|
@ -160,8 +175,16 @@ bool menuModelSelect(evt_t event)
|
|||
break;
|
||||
|
||||
case EVT_KEY_LONG(KEY_ENTER):
|
||||
if (selectMode == MODE_SELECT_CATEGORY) {
|
||||
killEvents(event);
|
||||
MENU_ADD_ITEM(STR_CREATE_CATEGORY);
|
||||
MENU_ADD_ITEM(STR_RENAME_CATEGORY);
|
||||
if (currentCategory > 0)
|
||||
MENU_ADD_ITEM(STR_DELETE_CATEGORY);
|
||||
menuHandler = onCategorySelectMenu;
|
||||
}
|
||||
else if (selectMode == MODE_SELECT_MODEL) {
|
||||
killEvents(event);
|
||||
if (selectMode == MODE_SELECT_MODEL) {
|
||||
ModelHeader header;
|
||||
const char * error = readModel(selectedFilename, (uint8_t *)&header, sizeof(header));
|
||||
if (!error) {
|
||||
|
@ -204,8 +227,25 @@ bool menuModelSelect(evt_t event)
|
|||
if (!result)
|
||||
break;
|
||||
if (y < LCD_H) {
|
||||
if (selectMode == MODE_RENAME_CATEGORY && currentCategory == index) {
|
||||
s_editMode = EDIT_MODIFY_STRING;
|
||||
lcdDrawSolidFilledRect(0, y-INVERT_VERT_MARGIN, CATEGORIES_WIDTH, INVERT_LINE_HEIGHT, TEXT_BGCOLOR);
|
||||
editName(MENUS_MARGIN_LEFT, y, selectedCategory, LEN_MODEL_FILENAME, event, 1, 0);
|
||||
if (s_editMode == 0 || event == EVT_KEY_BREAK(KEY_EXIT)) {
|
||||
storageRenameCategory(currentCategory, selectedCategory);
|
||||
selectMode = MODE_SELECT_CATEGORY;
|
||||
putEvent(EVT_REFRESH);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (currentCategory == index) {
|
||||
memcpy(selectedCategory, line, sizeof(selectedCategory));
|
||||
}
|
||||
drawCategory(y, line, currentCategory==index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
y += FH;
|
||||
index++;
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ int8_t switchMenuItem(coord_t x, coord_t y, int8_t value, LcdFlags attr, evt_t e
|
|||
#define displayGVar(x, y, v, min, max) lcdDrawNumber(x, y, v)
|
||||
#endif
|
||||
|
||||
void editName(coord_t x, coord_t y, char *name, uint8_t size, evt_t event, uint8_t active);
|
||||
void editName(coord_t x, coord_t y, char *name, uint8_t size, evt_t event, uint8_t active, LcdFlags flags=ZCHAR);
|
||||
|
||||
#define WARNING_TYPE_ASTERISK 0
|
||||
#define WARNING_TYPE_CONFIRM 1
|
||||
|
@ -318,6 +318,6 @@ void pushModelNotes();
|
|||
#define EDIT_MODE_INIT 0 // TODO enum
|
||||
|
||||
typedef int (*FnFuncP) (int x);
|
||||
void DrawFunction(FnFuncP fn, int offset=0);
|
||||
void drawFunction(FnFuncP fn, int offset=0);
|
||||
|
||||
#endif // _MENUS_H_
|
||||
|
|
|
@ -65,7 +65,7 @@ point_t getPoint(uint8_t i)
|
|||
|
||||
void DrawCurve(uint8_t offset=0)
|
||||
{
|
||||
DrawFunction(curveFn, offset);
|
||||
drawFunction(curveFn, offset);
|
||||
|
||||
uint8_t i = 0;
|
||||
do {
|
||||
|
|
|
@ -81,7 +81,7 @@ int16_t expoFn(int16_t x)
|
|||
return anas[ed->chn];
|
||||
}
|
||||
|
||||
void DrawFunction(FnFuncP fn, uint8_t offset)
|
||||
void drawFunction(FnFuncP fn, uint8_t offset)
|
||||
{
|
||||
lcdDrawVerticalLine(X0-offset, 0/*TODO Y0-WCHART*/, WCHART*2, 0xee);
|
||||
lcdDrawHorizontalLine(X0-WCHART-offset, Y0, WCHART*2, 0xee);
|
||||
|
@ -396,7 +396,7 @@ void menuModelExpoOne(uint8_t event)
|
|||
y += FH;
|
||||
}
|
||||
|
||||
DrawFunction(expoFn);
|
||||
drawFunction(expoFn);
|
||||
|
||||
int x512 = getValue(ed->srcRaw);
|
||||
if (ed->srcRaw >= MIXSRC_FIRST_TELEM) {
|
||||
|
|
|
@ -356,6 +356,6 @@ void menuChannelsView(uint8_t event);
|
|||
#define EDIT_MODE_INIT 0 // TODO enum
|
||||
|
||||
typedef int16_t (*FnFuncP) (int16_t x);
|
||||
void DrawFunction(FnFuncP fn, uint8_t offset=0);
|
||||
void drawFunction(FnFuncP fn, uint8_t offset=0);
|
||||
|
||||
#endif // _MENUS_H_
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "opentx.h"
|
||||
#include "stamp-opentx.h"
|
||||
#include "stamp.h"
|
||||
#include "lua/lua_api.h"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
|
@ -108,7 +108,7 @@ Script finished with status 1
|
|||
*/
|
||||
static int luaGetVersion(lua_State *L)
|
||||
{
|
||||
lua_pushstring(L, VERS_STR);
|
||||
lua_pushstring(L, VERSION);
|
||||
lua_pushstring(L, RADIO_VERSION);
|
||||
return 2;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
#include "stamp-opentx.h"
|
||||
#include "stamp.h"
|
||||
|
||||
#define STR2(s) #s
|
||||
#define DEFNUMSTR(s) STR2(s)
|
||||
|
@ -53,10 +53,10 @@
|
|||
#endif
|
||||
|
||||
#if defined(COLORLCD)
|
||||
const pm_char vers_stamp[] PROGMEM = "VERS" TAB ": " "opentx-" FLAVOUR "-" VERS_STR;
|
||||
const pm_char date_stamp[] PROGMEM = "DATE" TAB ": " DATE_STR;
|
||||
const pm_char time_stamp[] PROGMEM = "TIME" TAB ": " TIME_STR;
|
||||
const pm_char vers_stamp[] PROGMEM = "VERS" TAB ": " "opentx-" FLAVOUR "-" VERSION;
|
||||
const pm_char date_stamp[] PROGMEM = "DATE" TAB ": " DATE;
|
||||
const pm_char time_stamp[] PROGMEM = "TIME" TAB ": " TIME;
|
||||
const pm_char eeprom_stamp[] PROGMEM = "EEPR" TAB ": " EEPROM_STR;
|
||||
#else
|
||||
const pm_char vers_stamp[] PROGMEM = "FW\037\033: " "opentx-" FLAVOUR "\036VERS\037\033: " VERS_STR "\036DATE\037\033: " DATE_STR"\036TIME\037\033: " TIME_STR "\036EEPR\037\033: " EEPROM_STR;
|
||||
const pm_char vers_stamp[] PROGMEM = "FW\037\033: " "opentx-" FLAVOUR "\036VERS\037\033: " VERSION "\036DATE\037\033: " DATE "\036TIME\037\033: " TIME "\036EEPR\037\033: " EEPROM_STR;
|
||||
#endif
|
||||
|
|
3
radio/src/stamp.h.in
Normal file
3
radio/src/stamp.h.in
Normal file
|
@ -0,0 +1,3 @@
|
|||
#define DATE "@DATE@"
|
||||
#define TIME "@TIME@"
|
||||
#define VERSION "@VERSION@"
|
|
@ -326,11 +326,16 @@ bool storageReadNextModel(StorageModelsList * storage, char * line, int maxlen)
|
|||
return false;
|
||||
}
|
||||
|
||||
#define STORAGE_INSERT 1
|
||||
#define STORAGE_REMOVE 2
|
||||
#define STORAGE_RENAME 3
|
||||
enum StorageOperation {
|
||||
STORAGE_INSERT_MODEL,
|
||||
STORAGE_REMOVE_MODEL,
|
||||
STORAGE_RENAME_MODEL,
|
||||
STORAGE_INSERT_CATEGORY,
|
||||
STORAGE_RENAME_CATEGORY,
|
||||
STORAGE_REMOVE_CATEGORY
|
||||
};
|
||||
|
||||
const char * storageModifyModel(unsigned int operation, int category, int position, const char * name="")
|
||||
const char * storageModifyLine(unsigned int operation, int category, int position, const char * name="")
|
||||
{
|
||||
StorageModelsList storage;
|
||||
FIL file;
|
||||
|
@ -357,27 +362,42 @@ const char * storageModifyModel(unsigned int operation, int category, int positi
|
|||
if (!operationdone) {
|
||||
int len = storageGetCategoryLength(line);
|
||||
if (len > 0) {
|
||||
if (categoryindex++ == category) {
|
||||
operationdone = true;
|
||||
if (operation == STORAGE_INSERT) {
|
||||
if (category >= 0) {
|
||||
if (categoryindex == category && operation == STORAGE_INSERT_MODEL) {
|
||||
f_puts(name, &file);
|
||||
f_putc('\n', &file);
|
||||
operationdone = true;
|
||||
}
|
||||
categoryindex++;
|
||||
if (categoryindex == category) {
|
||||
if (operation == STORAGE_RENAME_CATEGORY) {
|
||||
f_puts("[", &file);
|
||||
f_puts(name, &file);
|
||||
f_puts("]", &file);
|
||||
f_putc('\n', &file);
|
||||
operationdone = true;
|
||||
continue;
|
||||
}
|
||||
else if (operation == STORAGE_REMOVE_CATEGORY) {
|
||||
operationdone = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (categoryindex == category) {
|
||||
if (modelindex++ == position) {
|
||||
operationdone = true;
|
||||
if (operation == STORAGE_INSERT) {
|
||||
if (operation == STORAGE_INSERT_MODEL) {
|
||||
f_puts(name, &file);
|
||||
f_putc('\n', &file);
|
||||
}
|
||||
else if (operation == STORAGE_RENAME) {
|
||||
else if (operation == STORAGE_RENAME_MODEL) {
|
||||
f_puts(name, &file);
|
||||
f_putc('\n', &file);
|
||||
continue;
|
||||
}
|
||||
else if (operation == STORAGE_REMOVE) {
|
||||
else if (operation == STORAGE_REMOVE_MODEL) {
|
||||
TRACE("skip %s", line);
|
||||
continue;
|
||||
}
|
||||
|
@ -388,10 +408,20 @@ const char * storageModifyModel(unsigned int operation, int category, int positi
|
|||
f_putc('\n', &file);
|
||||
}
|
||||
|
||||
if (!operationdone && categoryindex>=0 && operation==STORAGE_INSERT) {
|
||||
if (!operationdone) {
|
||||
if (categoryindex>=0 && operation==STORAGE_INSERT_MODEL) {
|
||||
f_puts(name, &file);
|
||||
f_putc('\n', &file);
|
||||
}
|
||||
else if (operation==STORAGE_INSERT_CATEGORY) {
|
||||
f_puts("[", &file);
|
||||
f_puts(name, &file);
|
||||
f_puts("]", &file);
|
||||
f_putc('\n', &file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
f_close(&file);
|
||||
f_unlink(RADIO_PATH "/models.old");
|
||||
|
@ -400,17 +430,32 @@ const char * storageModifyModel(unsigned int operation, int category, int positi
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const char * storageAppendCategory(const char * name)
|
||||
{
|
||||
return storageModifyLine(STORAGE_INSERT_CATEGORY, -1, -1, name);
|
||||
}
|
||||
|
||||
const char * storageRenameCategory(int category, const char * name)
|
||||
{
|
||||
return storageModifyLine(STORAGE_RENAME_CATEGORY, category, -1, name);
|
||||
}
|
||||
|
||||
const char * storageRemoveCategory(int category)
|
||||
{
|
||||
return storageModifyLine(STORAGE_REMOVE_CATEGORY, category, -1);
|
||||
}
|
||||
|
||||
const char * storageInsertModel(const char * name, int category, int position)
|
||||
{
|
||||
return storageModifyModel(STORAGE_INSERT, category, position, name);
|
||||
return storageModifyLine(STORAGE_INSERT_MODEL, category, position, name);
|
||||
}
|
||||
|
||||
const char * storageRemoveModel(int category, int position)
|
||||
{
|
||||
return storageModifyModel(STORAGE_REMOVE, category, position);
|
||||
return storageModifyLine(STORAGE_REMOVE_MODEL, category, position);
|
||||
}
|
||||
|
||||
const char * storageRenameModel(const char * name, int category, int position)
|
||||
{
|
||||
return storageModifyModel(STORAGE_RENAME, category, position, name);
|
||||
return storageModifyLine(STORAGE_RENAME_MODEL, category, position, name);
|
||||
}
|
||||
|
|
|
@ -298,11 +298,6 @@ void LCD_LayerInit()
|
|||
LTDC_DitherCmd(ENABLE);
|
||||
}
|
||||
|
||||
static inline long divRoundClosest(const long n, const long d)
|
||||
{
|
||||
return ((n < 0) ^ (d < 0)) ? ((n - d/2)/d) : ((n + d/2)/d);
|
||||
}
|
||||
|
||||
void LCD_ControlLight(uint16_t dutyCycle)
|
||||
{
|
||||
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
|
||||
|
|
4
radio/src/thirdparty/Lua/src/lundump.c
vendored
4
radio/src/thirdparty/Lua/src/lundump.c
vendored
|
@ -233,7 +233,7 @@ Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name)
|
|||
}
|
||||
|
||||
#define MYINT(s) (s[0]-'0')
|
||||
#define VERSION MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)
|
||||
#define VERSION_INT MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)
|
||||
#define FORMAT 0 /* this is the official format */
|
||||
|
||||
/*
|
||||
|
@ -246,7 +246,7 @@ void luaU_header (lu_byte* h)
|
|||
int x=1;
|
||||
memcpy(h,LUA_SIGNATURE,sizeof(LUA_SIGNATURE)-sizeof(char));
|
||||
h+=sizeof(LUA_SIGNATURE)-sizeof(char);
|
||||
*h++=cast_byte(VERSION);
|
||||
*h++=cast_byte(VERSION_INT);
|
||||
*h++=cast_byte(FORMAT);
|
||||
*h++=cast_byte(*(char*)&x); /* endianness */
|
||||
*h++=cast_byte(sizeof(int));
|
||||
|
|
|
@ -424,6 +424,9 @@ const pm_char STR_PERSISTENT_MAH[] PROGMEM = TR_PERSISTENT_MAH;
|
|||
|
||||
#if defined(NAVIGATION_MENUS)
|
||||
const pm_char STR_SELECT_MODEL[] PROGMEM = TR_SELECT_MODEL;
|
||||
const pm_char STR_CREATE_CATEGORY[] PROGMEM = TR_CREATE_CATEGORY;
|
||||
const pm_char STR_RENAME_CATEGORY[] PROGMEM = TR_RENAME_CATEGORY;
|
||||
const pm_char STR_DELETE_CATEGORY[] PROGMEM = TR_DELETE_CATEGORY;
|
||||
const pm_char STR_CREATE_MODEL[] PROGMEM = TR_CREATE_MODEL;
|
||||
const pm_char STR_DUPLICATE_MODEL[] PROGMEM = TR_DUPLICATE_MODEL;
|
||||
const pm_char STR_COPY_MODEL[] PROGMEM = TR_COPY_MODEL;
|
||||
|
|
|
@ -597,6 +597,9 @@ extern const pm_char STR_CURRENT[];
|
|||
|
||||
#if defined(NAVIGATION_MENUS)
|
||||
extern const pm_char STR_SELECT_MODEL[];
|
||||
extern const pm_char STR_CREATE_CATEGORY[];
|
||||
extern const pm_char STR_RENAME_CATEGORY[];
|
||||
extern const pm_char STR_DELETE_CATEGORY[];
|
||||
extern const pm_char STR_CREATE_MODEL[];
|
||||
extern const pm_char STR_DUPLICATE_MODEL[];
|
||||
extern const pm_char STR_COPY_MODEL[];
|
||||
|
|
|
@ -805,6 +805,9 @@
|
|||
#define TR_VOLTAGE INDENT"Napětí"
|
||||
#define TR_CURRENT INDENT"Proud"
|
||||
#define TR_SELECT_MODEL "Vyber model"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Nový model"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Kopírovat"
|
||||
|
|
|
@ -809,6 +809,9 @@
|
|||
#define TR_VOLTAGE TR(INDENT "Spg", INDENT "Spannungsquelle") //9XR-Pro
|
||||
#define TR_CURRENT TR(INDENT "Strom", INDENT "Stromquelle")
|
||||
#define TR_SELECT_MODEL "Modell Wählen"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Neues Modell"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Kopiere Modell"
|
||||
|
|
|
@ -828,6 +828,9 @@
|
|||
#define TR_VOLTAGE TR(INDENT "Voltage",INDENT "Voltage Source")
|
||||
#define TR_CURRENT TR(INDENT "Current",INDENT "Current Source")
|
||||
#define TR_SELECT_MODEL "Select Model"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Create Model"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Copy Model"
|
||||
|
|
|
@ -759,6 +759,9 @@
|
|||
#define TR_VOLTAGE INDENT"Voltaje"
|
||||
#define TR_CURRENT INDENT"Actual"
|
||||
#define TR_SELECT_MODEL "Selec Modelo"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Crear Modelo"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Copiar Modelo"
|
||||
|
|
|
@ -759,6 +759,9 @@
|
|||
#define TR_VOLTAGE INDENT"Voltage"
|
||||
#define TR_CURRENT INDENT"Current"
|
||||
#define TR_SELECT_MODEL "Select Model"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Create Model"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Copy Model"
|
||||
|
|
|
@ -796,6 +796,9 @@
|
|||
#define TR_VOLTAGE TR(INDENT "Tension",INDENT "Source Tension")
|
||||
#define TR_CURRENT TR(INDENT "Courant",INDENT "Source Courant")
|
||||
#define TR_SELECT_MODEL "Sélect. Modèle"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Créer Modèle"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Copier Modèle"
|
||||
|
|
|
@ -807,6 +807,9 @@
|
|||
#define TR_VOLTAGE TR(INDENT "Voltagg.",INDENT "Voltaggio")
|
||||
#define TR_CURRENT TR(INDENT "Corrente",INDENT "Corrente")
|
||||
#define TR_SELECT_MODEL "Scegli Memo."
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Crea Modello"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Copia Modello"
|
||||
|
|
|
@ -826,6 +826,9 @@
|
|||
#define TR_VOLTAGE TR(INDENT "Spg", INDENT "Spanningsbron") //9XR-Pro
|
||||
#define TR_CURRENT TR(INDENT "Stroom", INDENT "Stroombron")
|
||||
#define TR_SELECT_MODEL "Kies Model"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Nieuw Model"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Kopieer Model"
|
||||
|
|
|
@ -808,6 +808,9 @@
|
|||
#define TR_VOLTAGE TR (INDENT"Napięcie",INDENT"Źródło Napięcia")
|
||||
#define TR_CURRENT TR (INDENT"Prąd",INDENT"Źródło Prądu")
|
||||
#define TR_SELECT_MODEL "Wybór modelu"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Nowy model"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Skopiuj model"
|
||||
|
|
|
@ -759,6 +759,9 @@
|
|||
#define TR_VOLTAGE INDENT"Volts"
|
||||
#define TR_CURRENT INDENT"Amperes"
|
||||
#define TR_SELECT_MODEL "Selec. Modelo"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Criar Modelo"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Copy Model"
|
||||
|
|
|
@ -759,6 +759,9 @@
|
|||
#define TR_VOLTAGE INDENT"Volt"
|
||||
#define TR_CURRENT INDENT"Ampere"
|
||||
#define TR_SELECT_MODEL "Välj Modell"
|
||||
#define TR_CREATE_CATEGORY "Create Category"
|
||||
#define TR_RENAME_CATEGORY "Rename Category"
|
||||
#define TR_DELETE_CATEGORY "Delete Category"
|
||||
#define TR_CREATE_MODEL "Skapa Modell"
|
||||
#define TR_DUPLICATE_MODEL "Duplicate Model"
|
||||
#define TR_COPY_MODEL "Kopiera Modell"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue