Showing Battery Level in TPDesign Files
Frequently Asked Questions
Brand:
- AMX
Models:
- TP Design
Question:
Is it possible to display battery information in TPDesign files for Phones/ Tablets running TPControl?
Answer:
Yes, this is possible.
- In TPdesign, create a panel file of the type “TP Control” with the required resolution for the device.
- Navigate to 'File' > 'Project Properties' > 'Sensors', assign a level port and level code for Battery Levels.
- Create a bargraph, assigning the previously set level port and code values. In the Programming Properties of the bargraph, set “Range Low” to 0, and “Range High” to 100 to present the Battery level in percentage values.
Presentation of this graph could be customized further:
- As a regular 2-colour bargraph.
- As a multistate bargraph to provide additional color values based on the % level such as red to yellow to green for a basic 3 state all the way to 100 distinct states/ color values.
- As text-only, using the regular bargraph with all states transparent fill color and same text color, with the text “$V%” (w/o “”) to get the value of the bargraph shown.
- A combination of the multi-state bargraph and the text “$V%”, to get the changing color and the percentage of the level in one element.