I was gonna use OSD1_POWER_EN to view power and average cell voltage on my OSD, but nothing shows up and for some reason it’s designated “MSP OSD only” - why in the world would that be?!? All it requires is a simple multiplication of two already known numbers, this should not require any special hardware. Do I really need to make my own custom build to write a power number into some other OSD value?
I was able to poke it into the HDOP value for now, good enough:
void AP_OSD_Screen::draw_hdop(uint8_t x, uint8_t y)
{
AP_BattMonitor &battery = AP::battery();
float amps;
if ( ! AP::battery().current_amps(amps, 0) ) {
amps = 0;
}
const float volts = battery.voltage(0);
const float watts = volts * amps;
backend->write(x, y, false, "%3.1fW", (double)watts);
}