feat: Deadzone option for NV14 sticks (#1777)
Imported from open-flysky/Flysky-OpenTX-Test-Branch * companion: Don't nuke `stickDeadZone` setting * Implement data storage properly * Add missing check for NV14 storage struct sizes * Formatting * Use one less byte in the packed data struct Thanks @raphaelcoeffic :) * Move setting of stickDeadZone default * Use a Choice combo rather than NumberEdit * Good riddance magic number * Also set default stick zone if setting is missing * Teach tests about `STICK_DEAD_ZONE` * Tweak choice width * Cpn NV14 add stick dead zone to hardware and section labels * Cpn NV14 align default pot names to radio Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
co-authored by
elecpower
parent
9d27a6923c
commit
d9b51f8ecf
@@ -1,5 +1,6 @@
|
||||
option(DISK_CACHE "Enable SD card disk cache" ON)
|
||||
option(UNEXPECTED_SHUTDOWN "Enable the Unexpected Shutdown screen" ON)
|
||||
option(STICKS_DEAD_ZONE "Enable sticks dead zone" YES)
|
||||
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" ON)
|
||||
option(AFHDS2 "Support for AFHDS2" ON)
|
||||
option(GHOST "Ghost TX Module" ON)
|
||||
@@ -90,6 +91,10 @@ if(NOT UNEXPECTED_SHUTDOWN)
|
||||
add_definitions(-DNO_UNEXPECTED_SHUTDOWN)
|
||||
endif()
|
||||
|
||||
if(STICKS_DEAD_ZONE)
|
||||
add_definitions(-DSTICK_DEAD_ZONE)
|
||||
endif()
|
||||
|
||||
set(AFHDS2 ON)
|
||||
|
||||
# disable for now as it crashes on radio
|
||||
|
||||
@@ -299,6 +299,8 @@ enum Analogs {
|
||||
#define SLIDER_FIRST 0
|
||||
#define SLIDER_LAST -1
|
||||
|
||||
#define DEFAULT_STICK_DEADZONE 2
|
||||
|
||||
#define DEFAULT_POTS_CONFIG (POT_WITHOUT_DETENT << 0) + (POT_WITHOUT_DETENT << 2) // 2 pots without detent
|
||||
|
||||
enum CalibratedAnalogs {
|
||||
|
||||
Reference in New Issue
Block a user