AP_OSD: formatting fixes

This commit is contained in:
Henry Wurzburg 2019-09-16 16:35:45 -05:00 committed by Andrew Tridgell
parent 694075768f
commit 0f0ceb6499
6 changed files with 55 additions and 47 deletions

View File

@ -27,7 +27,8 @@ class AP_OSD_Backend;
/*
class to hold one setting
*/
class AP_OSD_Setting {
class AP_OSD_Setting
{
public:
AP_Int8 enabled;
AP_Int8 xpos;
@ -44,7 +45,8 @@ class AP_OSD;
/*
class to hold one screen of settings
*/
class AP_OSD_Screen {
class AP_OSD_Screen
{
public:
// constructor
AP_OSD_Screen();
@ -183,7 +185,8 @@ private:
void draw_clk(uint8_t x, uint8_t y);
};
class AP_OSD {
class AP_OSD
{
public:
friend class AP_OSD_Screen;
//constructor

View File

@ -20,7 +20,8 @@
#include <AP_OSD/AP_OSD.h>
class AP_OSD_Backend {
class AP_OSD_Backend
{
public:
//constructor

View File

@ -18,7 +18,8 @@
#include <AP_OSD/AP_OSD_Backend.h>
#include <AP_Common/Bitmask.h>
class AP_OSD_MAX7456 : public AP_OSD_Backend {
class AP_OSD_MAX7456 : public AP_OSD_Backend
{
public:

View File

@ -25,7 +25,8 @@
#include <SFML/Graphics.hpp>
#endif
class AP_OSD_SITL : public AP_OSD_Backend {
class AP_OSD_SITL : public AP_OSD_Backend
{
public:
static AP_OSD_Backend *probe(AP_OSD &osd);

View File

@ -1460,7 +1460,9 @@ void AP_OSD_Screen::draw_climbeff(uint8_t x, uint8_t y)
WITH_SEMAPHORE(baro.get_semaphore());
vspd = baro.get_climb_rate();
}
if (vspd < 0.0) vspd = 0.0;
if (vspd < 0.0) {
vspd = 0.0;
}
AP_BattMonitor &battery = AP::battery();
float amps;
if (battery.current_amps(amps) && is_positive(amps)) {