Skip to content

Commit

Permalink
chores(flysky gimbal): re-adjust center value to 4096 (2^12)
Browse files Browse the repository at this point in the history
This prevents values higher than necessary being displayed.
  • Loading branch information
raphaelcoeffic committed Jul 8, 2023
1 parent ac4629f commit 973d512
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion radio/src/targets/common/arm/stm32/flysky_gimbal_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
#define FLYSKY_HALL_BAUDRATE ( 921600 )
#define FLYSKY_HALL_CHANNEL_COUNT ( 4 )

#define FLYSKY_OFFSET_VALUE ( 16384 )
// This value has been chosen arbitrarily to allow
// for 13-bit precision.
//
// Note: Flysky gimbals use a signed 16-bits value whereby
// our internal ADC value use unsigned 16-bits value
//
#define FLYSKY_OFFSET_VALUE ( 1 << 12 )

#define FLYSKY_HALL_PROTOLO_HEAD 0x55
#define FLYSKY_HALL_RESP_TYPE_VALUES 0x0c
Expand Down

0 comments on commit 973d512

Please sign in to comment.