Browse Source

ArduPlane: Support for OLED display by Alexey Kozin

https://github.com/ArduPilot/ardupilot/pull/5135
master
Dmitry Prokhorov 8 years ago committed by Lucas De Marchi
parent
commit
497a4bd4a5
  1. 2
      ArduPlane/GCS_Mavlink.cpp
  2. 3
      ArduPlane/sensors.cpp
  3. 1
      ArduPlane/system.cpp

2
ArduPlane/GCS_Mavlink.cpp

@ -2181,6 +2181,7 @@ void Plane::gcs_update(void) @@ -2181,6 +2181,7 @@ void Plane::gcs_update(void)
void Plane::gcs_send_text(MAV_SEVERITY severity, const char *str)
{
GCS_MAVLINK::send_statustext(severity, 0xFF, str);
notify.send_text(str);
}
/*
@ -2196,6 +2197,7 @@ void Plane::gcs_send_text_fmt(MAV_SEVERITY severity, const char *fmt, ...) @@ -2196,6 +2197,7 @@ void Plane::gcs_send_text_fmt(MAV_SEVERITY severity, const char *fmt, ...)
hal.util->vsnprintf((char *)str, sizeof(str), fmt, arg_list);
va_end(arg_list);
GCS_MAVLINK::send_statustext(severity, 0xFF, str);
notify.send_text(str);
}
/*

3
ArduPlane/sensors.cpp

@ -123,6 +123,9 @@ void Plane::read_battery(void) @@ -123,6 +123,9 @@ void Plane::read_battery(void)
battery.exhausted(g.fs_batt_voltage, g.fs_batt_mah)) {
low_battery_event();
}
if (battery.get_type() != AP_BattMonitor::BattMonitor_TYPE_NONE) {
AP_Notify::flags.battery_voltage = battery.voltage(); //for on-board oled display
}
if (should_log(MASK_LOG_CURRENT)) {
Log_Write_Current();

1
ArduPlane/system.cpp

@ -324,6 +324,7 @@ void Plane::set_mode(enum FlightMode mode, mode_reason_t reason) @@ -324,6 +324,7 @@ void Plane::set_mode(enum FlightMode mode, mode_reason_t reason)
// don't switch modes if we are already in the correct mode.
return;
}
AP_Notify::flags.flight_mode = mode; //for on-board oled display
if(g.auto_trim > 0 && control_mode == MANUAL)
trim_control_surfaces();

Loading…
Cancel
Save