Support and General Use > Hardware
H10 5GB hardware buttons not working anymore
stanelie:
You are right.
So, any ideas on how to go about this? Is there a way to have rockbox boot straight into a display of the read value of the scroll strip? That would at least indicate if it thinks it is depressed or not.
saratoga:
--- Quote from: stanelie on April 13, 2011, 11:38:25 AM ---So, any ideas on how to go about this? Is there a way to have rockbox boot straight into a display of the read value of the scroll strip? That would at least indicate if it thinks it is depressed or not.
--- End quote ---
Add a splash screen with the values somewhere in main.c.
stanelie:
I put
splash(HZ*2, str(adc_scan(ADC_SCROLLPAD)));
in main.c
I'm doing it wrong I'm sure, I get a different word printed on screen everytime I boot :
files
bookmark
system...
Kinda fun, but not what I want. I pulled that adc_scan(ADC_SCROLLPAD string from the button-h10.c file. Does the main.c see the button-h10.c stuff?
saratoga:
--- Quote from: stanelie on April 13, 2011, 12:26:49 PM ---I put
splash(HZ*2, str(adc_scan(ADC_SCROLLPAD)));
in main.c
I'm doing it wrong I'm sure, I get a different word printed on screen everytime I boot :
files
bookmark
system...
--- End quote ---
You're printing a random string from a the language file, not the value of adc_scan. splash works just like printf, so try:
splash(HZ*2, "The value of adc_scan is: %x", adc_scan(ADC_SCROLLPAD));
stanelie:
I get :
error: too many arguments to function 'splash'
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version