** Function name: getBattery() ** location: display.cpp ** Description: Delivers the battery value from 1-100 ***************************************************************************************/
| 16 | ** Description: Delivers the battery value from 1-100 |
| 17 | ***************************************************************************************/ |
| 18 | int getBattery() { |
| 19 | int percent; |
| 20 | percent = M5.Power.getBatteryLevel(); |
| 21 | return (percent < 0) ? 0 : (percent >= 100) ? 100 : percent; |
| 22 | } |
| 23 | |
| 24 | /********************************************************************* |
| 25 | ** Function: setBrightness |
nothing calls this directly
no outgoing calls
no test coverage detected