Can we get Battery laptop indicator in simulink??
2 次查看(过去 30 天)
显示 更早的评论
hi all
i just wanna ask, can we get battery laptop indicator level in simulink??? how???
thanks
0 个评论
采纳的回答
Kaustubha Govind
2011-6-24
There is no direct way to do this, but you could use an API function provided by the operating system and call it from an S-function. For Windows, I found a related answer on a different forum: Monitor battery charge with Win32 API.
2 个评论
Kaustubha Govind
2011-8-1
Luhur: Sorry, missed your comment. I think you might need to hunt down an API function for querying the WiFi signal status also. :)
更多回答(1 个)
Ken Atwell
2011-8-1
Using .NET may be easier than win32:
NET.addAssembly('System.Windows.Forms')
powerStatus = System.Windows.Forms.SystemInformation.PowerStatus
powerStatus.BatteryLifePercent % returns a number between 0 and 1
0 个评论
社区
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!