Switch to full style
Libraries, utilities, bootloaders...
Post a reply

Please: battery monitoring disable flag for dev purposes

Fri Jul 25, 2014 12:39 pm

Rodot:

The battery monitoring system (aka "no battery, please turn off") is a pain when running with usb-power only, because every single program built on gb lib will not function. And, as ENABLE definition for the battery monitoring is only available as a compile time switch, a usb-only user will need to re-compile all the official binaries before they can be used.

The way that the battery monitoring is built (monitors voltage level on ADC6) means that there is NO way to bypass it / fake it on a 28-pin DIP atmega328. I have investigated this thoroughly, and it is so. Pins adc6 and adc7 are "floating" in the 28-pin DIP version and there is nothing that can be done about it.

Could you please come up with a run-time (not compile time) setting to disable the battery monitoring ? I know it will require work, for example an extra entry in the settings page on PROGMEM. But consider the fact that "Gamebuino on breadboard" with 28-pin DIP part is now impossible to get working without having to recompile all programs.

I think this change, if done, would be a good idea to do now when the library is in its early stages.

Re: Please: battery monitoring disable flag for dev purposes

Fri Jul 25, 2014 3:00 pm

You change the battery thresholds in SETTINGS.HEX, it will be saved in the flash memory and applied to every game at run time. Set the critic voltage to a very high value and it should stop saying to turn your Gamebuino off.

Re: Please: battery monitoring disable flag for dev purposes

Fri Jul 25, 2014 7:43 pm

OK. Thanks.

I actually tried something like that, but I must have misunderstood the voltage check loop. I set all voltage reference values to zero but that of course didn't help.

Re: Please: battery monitoring disable flag for dev purposes

Fri Jul 25, 2014 10:35 pm

Mmh, how did you set them?
Post a reply