** Function name: getBattery() ** location: display.cpp ** Description: Delivers the battery value from 1-100+ ***************************************************************************************/
| 56 | ** Description: Delivers the battery value from 1-100+ |
| 57 | ***************************************************************************************/ |
| 58 | int getBattery() { |
| 59 | uint8_t percent = 0; |
| 60 | percent = (PPM.getSystemVoltage() - 3300) * 100 / (float)(4150 - 3350); |
| 61 | |
| 62 | return (percent < 0) ? 0 : (percent >= 100) ? 100 : percent; |
| 63 | } |
| 64 | |
| 65 | /********************************************************************* |
| 66 | ** Function: setBrightness |
nothing calls this directly
no outgoing calls
no test coverage detected