Skip to content

Commit

Permalink
Adjust joystick mixer period rate to match usb update rate, added afh…
Browse files Browse the repository at this point in the history
…ds2a period define
  • Loading branch information
ajjjjjjjj committed Nov 30, 2024
1 parent 76c6c4a commit d97ed48
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion radio/src/mixer_scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <stdint.h>

#define MIXER_SCHEDULER_DEFAULT_PERIOD_US 4000u // 4ms
#define MIXER_SCHEDULER_JOYSTICK_PERIOD_US 2000u // 2ms
#define MIXER_SCHEDULER_JOYSTICK_PERIOD_US 4000u // 4ms

#define MIN_REFRESH_RATE 850 /* us */
#define MAX_REFRESH_RATE 50000 /* us */
Expand Down
2 changes: 1 addition & 1 deletion radio/src/pulses/pulses_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ bool setupPulses(uint8_t port) {
break;
case PROTOCOL_CHANNELS_AFHDS2A_SPI:
init_afhds2a(port);
mixerSchedulerSetPeriod(INTERNAL_MODULE, 3850);
mixerSchedulerSetPeriod(INTERNAL_MODULE, AFHDS2A_PERIOD);
break;
default:
init_no_pulses(port);
Expand Down
2 changes: 2 additions & 0 deletions radio/src/targets/flysky/iface_a7105.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#define AFHDS2A_TELEM_MIRROR_BAUDRATE 115200

#define AFHDS2A_PERIOD 3850

//#define FORCE_AFHDS2A_TUNING 0
enum A7105_POWER
{
Expand Down

0 comments on commit d97ed48

Please sign in to comment.