Jump to content

Recommended Posts

Posted (edited)

Currently trying to get my rotary encoder to work with the Harrier, specifically the UFC radio channel encoder.

It works in the sim, but it jumps four channels every time I turn it going from M to 4 to 8 etc.

Wondering if it's an issue with the code or maybe the encoder itself.

Here's the code:

/*
  Tell DCS-BIOS to use a serial connection and use interrupt-driven
  communication. The main program will be interrupted to prioritize
  processing incoming data.
 
  This should work on any Arduino that has an ATMega328 controller
  (Uno, Pro Mini, many others).
 */
#define DCSBIOS_IRQ_SERIAL

#include "DcsBios.h"

DcsBios::RotaryEncoder ufcCom1Sel("UFC_COM1_SEL", "-3200", "+3200", 4, 7);
/* paste code snippets from the reference documentation here */

void setup() {
  DcsBios::setup();
}

void loop() {
  DcsBios::loop();
}

 

Edited by Corvidae
Posted
10 hours ago, outbaxx said:

Can’t remember exactly but try to change the 3200 value to something smaller, 1600 and see what happens.

I've tried that, no luck sadly 😕

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...