Quote:
|
Originally Posted by DavidSJohnson
I read where battery level could be obtained using a define within ifi_aliases.h, but that header is not available within EasyC. Is there some way of getting battery level (and maybe backup battery level too) from within EasyC?
|
There are two functions recently added to WPILib (the runtime system for EasyC). These functions read the main and backup battery in 1/100ths of volt. The functions are:
unsigned GetBackupBattery(void) and
unsigned GetMainBattery(void)
You need to replace the copy of WPILib to get access to the functions. You also need to add the include file, "BuiltIns.h". The procedure is described
elsewhere on this forum. Once you do that, then you can call these functions using User Code blocks.