edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

refactor(v12/v14/v16): cleaner 6POS RGB LED implementation

Open raphaelcoeffic opened this issue 8 months ago • 7 comments

raphaelcoeffic avatar Apr 28 '25 07:04 raphaelcoeffic

I am thinking the 6pos of v12/v14/v16 should be mapped to function switches instead.

I have added an ADC RAW type when I worked out nb4p, in which this ADC type will be kept hidden for other purposes. And specialized driver can make use of this ADC value to trigger function switches press.

richardclli avatar Apr 28 '25 08:04 richardclli

specialized driver can make use of this ADC value to trigger function switches press

That is a possibility as well. Feel free to improve.

raphaelcoeffic avatar Apr 28 '25 08:04 raphaelcoeffic

specialized driver can make use of this ADC value to trigger function switches press

That is a possibility as well. Feel free to improve.

I still need to gradually understand this application method

helloradiosky avatar Apr 28 '25 10:04 helloradiosky

The file 'csd203-sensor.cpp' can also be moved to the 'helloradio' directory ?

helloradiosky avatar Apr 28 '25 11:04 helloradiosky

With this, the 6POS leds are working, but the pos is not persistent anymore. If i understood correctly, the analog value is always -100 if no button is pressed which seems to be the reason for the previously used "special logic" :-)

Raw Values:

  • Button1 pressed = 524
  • Button2 pressed = 1106
  • Button3 pressed = 1630
  • Button4 pressed = 2436
  • Button5 pressed = 3222
  • Button6 pressed = 3910
  • No Button = 2

Maybe you know all this, but though to report.

gismo2004 avatar Apr 28 '25 13:04 gismo2004

With this, the 6POS leds are working, but the pos is not persistent anymore. If i understood correctly, the analog value is always -100 if no button is pressed which seems to be the reason for the previously used "special logic" :-)

Raw Values:

  • Button1 pressed = 524
  • Button2 pressed = 1106
  • Button3 pressed = 1630
  • Button4 pressed = 2436
  • Button5 pressed = 3222
  • Button6 pressed = 3910
  • No Button = 2

Maybe you know all this, but though to report.

button value1-6=4096/6=682.66*n

helloradiosky avatar Apr 28 '25 14:04 helloradiosky

the analog value is always -100 if no button is pressed which seems to be the reason for the previously used "special logic" :-)

Yeah, @richardclli told me so. In that case some additional logic might be needed. I’ll discuss it with him.

raphaelcoeffic avatar Apr 28 '25 18:04 raphaelcoeffic