Faking the battery info in my laptop
How one can fake the battery info in the laptop?
I am working on a tool that must fake the power of the battery in my laptop.
This means that the tool must force the battery or laptop to report low power while its charged well.
Is there any framework or driver that can help me to do this?
Do we have the firmware of the battery to support this functionality?
I really can't find a solution for this problem, any开发者_运维技巧 help is so appreciated.
Thanks in advance.
Note: the programming language does not matter.
Build an application that shows a low battery icon in the System Tray.
You are asking about how to mock/stub something. I would use a mock or stub.
so
new MyFirstPowerMonitor(new AcpiBatteryLevelReader()) - main program
new MyFirstPowerMonitor(new ProgrammableBatteryLevelReader()) - to use something you can control.
thats it really.
精彩评论