|
|
@ -678,14 +678,14 @@ const AP_Param::GroupInfo AP_OSD_Screen::var_info[] = { |
|
|
|
// @Values: 0:Disabled,1:Enabled
|
|
|
|
// @Values: 0:Disabled,1:Enabled
|
|
|
|
|
|
|
|
|
|
|
|
// @Param: ASPD1_X
|
|
|
|
// @Param: ASPD1_X
|
|
|
|
// @DisplayName: ASPD1_X
|
|
|
|
// @DisplayName: ASPD1_X
|
|
|
|
// @Description: Horizontal position on screen
|
|
|
|
// @Description: Horizontal position on screen
|
|
|
|
// @Range: 0 29
|
|
|
|
// @Range: 0 29
|
|
|
|
|
|
|
|
|
|
|
|
// @Param: ASPD1_Y
|
|
|
|
// @Param: ASPD1_Y
|
|
|
|
// @DisplayName: ASPD1_Y
|
|
|
|
// @DisplayName: ASPD1_Y
|
|
|
|
// @Description: Vertical position on screen
|
|
|
|
// @Description: Vertical position on screen
|
|
|
|
// @Range: 0 15
|
|
|
|
// @Range: 0 15
|
|
|
|
AP_SUBGROUPINFO(aspd1, "ASPD1", 42, AP_OSD_Screen, AP_OSD_Setting), |
|
|
|
AP_SUBGROUPINFO(aspd1, "ASPD1", 42, AP_OSD_Screen, AP_OSD_Setting), |
|
|
|
|
|
|
|
|
|
|
|
AP_GROUPEND |
|
|
|
AP_GROUPEND |
|
|
@ -1421,7 +1421,7 @@ void AP_OSD_Screen::draw_eff(uint8_t x, uint8_t y) |
|
|
|
Vector2f v = ahrs.groundspeed_vector(); |
|
|
|
Vector2f v = ahrs.groundspeed_vector(); |
|
|
|
float speed = u_scale(SPEED,v.length()); |
|
|
|
float speed = u_scale(SPEED,v.length()); |
|
|
|
float current_amps; |
|
|
|
float current_amps; |
|
|
|
if ((speed > 2.0) && battery.current_amps(current_amps)){ |
|
|
|
if ((speed > 2.0) && battery.current_amps(current_amps)) { |
|
|
|
backend->write(x, y, false, "%c%3d%c", SYM_EFF,int(1000.0f*current_amps/speed),SYM_MAH); |
|
|
|
backend->write(x, y, false, "%c%3d%c", SYM_EFF,int(1000.0f*current_amps/speed),SYM_MAH); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
backend->write(x, y, false, "%c---%c", SYM_EFF,SYM_MAH); |
|
|
|
backend->write(x, y, false, "%c---%c", SYM_EFF,SYM_MAH); |
|
|
@ -1442,7 +1442,9 @@ void AP_OSD_Screen::draw_climbeff(uint8_t x, uint8_t y) |
|
|
|
WITH_SEMAPHORE(baro.get_semaphore()); |
|
|
|
WITH_SEMAPHORE(baro.get_semaphore()); |
|
|
|
vspd = baro.get_climb_rate(); |
|
|
|
vspd = baro.get_climb_rate(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (vspd < 0.0) vspd = 0.0; |
|
|
|
if (vspd < 0.0) { |
|
|
|
|
|
|
|
vspd = 0.0; |
|
|
|
|
|
|
|
} |
|
|
|
AP_BattMonitor &battery = AP::battery(); |
|
|
|
AP_BattMonitor &battery = AP::battery(); |
|
|
|
float amps; |
|
|
|
float amps; |
|
|
|
if (battery.current_amps(amps) && is_positive(amps)) { |
|
|
|
if (battery.current_amps(amps) && is_positive(amps)) { |
|
|
|