refactor(v12/v14/v16): cleaner 6POS RGB LED implementation
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.
specialized driver can make use of this ADC value to trigger function switches press
That is a possibility as well. Feel free to improve.
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
The file 'csd203-sensor.cpp' can also be moved to the 'helloradio' directory ?
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.
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
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.