Jump to content

DCS-BIOS Init State Support Files


Blue73

Recommended Posts

That's great news, glad you got it working!

 

Sorry I don't know how to send a global DCS-BIOS packet to other slaves. You could toggle an indicator light state somewhere (even though it doesn't exist) then look for the event on the other slaves?

Link to comment
Share on other sites

toggling on a light is indirect result of pressing something. Flipping on a toggle which is not functional in the sim would be more direct. But i could not figure out how to do that. I could not do digital read or write on dcs switches. it won't compile. if i declare a pin then do a read that's fine. but I have to use a switch in the sim then it will be global. but couldn't figure out to even read the state of a toggle in the cockpit.

 

All this trouble is because for missions that are not starting cold from the ramp, some of my switches are in the wrong position from the intended mission, and the syn changes the switches in the mission to my physical positions, then immediately the warning light come on. It'd be impossible to figure out what switches to change. Don't you guys who do the sync have the same problem?

 

It seems simple to read an non functional toggle as the flag to sync or not, but i can't figure out how.

Link to comment
Share on other sites

You can send DCS-BIOS messages manually, they don't need to be generated from io functions.

 

When I get home tonight I'll upload code showing how you can achieve what you're after.

 

toggling on a light is indirect result of pressing something. Flipping on a toggle which is not functional in the sim would be more direct. But i could not figure out how to do that. I could not do digital read or write on dcs switches. it won't compile. if i declare a pin then do a read that's fine. but I have to use a switch in the sim then it will be global. but couldn't figure out to even read the state of a toggle in the cockpit.

 

All this trouble is because for missions that are not starting cold from the ramp, some of my switches are in the wrong position from the intended mission, and the syn changes the switches in the mission to my physical positions, then immediately the warning light come on. It'd be impossible to figure out what switches to change. Don't you guys who do the sync have the same problem?

 

It seems simple to read an non functional toggle as the flag to sync or not, but i can't figure out how.

Link to comment
Share on other sites

Hi rocketeer, this code should work, let me know if you have any issues. Note this works with a momentary, it sets up a 10 round button sync operation across all slaves when it senses Arduino Pin D4 going low. It moves the right louver right one position with all other slaves detecting the event.

 

 

Slave Unit With Global Message Trigger

 

#define DCSBIOS_RS485_SLAVE 5
#define TXENABLE_PIN 2
//#define DCSBIOS_IRQ_SERIAL
#include "DcsBios.h"

DcsBios::Switch2Pos fcsBitSw("FCS_BIT_SW", 5);

#define FORCEPOLLCYCLES 10
unsigned int g_iInitIntervalCounter = 0;
unsigned int g_iForcePollCycles = 0;

int g_iTriggerPin = 4;     // the number of the toggle switch pin

void onRightLouverChange(unsigned int newValue) {
   g_iForcePollCycles = FORCEPOLLCYCLES;
  
}
DcsBios::IntegerBuffer rightLouverBuffer(0x54ec, 0xffff, 0, onRightLouverChange);

void setup() {

  pinMode(g_iTriggerPin, INPUT_PULLUP);  // initialize the toggle switch pin as an input

  DcsBios::setup();

}

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

  if (!digitalRead(g_iTriggerPin) && !g_iForcePollCycles)
  {
      DcsBios::tryToSendDcsBiosMessage("RIGHT_LOUVER", "+3200");

      delay(10);
  }
  
  if ( g_iForcePollCycles > 0 )
  { 
       //repeat poll for this many cycles
       if ( ++g_iInitIntervalCounter == 0 ) 
       {  PollAllControls();     //main loop 1->65535->0 then polls
          g_iForcePollCycles--;
       }    
   }      
}

void PollAllControls()
{
   fcsBitSw.pollInputCurrent();
     
}

Other Slave Units

#define DCSBIOS_RS485_SLAVE 20
#define TXENABLE_PIN 2
#include "DcsBios.h"

DcsBios::Switch2Pos lstNflrSw("LST_NFLR_SW", 15);

#define FORCEPOLLCYCLES 10
unsigned int g_iInitIntervalCounter = 0;
unsigned int g_iForcePollCycles = 0;


void onRightLouverChange(unsigned int newValue) {
    g_iForcePollCycles = FORCEPOLLCYCLES;
  
}
DcsBios::IntegerBuffer rightLouverBuffer(0x54ec, 0xffff, 0, onRightLouverChange);

void setup() {

  DcsBios::setup();

}

void loop() {
  
  DcsBios::loop();
    
  if ( g_iForcePollCycles > 0 )
  { 
       //repeat poll for this many cycles
       if ( ++g_iInitIntervalCounter == 0 ) 
       {  PollAllControls();     //main loop 1->65535->0 then polls
          g_iForcePollCycles--;
       }
      
   }
   else
   {
     g_bGlobalMessageSent = false;
   }    
}

void PollAllControls()
{
   lstNflrSw.pollInputCurrent();
    
}

cheers

 

 

John


Edited by Blue73
Link to comment
Share on other sites

John,

I really appreciate your help on this.

 

Your louver seems to be an airflow outlet vent on the F18? That does not seem to be a switch?

 

I am not using the RS485 solution. I have six independent megas. No master and slave setup. Will this still work? That the value of one toggle be made known to the other megas that are not its slave?

Link to comment
Share on other sites

No problems rocketeer, happy to help. The global signal can be derived from anything, POT, Rotary, Toggle, push button, it's just a message. Just as long as it generates an event message that you can listen for.

 

It will work across multiple systems as I have two mega masters with a bunch of slaves that all hear the same event message generated from a single slave.

 

cheers

 

John

 

John,

I really appreciate your help on this.

 

Your louver seems to be an airflow outlet vent on the F18? That does not seem to be a switch?

 

I am not using the RS485 solution. I have six independent megas. No master and slave setup. Will this still work? That the value of one toggle be made known to the other megas that are not its slave?

Link to comment
Share on other sites

John, i'm trying to digest your code.

 

You have 4 players.

 

1. A trigger pin assigned to pin 4

2. fcsBitSw - a circuit breaker. a 2pos sw

 

both connected to slave 5 board?

 

3. RIGHT_LOUVER - a pot?

connected to slave 5 or 20 or somewhere else? does it even matter? since it seems to be the global guy.

 

if trigger pin toggle is flipped, send signal to right louver, the global switch

 

then poll controls

 

clear fcsBitSw poll on slave 5

 

 

On Slave 20

4. lstNflrSw - some toggle on sensor panel?

 

check if right louver value changed

and if so, poll controls for switches this board

 

clear LST_NFLR_SW poll on slave 20

 

Did I understand the logic correctly?

 

 

Questions.

1. onRightLouverChange is anything you made up for a switch state? So I say onAntEGIChange etc?

 

IntegerBuffer rightLouverBuffer(0x54ec, 0xffff, 0, onRightLouverChange);

2. Similarly, rightLouverBuffer is a variable, i can call whateverBuffer?

 

3. then the values inside 0x54ec, 0xffff, 0, are these fixed?

 

4. DcsBios::tryToSendDcsBiosMessage("RIGHT_LOUVER", "+3200");

if this is a pot you do a +3200. what does that mean?

If i check change for a global button or light or toggle then how do i say tryToSendDcsBiosMessage (?,?)

 

i'm amazed how did you know to code all these!

Link to comment
Share on other sites

Hi, My responses are in-line. I'll write some sample code for you, if it helps?

 

 

 

You have 4 players.

 

1. A trigger pin assigned to pin 4

2. fcsBitSw - a circuit breaker. a 2pos sw

 

both connected to slave 5 board?

yes but the circuit breaker has no relevance here, it's just to show a local switch that also reacts to the message.

 

 

3. RIGHT_LOUVER - a pot?

connected to slave 5 or 20 or somewhere else? does it even matter? since it seems to be the global guy.

It's an encoder but can be a pot. It needs to be connected to the Arduino that has your push button that kicks off the sync process. Yes can be anywhere.

 

if trigger pin toggle is flipped, send signal to right louver, the global switch

 

then poll controls

yes this is correct

 

 

clear fcsBitSw poll on slave 5

yes it's sync'd like all other controls then stopped after 10 rounds.

 

On Slave 20

4. lstNflrSw - some toggle on sensor panel?

yes, like fcsBitSw it's just a control that is synced.

 

 

check if right louver value changed

and if so, poll controls for switches this board

yes

 

 

clear LST_NFLR_SW poll on slave 20

yes it clears after 10 rounds of sync.

 

 

Did I understand the logic correctly?

 

 

Questions.

1. onRightLouverChange is anything you made up for a switch state? So I say onAntEGIChange etc?

 

This all comes from the DCS-BIOS documentation, find one that suits, it can be anything really.

 

IntegerBuffer rightLouverBuffer(0x54ec, 0xffff, 0, onRightLouverChange);

2. Similarly, rightLouverBuffer is a variable, i can call whateverBuffer?

Same as one, needs to be derived from the documentation. I'm sure the name is irrelevant it's more the parameters. Just use the one from the reference doco.

 

3. then the values inside 0x54ec, 0xffff, 0, are these fixed?

These need's to be correct for the message generated, again it's from the doco.

 

 

4. DcsBios::tryToSendDcsBiosMessage("RIGHT_LOUVER", "+3200");

if this is a pot you do a +3200. what does that mean? It increments the value by 3200, used by rotary's. Valid values are between 0->65535. It can be anything.

 

 

 

If i check change for a global button or light or toggle then how do i say tryToSendDcsBiosMessage (?,?)

It's the message name that needs to change, the doco will show you what they are.

 

 

i'm amazed how did you know to code all these!

By building a PIT you learn a few things :)


Edited by Blue73
Link to comment
Share on other sites

Wow John, you are like a DCS Bios coach! :thumbup:

How I wish we have this as a course in college! It would be the most fun class and the exercises with dcs bios and arduino boards would be swell.

 

 

I understand now where you got those strange lines of code. This:

void onRightLouverChange(unsigned int newValue) {

/* your code here */

}

DcsBios::IntegerBuffer rightLouverBuffer(0x54ec, 0xffff, 0, onRightLouverChange);

 

is from the advanced view of the Right Louver's Output type. I usually just use the simple view except when declaring multipos switch.

 

Following your example, I looked at non functional toggle switch in the A10C's advanced view I get this for a toggle in the Antenna panel:

void onAntEgihqtodChange(unsigned int newValue) {

g_iForcePollCycles = FORCEPOLLCYCLES;

}

DcsBios::IntegerBuffer antEgihqtodBuffer(0x11bc, 0x0001, 0, onAntEgihqtodChange);

 

The rest of your code I can just copy, except this part.

DcsBios::tryToSendDcsBiosMessage("RIGHT_LOUVER", "+3200");

 

Right Louver you said you have declared it as an encoder. so it's declaration is

DcsBios::RotaryEncoder rightLouver("RIGHT_LOUVER", "-3200", "+3200", PIN_A, PIN_B);

 

when you send dcs bios message you used +3200 for this encoder.

now if I use not an encoder but a toggle, how do i send the dcs bios message?

 

For this switch it has several types of messages.

Input fixed step message.

DcsBios::RotaryEncoder antEgihqtod("ANT_EGIHQTOD", "DEC", "INC", PIN_A, PIN_B);

 

Input set state message.

const byte antEgihqtodPins[2] = {PIN_0, PIN_1};

DcsBios::SwitchMultiPos antEgihqtod("ANT_EGIHQTOD", antEgihqtodPins, 2);

 

Input Action message.

DcsBios::ActionButton antEgihqtodToggle("ANT_EGIHQTOD", "TOGGLE", PIN);

 

Lastly Output type.

void onAntEgihqtodChange(unsigned int newValue) {

/* your code here */

}

DcsBios::IntegerBuffer antEgihqtodBuffer(0x11bc, 0x0001, 0, onAntEgihqtodChange);

 

 

In Simple View it would be just:

DcsBios::Switch2Pos antEgihqtod("ANT_EGIHQTOD", PIN);

 

so send message would be something like this?

DcsBios::tryToSendDcsBiosMessage("ANT_EGIHQTOD", "TOGGLE");

 

I'm assuming we use the action message.

I'm slowly wrapping my head around this :music_whistling:

Link to comment
Share on other sites

I was at University in the mid 90's, the courses available now are allot more interesting. I did have unit on the foundations of CPU architecture, that was fun.

 

Awesome, yes it's all hiding in the advanced view.

 

As a rotary is feeding relative data to the sim, +3200 which is sent as a string and not an integer, would simple add 3200 to the current value. You could send the same dcs command message with an integer and it would simply replace the current value with that integer. I haven't checked but I assume "INC" and "DEC" is the same as sending "+1" and "-1".

 

Yes, I'd send off DcsBios::tryToSendDcsBiosMessage("ANT_EGIHQTOD", "TOGGLE");

 

It's great you're making progress, keep firing any equations you have at me, happy as always to help.

 

cheers

 

John

 

Wow John, you are like a DCS Bios coach! :thumbup:

How I wish we have this as a course in college! It would be the most fun class and the exercises with dcs bios and arduino boards would be swell.

 

 

I understand now where you got those strange lines of code. This:

void onRightLouverChange(unsigned int newValue) {

/* your code here */

}

DcsBios::IntegerBuffer rightLouverBuffer(0x54ec, 0xffff, 0, onRightLouverChange);

 

is from the advanced view of the Right Louver's Output type. I usually just use the simple view except when declaring multipos switch.

 

Following your example, I looked at non functional toggle switch in the A10C's advanced view I get this for a toggle in the Antenna panel:

void onAntEgihqtodChange(unsigned int newValue) {

g_iForcePollCycles = FORCEPOLLCYCLES;

}

DcsBios::IntegerBuffer antEgihqtodBuffer(0x11bc, 0x0001, 0, onAntEgihqtodChange);

 

The rest of your code I can just copy, except this part.

DcsBios::tryToSendDcsBiosMessage("RIGHT_LOUVER", "+3200");

 

Right Louver you said you have declared it as an encoder. so it's declaration is

DcsBios::RotaryEncoder rightLouver("RIGHT_LOUVER", "-3200", "+3200", PIN_A, PIN_B);

 

when you send dcs bios message you used +3200 for this encoder.

now if I use not an encoder but a toggle, how do i send the dcs bios message?

 

For this switch it has several types of messages.

Input fixed step message.

DcsBios::RotaryEncoder antEgihqtod("ANT_EGIHQTOD", "DEC", "INC", PIN_A, PIN_B);

 

Input set state message.

const byte antEgihqtodPins[2] = {PIN_0, PIN_1};

DcsBios::SwitchMultiPos antEgihqtod("ANT_EGIHQTOD", antEgihqtodPins, 2);

 

Input Action message.

DcsBios::ActionButton antEgihqtodToggle("ANT_EGIHQTOD", "TOGGLE", PIN);

 

Lastly Output type.

void onAntEgihqtodChange(unsigned int newValue) {

/* your code here */

}

DcsBios::IntegerBuffer antEgihqtodBuffer(0x11bc, 0x0001, 0, onAntEgihqtodChange);

 

 

In Simple View it would be just:

DcsBios::Switch2Pos antEgihqtod("ANT_EGIHQTOD", PIN);

 

so send message would be something like this?

DcsBios::tryToSendDcsBiosMessage("ANT_EGIHQTOD", "TOGGLE");

 

I'm assuming we use the action message.

I'm slowly wrapping my head around this :music_whistling:

Link to comment
Share on other sites

  • 1 year later...

Hi guys

Can someone please explain how the g_iInitIntervalCounter in the code snippets posted in this thread work?

 

It’s set to 0, then in the if statement it’s ++ and check if it’s 0 and if so run pollcontrol ?

 

I just don’t get what it counts, and why we check if it’s zero?

 

Regards

f

Link to comment
Share on other sites

It's function is to poll the input controls every 65536 loops, i.e. 1->65535->0 then poll all inputs.

 

 

 

Hi guys

Can someone please explain how the g_iInitIntervalCounter in the code snippets posted in this thread work?

 

It’s set to 0, then in the if statement it’s ++ and check if it’s 0 and if so run pollcontrol ?

 

I just don’t get what it counts, and why we check if it’s zero?

 

Regards

f

Link to comment
Share on other sites

  • 3 years later...

Hi all, I am finally getting round to trying to incorporate polling, however I am getting errors - so many errors actually that I haven't a clue where to start!

This is the code for my trial SAS panel

 

#define DCSBIOS_DEFAULT_SERIAL

#include <Wire.h>
#include <DcsBios.h>


DcsBios::Switch2Pos saspToTrim("SASP_TO_TRIM", 13);

DcsBios::LED takeOffTrim(0x1026, 0x0400, 11);

DcsBios::Potentiometer saspYawTrim("SASP_YAW_TRIM", 14);

DcsBios::Switch2Pos saspPitchSasL("SASP_PITCH_SAS_L", 9);

DcsBios::Switch2Pos saspPitchSasR("SASP_PITCH_SAS_R", 12);

DcsBios::Switch2Pos saspYawSasL("SASP_YAW_SAS_L", 5);

DcsBios::Switch2Pos saspYawSasR("SASP_YAW_SAS_R", 8);

DcsBios::Switch3Pos saspMonitorTest("SASP_MONITOR_TEST", 3, 6);

unsigned int g_iInitIntervalCounter = 0;

void setup() {



  DcsBios::setup();
  
}

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

  if ( ++g_iInitIntervalCounter == 0 ) 
   {  
        PollAllControls(); 
   }

}

void PollAllControls()
{

saspYawTrim.pollInputCurrent();
saspPitchSasL.pollInputCurrent();
saspPitchSasR.pollInputCurrent();
saspYawSasL.pollInputCurrent();
saspYawSasR.pollInputCurrent();
saspMonitorTest.pollInputCurrent();
     

}

I have copied the Potentiometers.h and switches.h files into the library, however when I try to compile this is what I get

 

In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:120:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Switches.h: In constructor 'DcsBios::Switch2Pos::Switch2Pos(const char*, char, bool)':
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Switches.h:34:64: error: no matching function for call to 'DcsBios::PollingInput::PollingInput()'
    Switch2Pos(const char* msg, char pin, bool reverse = false) { init_(msg, pin, reverse); }
                                                                ^
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:15:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:23:4: note: candidate: DcsBios::PollingInput::PollingInput(long unsigned int)
    PollingInput(unsigned long pollIntervalMs) {
    ^~~~~~~~~~~~
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:23:4: note:   candidate expects 1 argument, 0 provided
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note: candidate: constexpr DcsBios::PollingInput::PollingInput(const DcsBios::PollingInput&)
  class PollingInput {
        ^~~~~~~~~~~~
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note:   candidate expects 1 argument, 0 provided
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note: candidate: constexpr DcsBios::PollingInput::PollingInput(DcsBios::PollingInput&&)
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note:   candidate expects 1 argument, 0 provided
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:120:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Switches.h: In constructor 'DcsBios::Switch3Pos::Switch3Pos(const char*, char, char)':
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Switches.h:79:54: error: no matching function for call to 'DcsBios::PollingInput::PollingInput()'
    Switch3Pos(const char* msg, char pinA, char pinB) {
                                                      ^
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:15:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:23:4: note: candidate: DcsBios::PollingInput::PollingInput(long unsigned int)
    PollingInput(unsigned long pollIntervalMs) {
    ^~~~~~~~~~~~
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:23:4: note:   candidate expects 1 argument, 0 provided
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note: candidate: constexpr DcsBios::PollingInput::PollingInput(const DcsBios::PollingInput&)
  class PollingInput {
        ^~~~~~~~~~~~
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note:   candidate expects 1 argument, 0 provided
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note: candidate: constexpr DcsBios::PollingInput::PollingInput(DcsBios::PollingInput&&)
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note:   candidate expects 1 argument, 0 provided
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:120:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Switches.h: In constructor 'DcsBios::SwitchMultiPos::SwitchMultiPos(const char*, const byte*, char, bool)':
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Switches.h:136:109: error: no matching function for call to 'DcsBios::PollingInput::PollingInput()'
    SwitchMultiPos(const char* msg, const byte* pins, char numberOfPins, bool reverse = false) : lastState_(0) {
                                                                                                             ^
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:15:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:23:4: note: candidate: DcsBios::PollingInput::PollingInput(long unsigned int)
    PollingInput(unsigned long pollIntervalMs) {
    ^~~~~~~~~~~~
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:23:4: note:   candidate expects 1 argument, 0 provided
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note: candidate: constexpr DcsBios::PollingInput::PollingInput(const DcsBios::PollingInput&)
  class PollingInput {
        ^~~~~~~~~~~~
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note:   candidate expects 1 argument, 0 provided
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note: candidate: constexpr DcsBios::PollingInput::PollingInput(DcsBios::PollingInput&&)
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note:   candidate expects 1 argument, 0 provided
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino: At global scope:
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:7:21: error: cannot declare variable 'saspToTrim' to be of abstract type 'DcsBios::Switch2Pos'
 DcsBios::Switch2Pos saspToTrim("SASP_TO_TRIM", 13);
                     ^~~~~~~~~~
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:120:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Switches.h:9:8: note:   because the following virtual functions are pure within 'DcsBios::Switch2Pos':
  class Switch2Pos : PollingInput {
        ^~~~~~~~~~
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:15:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:14:17: note: 	virtual void DcsBios::PollingInput::resetState()
    virtual void resetState() = 0;
                 ^~~~~~~~~~
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:11:24: error: cannot declare variable 'saspYawTrim' to be of abstract type 'DcsBios::PotentiometerEWMA<>'
 DcsBios::Potentiometer saspYawTrim("SASP_YAW_TRIM", 14);
                        ^~~~~~~~~~~
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:123:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Potentiometers.h:11:8: note:   because the following virtual functions are pure within 'DcsBios::PotentiometerEWMA<>':
  class PotentiometerEWMA : PollingInput {
        ^~~~~~~~~~~~~~~~~
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:15:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:14:17: note: 	virtual void DcsBios::PollingInput::resetState()
    virtual void resetState() = 0;
                 ^~~~~~~~~~
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:13:21: error: cannot declare variable 'saspPitchSasL' to be of abstract type 'DcsBios::Switch2Pos'
 DcsBios::Switch2Pos saspPitchSasL("SASP_PITCH_SAS_L", 9);
                     ^~~~~~~~~~~~~
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:15:21: error: cannot declare variable 'saspPitchSasR' to be of abstract type 'DcsBios::Switch2Pos'
 DcsBios::Switch2Pos saspPitchSasR("SASP_PITCH_SAS_R", 12);
                     ^~~~~~~~~~~~~
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:17:21: error: cannot declare variable 'saspYawSasL' to be of abstract type 'DcsBios::Switch2Pos'
 DcsBios::Switch2Pos saspYawSasL("SASP_YAW_SAS_L", 5);
                     ^~~~~~~~~~~
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:19:21: error: cannot declare variable 'saspYawSasR' to be of abstract type 'DcsBios::Switch2Pos'
 DcsBios::Switch2Pos saspYawSasR("SASP_YAW_SAS_R", 8);
                     ^~~~~~~~~~~
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:21:21: error: cannot declare variable 'saspMonitorTest' to be of abstract type 'DcsBios::Switch3Pos'
 DcsBios::Switch3Pos saspMonitorTest("SASP_MONITOR_TEST", 3, 6);
                     ^~~~~~~~~~~~~~~
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:120:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Switches.h:53:8: note:   because the following virtual functions are pure within 'DcsBios::Switch3Pos':
  class Switch3Pos : PollingInput {
        ^~~~~~~~~~
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:15:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:14:17: note: 	virtual void DcsBios::PollingInput::resetState()
    virtual void resetState() = 0;
                 ^~~~~~~~~~
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:123:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Potentiometers.h: In instantiation of 'DcsBios::PotentiometerEWMA<pollInterval, hysteresis, ewma_divisor>::PotentiometerEWMA(const char*, char) [with unsigned int pollInterval = 5; unsigned int hysteresis = 128; unsigned int ewma_divisor = 5]':
F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:11:55:   required from here
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/Potentiometers.h:40:49: error: no matching function for call to 'DcsBios::PollingInput::PollingInput()'
    PotentiometerEWMA(const char* msg, char pin) {
                                                 ^
In file included from f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/DcsBios.h:15:0,
                 from F:\Users\LES\Documents\Arduino\SAS_panel_final_with_polling\SAS_panel_final_with_polling.ino:4:
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:23:4: note: candidate: DcsBios::PollingInput::PollingInput(long unsigned int)
    PollingInput(unsigned long pollIntervalMs) {
    ^~~~~~~~~~~~
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:23:4: note:   candidate expects 1 argument, 0 provided
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note: candidate: constexpr DcsBios::PollingInput::PollingInput(const DcsBios::PollingInput&)
  class PollingInput {
        ^~~~~~~~~~~~
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note:   candidate expects 1 argument, 0 provided
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note: candidate: constexpr DcsBios::PollingInput::PollingInput(DcsBios::PollingInput&&)
f:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork\src/internal/PollingInput.h:12:8: note:   candidate expects 1 argument, 0 provided
Multiple libraries were found for "DcsBios.h"
  Used: F:\Users\LES\Documents\Arduino\libraries\DCS-BIOS_FP-Fork
  Not used: F:\Users\LES\Documents\Arduino\libraries\DCS-BIOS
Multiple libraries were found for "Servo.h"
  Used: F:\Users\LES\Documents\Arduino\libraries\Servo
  Not used: C:\Users\LES\AppData\Local\Arduino15\libraries\Servo
exit status 1

Compilation error: cannot declare variable 'saspToTrim' to be of abstract type 'DcsBios::Switch2Pos'

Am I using the polling with the wrong type of switches? Should be 3 position instead of 2? That wouldn't explain it failing with the potentiometer of course

Cheers

Les


Edited by lesthegrngo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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