Git Product home page Git Product logo

Comments (5)

charliefoxtwo avatar charliefoxtwo commented on August 18, 2024 1

I mean bios appears to be behaving properly. When the lever is moved to the maximum value via bort or any other test tool or command, it does not reset to minimum.

There may be a bug in the arduino library calling bios - I don't know, I don't do any arduino development with bios - so I've moved the issue to that repository so those who are more familiar with this code can evaluate the issue you're experiencing.

from dcs-bios-arduino-library.

psjshep avatar psjshep commented on August 18, 2024

for video of the issue, see
https://discord.com/channels/533342958712258572/778893826080374795/1240061403885469716

from dcs-bios-arduino-library.

psjshep avatar psjshep commented on August 18, 2024

I am not a C++ programmer, but the following snippets seem to work for me to constrain the values within input_min & input_max :

in Potentiometers.h

....
			void pollInput() {
				unsigned int state; 
				if (reverse_)
					// psjshep
//					state = map(analogRead(pin_), input_min_, input_max_, 65535, 0);
					state = map(constrain(analogRead(pin_),input_min_,input_max_), input_min_, input_max_, 65535, 0);
				else
					// psjshep
//					state = map(analogRead(pin_), input_min_, input_max_, 0, 65535);
					state = map(constrain(analogRead(pin_),input_min_,input_max_), input_min_, input_max_, 0, 65535);
...


There is similar logic below in the public declaration so I suppose a similar change would be needed there?


from dcs-bios-arduino-library.

charliefoxtwo avatar charliefoxtwo commented on August 18, 2024

Tested with bort and appears to behave as expected. Moving this to the arduino repo

from dcs-bios-arduino-library.

psjshep avatar psjshep commented on August 18, 2024

Tested with bort and appears to behave as expected. Moving this to the arduino repo

not sure what you mean by "behave as expected"?

Is the function, when supplied with a min/max, supposed to reset to the minimum when maximum is reached?

Or do you mean the PLT_FLAPS_LEVER call does move the flaps so the call behaves as expected?

from dcs-bios-arduino-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.