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